Which MIDI CC is the sustain pedal?
The sustain pedal is CC 64. A value of 64 or more means the pedal is down, and 63 or less means it is up. A simple pedal sends only two values, usually 127 and 0. A pedal that sustains when you lift your foot is sending those two values the wrong way round, which is a polarity mismatch between the pedal and the keyboard, not a fault in either.
I make InputConfig, a free Mac app that turns MIDI messages into shortcuts, so the last section covers using a pedal as a foot switch for the Mac.
On this page: 8 sections
Steps
- Plug the pedal into the keyboard's sustain jack and connect the keyboard to the computer.
- Open a MIDI tester, press Start listening and press the pedal.
- Read CC 64: it should go high when the pedal goes down and low when it comes up.
- If it is reversed, flip the pedal's polarity switch or change the pedal polarity setting on the keyboard.
Read what the pedal sends
| Pedal | CC 64 value | Meaning |
|---|---|---|
| Down | 64 to 127, usually 127 | Sustain on |
| Up | 0 to 63, usually 0 | Sustain off |
The pedal itself is a switch. The keyboard it plugs into turns it into the MIDI message. Anything from 64 up counts as down, so the halfway point is the line. The MIDI CC list has its neighbors: CC 66 is sostenuto and CC 67 is the soft pedal.
InputConfig is free on the Mac App Store. macOS 14 or later, no account, no tracking, open source.
Test it
- You: Open the MIDI tester in Chrome, Edge or Firefox, press Start listening, and press and release the pedal.
- The page: Shows a chip for CC 64 Sustain with its current value, and lists each message.
- Check: The value is high with your foot down and low with it up.
If nothing appears for CC 64, the pedal is not reaching the keyboard, so check the plug and the jack before anything else.
Fix a pedal that works backwards
Pedals come in two polarities: some close the circuit when pressed, and some open it. A keyboard expecting the other kind reads the pedal upside down, so notes ring until you step on it.
- A polarity switch on the pedal. Many pedals have one on the base. Flip it.
- A setting on the keyboard. Many keyboards have a pedal polarity option in their menu.
- The keyboard's manual. Some keyboards check the pedal when they switch on, and the manual says how. I have not tested that across makers, so follow the manual for yours.
A backwards pedal is a mismatch, and one switch or one setting puts it right.
Know about half pedaling
A switch pedal sends two values. A continuous pedal sends the whole range from 0 to 127 as it travels, and some piano sounds use the values in between for a half-pedaled sound. To a sound that only understands on and off, the same pedal still works: it is down from 64 up. If the tester shows CC 64 sweeping through many values, the pedal is a continuous one.
Use the pedal as a foot switch for the Mac
A sustain pedal plugged into a MIDI keyboard is a spare foot switch whenever you are not playing. In InputConfig, a Control Change row in Switch mode fires once the value passes halfway, so the pedal becomes an on and off control: push to talk, start dictation, play and pause, turn a page, or hold a modifier key while your hands type. The pedal under the desk is the one control that needs no free hand. Foot pedal shortcuts on a Mac compares it with USB pedals, and MIDI to keystroke on a Mac has the setup.
The short version
- The message. CC 64.
- The values. 64 and above is down, 63 and below is up.
- Backwards. Polarity. Flip the pedal's switch or the keyboard's setting.
Watch CC 64 in a tester for ten seconds and you know everything about the pedal.
Questions
Which MIDI CC is the sustain pedal?
CC 64. Values of 64 and above mean the pedal is down, and 63 and below mean it is up.
Why is my sustain pedal working backwards?
The pedal's polarity does not match what the keyboard expects. Flip the polarity switch on the pedal if it has one, or change the pedal polarity setting on the keyboard.
How do I test a MIDI sustain pedal?
Connect the keyboard, open a MIDI tester in Chrome, Edge or Firefox and press the pedal. CC 64 should read high while the pedal is down and low when it is up.
What values does a sustain pedal send?
A switch pedal usually sends 127 when pressed and 0 when released. A continuous pedal sends every value in between as it moves.
Can I use a sustain pedal as a keyboard shortcut on a Mac?
Yes, through a mapper. In InputConfig, a row on CC 64 fires once the value passes halfway, so the pedal can press a key, start dictation, or hold a modifier.
Related
Free. macOS 14 or later. No account, nothing leaves your Mac. Open source on GitHub.
Updated