I agree with you as we both show the middle C on the treble clef stave, and yes, even on my guitar charts showing the notes on a music stave, C4 is 1 line below the treble clef. However, the note that plays at note #60 is actually C5, or in the 3rd space on the treble clef.
I guess I need to modify my question. I have a musically trained ear, and when I play songs, I play them mostly by ear, and sometimes from a music sheet or score. My issue is note #60 plays an octave higher than it supposed to be.
On a guitar, the C4, middle C, note #60, is played on the 5th string, 3rd fret. The sound coming from the program using note #60 sounds like the C5 note that is played on the 2nd string, 2nd fret on a standard tuned guitar.
I also ran the program "Notion" and the C5 key sounds like the SmartBASIC Synthesizer code's C4 key. When I compare the SmartBASIC program with real intruments, the program plays C4 an octave higher than every mucical instrument I have. Try it yourself. Since the example program does not work for me, I am using Rbytes's Synnthesizer v2,2 (code and files can be downloaded at:
https://www.dropbox.com/sh/c095ysw168s2 ... nJVLa?dl=0.)
I am thinking that the error is in the program, as it starts off with C as C1 and not C0, and ends with C7, and not C8. That would cause C4, note 60, to play an octave higher. I'm looking over this code, but since coding MIDI is very new to me, I have a learning code that's getting in the way (Ricardo, maybe you can look at the code and see if it is a coding error.
Mr K – does C start at note number zero? It may be a bug in SmartBASIC, for when I look at the NOTES table in the documentation, you do start C at C0, but instead of it being note #0, it is note #12, and that would push it an octave higher. What is Note 0 in SmartBASIC? (Below is documentation from SmartBASIC's Help Menu). For if you are using the MIDI standards from MIDI.ORG, C0 should have a 0 in front of it, not a 12.
Could this be a bug in SmartBASIC?
If so, for now, (I would need to test this) if I subtract 12 from the Note number provided, then I would get the right note, as, according to your chart, when I use 48, it plays the correct sound for C4, or the middle C. However, if I subtract 12 from 12 (C0) I will be using Note 0 for the first C note. Will this cause an error?
This is right out of the SB documentation. I have not the foggiest idea why C0 starts at note 12 (unless 0-11 are reserved for the drums).
NOTE NUMBERS
12-C0 24-C1 36-C2 48-C3 60-C4 72-C5 84-C6 96-C7 108-C8
13-C#0 25-C#1 37-C#2 49-C#3 61-C#4 73-C#5 85-C#6 97-C#7 109-C#8
14-D0 26-D1 38-D2 50-D3 62-D4 74-D5 86-D6 98-D7 110-D8
15-D#0 27-D#1 39-D#2 51-D#3 63-D#4 75-D#5 87-D#6 99-D#7 111-D#8
16-E0 28-E1 40-E2 52-E3 64-E4 76-E5 88-E6 100-E7 112-E8
17-F0 29-F1 41-F2 53-F3 65-F4 77-F5 89-F6 101-F7 113-F8
18-F#0 30-F#1 42-F#2 54-F#3 66-F#4 78-F#5 90-F#6 102-F#7 114-F#8
19-G0 31-G1 43-G2 55-G3 67-G4 79-G5 91-G6 103-G7 115-G8
20-G#0 32-G#1 44-G#2 56-G#3 68-G#4 80-G#5 92-G#6 104-G#7 116-G#8
21-A0 33-A1 45-A2 57-A3 69-A4 81-A5 93-A6 105-A7 117-A8
22-A#0 34-A#1 46-A#2 58-A#3 70-A#4 82-A#5 94-A#6 106-A#7 118-A#8
23-B0 35-B1 47-B2 59-B3 71-B4 83-B5 95-B6 107-B7 119-B8
Simply, the sound is too high in the octave range. Try and compare the middle C with a properly tuned guitar or fullsized keyboard (pianos and keyboards, the first note is a C (as well as the last note)) and you'll hear what I am talking about.
So now my question is: is the iPad's synthesizer not being used correctly by SmartBASIC or has a different starting point? Is the code that you use to create the internal synthesizer not starting at note #0 (the first note is called note 0)? Is it a bug in SB? Or in iOS?
For reference, here is the main screen for the App. Notice that the Octave starts with 1 and ends at 7, instead of starting at 0 and ending at 8.
Help understanding this would be greatly appreciated.