How Notation Software Converts Sheet Music to MIDI
Music notation software converts visual sheet music into MIDI playback through a multi-step translation pipeline. The program reads visual symbols—such as notes, rests, key signatures, and expression marks—and interprets their contextual musical values. It then converts these musical concepts into chronological digital instructions known as MIDI events, which define precise pitches, durations, and velocities. Finally, these instructions are sent to a sound engine or virtual synthesizer to generate audible playback.
1. Decoding Visual Symbols into Musical Data
Sheet music relies on relative, contextual symbols rather than absolute digital values. When a user enters notes onto a staff, the software evaluates the clef, key signature, and accidental markings to determine the exact intended pitch. Simultaneously, it evaluates the time signature and the graphic representation of notes (such as noteheads, stems, beams, and ties) to calculate relative rhythmic duration, such as a quarter note or sixteenth note.
2. Mapping Rhythm to Absolute Time (Ticks)
MIDI does not inherently understand musical notation like "quarter notes"; instead, it relies on a timing resolution known as Pulses Per Quarter Note (PPQN), or "ticks."
To schedule playback:
- The software reads the designated tempo (Beats Per Minute, or BPM).
- It subdivides each beat into hundreds or thousands of discrete ticks.
- It calculates the exact start time and end time of every note based on its position in the measure, adjusting for tempo changes, ritardandos, and fermatas.
3. Generating Note-On and Note-Off Events
Once timing and pitch are established, the engine converts each note into standardized MIDI commands:
- Pitch Value: Every standard pitch corresponds to a MIDI note number from 0 to 127 (for example, Middle C is MIDI note 60).
- Note-On Message: Dispatched at the exact tick the note begins, signaling the instrument to start sounding the pitch.
- Note-Off Message: Dispatched when the duration expires, telling the instrument to stop the sound.
4. Translating Dynamics and Articulations
Dynamic markings and articulations require algorithmic interpretation to mimic human performance:
- Dynamics to Velocity: Markings such as pianissimo (\(pp\)) or fortissimo (\(ff\)) are mapped to MIDI velocity values ranging from 1 to 127. A piano marking might assign a velocity around 45, while a forte might trigger a velocity of 95.
- Articulations to Duration and Attack: A staccato dot tells the software to truncate the note's duration (typically sounding for roughly 50% of its written value before sending a Note-Off). Accents boost the note's MIDI velocity relative to surrounding notes.
- Continuous Controllers (CC): Gradual changes, such as hairpins (crescendos and decrescendos), are converted into streams of MIDI Continuous Controller messages (such as CC7 for volume or CC11 for expression) to create smooth volume transitions over time.
5. Routing to the Audio Engine
Once the sequence of MIDI events is generated, the software routes the data to a sound synthesizer, such as a built-in SoundFont player or third-party VST/AU virtual instruments. The synthesizer receives the MIDI pitch, velocity, and timing instructions, triggering the corresponding sampled acoustic instruments or synthesized waveforms to output the final audio.