MIDI 1.0 identifies chromatic pitches with note numbers from 0 through 127, giving every semitone its own integer value. Move one semitone higher and the number increases by one. Move an octave higher, and it increases by 12. This fixed numbering is why MIDI files can move note events between keyboards, DAWs, synths, and samplers without storing audio.
A MIDI note numbers chart is useful, but the number itself is more reliable than the octave name beside it. MIDI note number 60 is C, yet software may display it as C3, C4, or C5 depending on the octave-numbering convention. The MIDI message system keeps the numeric note identity separate from the sound that eventually plays it, so two programs can disagree on the label while still transmitting the same note event.
For C4, the MIDI note number you see therefore depends on what the application means by C4. If its convention labels note 60 as C4, then C4 is 60. If it labels 60 as C3, its displayed C4 is 72. Treat the number as the stable identifier and the octave text as a user-interface convention.
Converting MIDI notes to numbers becomes easy once you keep one reference in your head. Starting at 60, C sharp is 61, D is 62, and the pattern continues in semitone steps. A MIDI note number-to-note-name conversion can use the number modulo 12 to find the pitch class, while the octave label still needs the software's chosen naming convention.
Piano MIDI note numbers occupy only part of the full system. An 88-key piano runs from MIDI note 21 at its lowest A through note 108 at its highest C under the usual mapping. MIDI keyboard note numbers outside that span are still valid, even if a piano-style controller has no physical key for them.
The standard MIDI note number to frequency calculation for that A440 setup is f = 440 × 2^((n - 69)/12). This MIDI note number formula is handy for synthesizer code, test tones, tuning tools, and anything else that needs a frequency from an incoming note. Each increase of 12 doubles the frequency because it moves one octave upward.
Microtonal systems add another wrinkle. A Scala keyboard mapping can decide which MIDI note triggers a scale degree and which reference frequency anchors the tuning. In those setups, a MIDI note number can remain the incoming key identifier without implying the ordinary twelve-tone frequency you would find on a basic chart.
The repeated 0-to-127 range elsewhere in MIDI causes plenty of bad debugging. Note On carries a note number and a separate velocity value, so note 64 with velocity 100 does not mean the same thing twice in different units. Practical note velocity values describe how the receiving instrument should interpret the attack, while the note number identifies which key event occurred.
Control Change data uses numbered controllers and 0-to-127 values too. A CC number is not a note number, and a controller value is not velocity. Keeping those fields separate matters when reading event lists, writing scripts, mapping hardware, or diagnosing a controller that sends the right key but the wrong performance data.
General MIDI drum note numbers are a useful exception to the normal pitched-key mindset. In a General MIDI percussion setup, specific note numbers select defined percussion sounds rather than asking for an ordinary melodic pitch. The General MIDI percussion mapping improves portability, although different sound engines can still make the same mapped drum event sound very different.
A MIDI note numbers chart is useful, but the number itself is more reliable than the octave name beside it. MIDI note number 60 is C, yet software may display it as C3, C4, or C5 depending on the octave-numbering convention. The MIDI message system keeps the numeric note identity separate from the sound that eventually plays it, so two programs can disagree on the label while still transmitting the same note event.
The number stays fixed when octave labels change
The usual MIDI note number for middle C is 60, and this is where software labels can get irritating. One DAW may call 60 C3 while another calls it C4. Neither display changes the transmitted number, so a clip does not jump an octave merely because two programs use different names.For C4, the MIDI note number you see therefore depends on what the application means by C4. If its convention labels note 60 as C4, then C4 is 60. If it labels 60 as C3, its displayed C4 is 72. Treat the number as the stable identifier and the octave text as a user-interface convention.
Converting MIDI notes to numbers becomes easy once you keep one reference in your head. Starting at 60, C sharp is 61, D is 62, and the pattern continues in semitone steps. A MIDI note number-to-note-name conversion can use the number modulo 12 to find the pitch class, while the octave label still needs the software's chosen naming convention.
Piano MIDI note numbers occupy only part of the full system. An 88-key piano runs from MIDI note 21 at its lowest A through note 108 at its highest C under the usual mapping. MIDI keyboard note numbers outside that span are still valid, even if a piano-style controller has no physical key for them.
Note numbers map cleanly to frequency only under a tuning
A MIDI note number does not permanently contain one frequency in hertz. Under twelve-tone equal temperament with A4 set to 440 Hz, MIDI note 69 is A4 at 440 Hz and MIDI note 60 lands near 261.63 Hz. Change the concert pitch reference, and the note numbers stay put while their frequencies move.The standard MIDI note number to frequency calculation for that A440 setup is f = 440 × 2^((n - 69)/12). This MIDI note number formula is handy for synthesizer code, test tones, tuning tools, and anything else that needs a frequency from an incoming note. Each increase of 12 doubles the frequency because it moves one octave upward.
Microtonal systems add another wrinkle. A Scala keyboard mapping can decide which MIDI note triggers a scale degree and which reference frequency anchors the tuning. In those setups, a MIDI note number can remain the incoming key identifier without implying the ordinary twelve-tone frequency you would find on a basic chart.
Other 0-to-127 values are different data
The MIDI note number range has 128 possible values because a MIDI 1.0 note number is carried as a 7-bit data value. MIDI note number 0 is the bottom of the numeric range, while MIDI note 127 is the top. Counting how many MIDI notes there are therefore gives 128 possible note numbers, not 127.The repeated 0-to-127 range elsewhere in MIDI causes plenty of bad debugging. Note On carries a note number and a separate velocity value, so note 64 with velocity 100 does not mean the same thing twice in different units. Practical note velocity values describe how the receiving instrument should interpret the attack, while the note number identifies which key event occurred.
Control Change data uses numbered controllers and 0-to-127 values too. A CC number is not a note number, and a controller value is not velocity. Keeping those fields separate matters when reading event lists, writing scripts, mapping hardware, or diagnosing a controller that sends the right key but the wrong performance data.
General MIDI drum note numbers are a useful exception to the normal pitched-key mindset. In a General MIDI percussion setup, specific note numbers select defined percussion sounds rather than asking for an ordinary melodic pitch. The General MIDI percussion mapping improves portability, although different sound engines can still make the same mapped drum event sound very different.