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.
From number to note
- Dutchman
- Posts: 866
- Joined: Mon May 06, 2013 9:21 am
- My devices: iMac, iPad Air, iPhone
- Location: Netherlands
- Flag:
From number to note
Last edited by Dutchman on Fri Jun 06, 2025 6:29 pm, edited 2 times in total.
- Dutchman
- Posts: 866
- Joined: Mon May 06, 2013 9:21 am
- My devices: iMac, iPad Air, iPhone
- Location: Netherlands
- Flag:
Re: Update "From number to note"
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
The OPTION BASE value was not correctly saved.
The error has been corrected in the attached file above.
Sorry for the inconvenience
- Dutchman
- Posts: 866
- Joined: Mon May 06, 2013 9:21 am
- My devices: iMac, iPad Air, iPhone
- Location: Netherlands
- Flag:
New Update From number to note
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
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