Page 1 of 1

From number to note

Posted: Wed Jun 04, 2025 5:28 pm
by Dutchman
For a musical project, I needed a way to choose musical tones at equal intervals on the musical scale. Therefore, I created a function that generates the desired note string from a note number.
The function is in the attached file that can be 'included' in the main program. If you remove the */ and /* characters, the file can be started as a test program. The output is shown in the screenshot below.
Outpuit of test.jpg
Outpuit of test.jpg (41.96 KiB) Viewed 61 times
NumberNote.txt
(1.53 KiB) Downloaded 7 times

Re: Update "From number to note"

Posted: Thu Jun 05, 2025 1:44 pm
by Dutchman
There was an error in the function.
The OPTION BASE value was not correctly saved.
The error has been corrected in the attached file above.
Sorry for the inconvenience

New Update From number to note

Posted: Fri Jun 06, 2025 6:34 pm
by Dutchman
I needed numerical access to bare notes, so without octave number.
Therefore I added numbers 0-11 tot the function.
Furthermore the code has been simplified.
File and picture of test output have both been updated in the original post