MIDI CC64: what the sustain pedal actually is

In a MIDI file the sustain pedal is not a note and not a note length. It is a separate stream of messages called CC64, and whether a file has it decides how editable that file really is.

What CC64 means

MIDI carries two different kinds of information. Notes say which key, when, how hard. Control changes say everything else about the performance, and each one has a number. Number 64 is the sustain pedal, sometimes written CC64 or, in older documentation, the damper pedal, the same pedal this site is named after.

Each CC64 message carries a value from 0 to 127. The standard reading is a switch:

0 to 63Pedal up. The dampers rest on the strings and the sound stops when the key is released.
64 to 127Pedal down. The dampers lift, so notes keep ringing after the fingers leave the keys.

Some pianos and sampled instruments go further and read the whole range as a position rather than a switch, which is how half-pedalling is expressed. Whether that happens depends on the instrument reading the file. Values 0 and 127 use the widely supported switch interpretation; intermediate values require an instrument that supports continuous or half-pedal input.

Why it matters more than it sounds

Take a slow chord progression where the pianist holds the pedal through each bar. There are two ways to record what you hear.

The editable way is to write the notes with the length the fingers actually held, then write a CC64 down at the start of the bar and a CC64 up at the end. The file now contains the same two layers the pianist played: hands and foot.

The shortcut is to write no pedal at all and simply make every note long enough to cover the ringing. It sounds roughly similar on playback. It falls apart the moment you do anything else with it:

How to check a MIDI file for CC64

You do not have to take anyone's word for it, including ours.

  1. In a DAW. Open the file, then open the automation or controller lane under the piano roll and look for a lane named Sustain, Damper, or CC64. An empty lane means the file has no pedal in it.
  2. By eye, in the piano roll. If nearly every note runs into the next one with no gaps anywhere, and there is no pedal lane, the lengths are doing the pedal's job.
  3. By reading the file. Any MIDI library will list the control changes. What you want to see is a run of CC64 messages spread through the piece, not two at the start.

What a good pedal track looks like

A useful CC64 track has roughly as many pedal changes as the music has harmonic changes, and the changes land where a pianist's foot would move: at a chord change, usually at the exact moment a new note is struck, not halfway between notes.

Two failure modes are easy to spot. Too few events means the tool guessed rather than listened: a pedal pressed once at bar one, released at the end. Too many events, several per beat, usually means the tool reacted to every low note in an arpeggio and treated each one as a new harmony.

How Damper writes it

Damper writes the sustain as clean, editable CC64 events, and always releases the pedal at the end of the file

On a hand-marked reference set of ten pieces and 433 expected lifts, the current method measured 0.745 precision, 0.688 recall and 0.715 F1 at a ±0.125-beat matching tolerance. That is a measurement on one specific set, not a promise about your recording: heavy reverb or a very different piano can do worse.

Transcribe a recording