From number to note

Post Reply
User avatar
Dutchman
Posts: 866
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

From number to note

Post 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 62 times
NumberNote.txt
(1.53 KiB) Downloaded 7 times
Last edited by Dutchman on Fri Jun 06, 2025 6:29 pm, edited 2 times in total.

User avatar
Dutchman
Posts: 866
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: Update "From number to note"

Post 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

User avatar
Dutchman
Posts: 866
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

New Update From number to note

Post 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

Post Reply