Pitch is the perceived highness or lowness of a musical sound. A note’s frequency determines its pitch: higher frequencies sound higher, while lower frequencies sound lower. Middle C (C4) is about 262 hertz. section 13.1.1
Pitch connects note names, octaves, and semitones. Each octave contains 12 semitones, and frequency doubles between adjacent octave levels. A pitch number combines octave and semitone information into a value from 0 to 127; C4 is 60 and F3 is 53. section 13.1.1
In MIDI-style performance data, pitch is carried by note events:
- A note_on event starts a note at a pitch value, such as 74 for D5. section 14.1.1
- A note_off event releases a note, such as pitch 60 for C4. section 14.1.1
- Pitch differs from velocity: pitch identifies the note’s height, while velocity represents loudness or playing force. section 14.1.1
Pitch in a performance sequence
A note_on event with value 74 starts D5, while a later note_on event with value 73 starts the neighboring pitch. These values can become note_on tokens before a music Transformer receives them. section 14.1.1
Figure 13.1 The relationship between musical notes, octaves, and pitches (also known as note numbers). The first column displays the 11 octaves (ranging from –1 to 9), representing different levels of musical sound. Each octave is subdivided into 12 semitones, which are listed in the top row: C, C#, D, D#, ..., B. Within each octave, each note is assigned a specific pitch number, ranging from 0 to 127, as indicated in the figure.
Use the relationship figure to look up how octave levels, 12 semitones, note names, and pitch numbers correspond. section 13.1.1

