MIDI troubleshooting
MIDI faults are easiest to find when you look at the bytes rather than at the sound. Each section below goes from the symptom to the likely causes, how to check each one, and the fix. The checks use free tools on this site:
- The live MIDI monitor for messages from devices.
- The MIDI file analyzer for files.
- The MIDI player to hear a file without your DAW’s settings in the way.
- The CC chart to decode controller numbers.
| Symptom | Check first |
|---|---|
| No sound | Do messages arrive at all? Then check the channel, the instrument and the volume. |
| Notes keep sounding | Note Off missing or on another channel; sustain CC 64 stuck on |
| Wrong octave or note names | C3/C4 naming convention, transpose settings |
| Late, uneven or drifting timing | Audio buffer size, timer-based scheduling, tempo map |
| Doubled notes or flams | Local control, MIDI thru/echo, loops |
| Device not listed | Operating system’s MIDI device list, cable, drivers, another app holding the port |
| Web MIDI errors in the browser | Browser support, HTTPS, permission |
| File imports wrong | Format 0 vs 1, tempo events, PPQ |
| Knobs or pedals do nothing | CC number and channel, the receiver’s mapping |
No sound
Symptom: keys are pressed or a file plays, but nothing is heard.
Likely causes
- Messages never reach the receiver. The wrong output port is selected, the DAW’s MIDI input is disabled in its preferences, or the track is not record-armed or monitoring.
- Channel mismatch. The controller sends on channel 1 and the instrument listens on channel 2. Many hardware synths have a fixed receive channel.
- No instrument. A DAW MIDI track with no instrument plug-in, or an imported MIDI file whose tracks were created empty, is silent by design.
- Volume at zero. A file or controller sent CC 7 (volume) or CC 11 (expression) with value 0.
- Local control off. A keyboard with built-in sounds can disconnect its keys from its own sound engine (Local Off). It then plays only what comes back over MIDI.
- The audio side. The receiver gets the notes, but its audio output is muted or routed to another device.
How to check
- Open the monitor and press a key. If nothing appears, the problem is upstream: the cable, the port or the device (see device not listed).
- Read the channel in the monitor’s output (
channel=1) and compare it with the receiver’s setting. - For a file, open it in the analyzer. Check which channels carry notes, whether each has a Program Change, and whether CC 7 or CC 11 is set to 0.
- Play the file in the MIDI player. If it sounds there, the file is fine and the problem is in your DAW or synth setup.
Fix
Select the right port, set matching channels (or set the instrument to “omni”/any channel), assign an instrument, and send Bn 07 64 (volume 100). On a keyboard with built-in sounds used with a DAW, turn Local Off and enable the DAW’s MIDI echo/thru, or turn Local On and disable the echo, but not both (see doubled notes).
Stuck notes (hanging notes)
Symptom: a note keeps sounding after the key is released, or after playback stops.
Likely causes
- Missing Note Off. Playback stopped, a cable was pulled, or an app crashed between a Note On and its Note Off. A program that stops a sequence without releasing what is sounding will leave notes hanging.
- Note Off that does not match. A release only ends a note with the same channel and note number. If transpose, octave shift or the split point changes while a key is held, the release goes to a different note. A channel change has the same effect.
- Zero-velocity Note On not handled. Your parser treats
9n kk 00as a new note instead of a release. - Sustain stuck on. CC 64 was left at 127, or the pedal is wired with reversed polarity. A pedal plugged in after the keyboard was switched on can read as pressed when it is released. Many keyboards detect polarity at power-on.
- Duplicated Note Ons from a MIDI loop: two Ons and one Off leave one voice sounding on some synths.
- Zero-length notes in a file. If the Off sorts before the On on the same tick, the note starts and never ends.
How to check
- In the monitor, play the stuck key and look for its Note Off. Check that the channel and note number match the Note On.
- Watch for
controlChange controller=64. A value of 127 that never returns to 0 is a stuck pedal. - For a file, inspect the events in the analyzer and look for a Note On without a later release of the same note on the same channel.
Fix
To silence everything now, send a “panic” on all 16 channels. Release sustain first: by specification, All Notes Off does not cut notes that the sustain pedal is holding.
B0 40 00 sustain pedal off (CC 64 = 0) } repeat for
B0 78 00 All Sound Off (CC 120 = 0) } channels B0
B0 7B 00 All Notes Off (CC 123 = 0) } through BF
The Web MIDI guide has a panic() function that sends exactly this. Some devices ignore CC 120 or CC 123. In that case, send a Note Off for every note on every channel (128 × 16 messages), or power-cycle the device. In your own code, track what is sounding and release it on Stop. Apply transpose when the note starts, and store the transposed number for its release:
// Remember what is sounding so Stop can release exactly those notes.
const sounding = new Set(); // channel * 128 + note
function noteOn(out, ch, note, vel) { out.send([0x90 | ch, note, vel]); sounding.add(ch * 128 + note); }
function noteOff(out, ch, note) { out.send([0x80 | ch, note, 0]); sounding.delete(ch * 128 + note); }
function stopAll(out) {
for (const key of sounding) out.send([0x80 | (key >> 7), key & 127, 0]);
sounding.clear();
}
For pedal polarity, unplug and replug the pedal with the keyboard off, or use the keyboard’s polarity setting. The CC 64 entry in the CC chart describes the sustain controller.
Wrong octave or wrong note names
Symptom: a part plays an octave too high or low, or two programs disagree on what a note is called.
Likely causes
- Naming convention, not pitch. MIDI note 60 is middle C everywhere, but depending on the product it is labelled C3, C4 or, less often, C5. This site uses C4. A “C3” in one program and a “C4” in another can be the same note.
- Real transposition. An octave button on the controller, a transpose setting on the DAW track, an instrument’s own octave or coarse-tune parameter, or a transposing instrument patch.
- Drum maps. On General MIDI channel 10, note numbers select drum sounds, so “wrong notes” there usually mean the drum map is wrong, not the pitch.
How to check
Compare note numbers, not names. The monitor prints both (note=60 (C4)). The note calculator converts any number to a name and frequency, and plays it, so you can match it by ear.
Fix
If the numbers match, only the labels differ: change the display setting, or tell your users which convention you use. If the numbers differ by 12, find the transpose setting that adds it. To shift a whole file deliberately, use the MIDI transposer.
Latency, jitter and drift
Symptom: notes sound late after a key press (latency), unevenly (jitter), or slowly drift away from another device or the audio (drift).
Likely causes
- Latency usually comes from audio, not MIDI. Large audio buffers, Bluetooth headphones and heavy plug-ins all add delay between a note arriving and its sound.
- Jitter comes from scheduling with
setTimeoutor similar timers, which run late when the main thread is busy. MIDI over Bluetooth LE and busy USB hubs also add variable delay. On a 5-pin DIN cable each byte takes 320 µs, so a 10-note chord (30 bytes) is spread over about 9.6 ms, or about 6.7 ms with running status. - Drift means two clocks disagree: both devices think they are the master, the tempo map was ignored on import, or MIDI clock (
F8) is being followed without smoothing.
How to check
- Compare timestamps in the monitor. Even gaps there mean the input is steady and the delay is in the sound path.
- Check the audio buffer size in your DAW or audio settings. In the browser, read
AudioContext.baseLatencyandoutputLatency. - Count clock sources: exactly one device should send
F8/FA/FC, and every other device should follow it.
Fix
Lower the audio buffer size, use wired headphones for playing, and request latencyHint: 'interactive' in Web Audio. In code, schedule ahead with timestamps rather than timers. Use the look-ahead scheduler for audio, and timestamped send() for MIDI. Make one device the clock master, and average incoming clock intervals before deriving a tempo. Use the BPM calculator to check what the spacing should be.
Doubled notes, flams and MIDI loops
Symptom: each note sounds twice or slightly flammed, notes pile up, or a device becomes unresponsive while the MIDI activity light stays on.
Likely causes
- Local control on plus DAW echo. The keyboard plays its own sound, and the DAW echoes the same notes back to it.
- Soft thru. A device forwards its input to its output, and the output is routed back to the input, directly or through a computer.
- Software loops. An app forwards input to an output, and that output is (directly or via a virtual port) one of its inputs. Each pass doubles the traffic until the port chokes.
- Two listeners. Two apps, or two tracks set to “all inputs”, play the same incoming notes.
How to check
In the monitor, a loop shows every message twice (or endlessly) within a millisecond or two, often on two different inputs. Disconnect outputs one at a time until the duplicates stop.
Fix
Choose one path: Local Off with DAW echo, or Local On without it. Disable soft thru on devices that don’t need it. In your own forwarding code, never send to the port you are reading from, and if several ports could form a loop, tag or filter forwarded messages.
Device not detected
Symptom: the controller or interface does not appear in the port list.
Likely causes
- Cable or power. A charge-only USB cable has no data lines. Unpowered hubs may not supply enough current.
- Drivers. Most current USB MIDI devices are class compliant: they work with the drivers built into macOS, Windows, Linux, iOS and Android. Older or more complex devices may need the manufacturer’s driver, and some offer a class-compliant mode in their settings.
- Port held by another app. On Windows, many MIDI drivers have historically allowed only one application to open a port at a time, so a running DAW can hide a device from a browser.
- The app started before the device. Some programs only scan for devices at startup. (Web MIDI reports new devices through
statechange.)
How to check
First ask the operating system: Audio MIDI Setup on macOS, Device Manager on Windows, or aconnect -l / amidi -l on Linux. If the device is missing there, the problem is the cable, the power or the driver, not your app. If it is listed there but not in your app, look for another app holding the port, or restart the app.
Fix
Use a known data cable plugged directly into the computer. Install the manufacturer’s driver if the device is not class compliant. Close other MIDI apps. Restart the app (or browser) after connecting.
Web MIDI errors in the browser
Symptom: a web MIDI app says MIDI is unsupported, permission was denied, or no devices are found.
Likely causes
navigator.is undefined. The browser does not implement Web MIDI (Safari, and every browser on iPhone and iPad). Or the page is not a secure context (plain HTTP), or it runs in an iframe withoutrequestMIDIAccess allow="midi".NotAllowedError/SecurityError. The user or a policy blocked MIDI, possibly on an earlier visit. Chrome asks permission for all MIDI access starting with version 124, so older code that never expected a prompt can break.- Sysex refused. The page asked for
{ sysex: true }and the user declined, or it sentF0without sysex permission (anInvalidAccessError). - Empty port lists. Access was granted, but the operating system sees no devices (see device not detected).
How to check
Open the monitor: it reports which of these cases applies. In Chrome, the site information icon in the address bar shows the MIDI permission. The browser support table lists current support.
Fix
Use a supported browser over HTTPS (or localhost). Allow MIDI in the site settings, then reload. Request sysex only when the feature needs it. Developers should catch every rejection and show the user what to do. The error table has wording you can reuse.
MIDI files that import incorrectly
Symptom: everything lands on one track, the tempo is wrong, notes are in the wrong place, instruments are wrong, or notes are missing.
Likely causes
- Format 0 vs format 1. A format 0 file has one track holding all channels, and many DAWs import it as one track. Format 1 keeps one track per part.
- Tempo. No tempo event means 120 BPM. In format 1, tempo events belong in the first track. Files that put them elsewhere, and DAWs set to ignore file tempo, both give wrong speeds.
- Division. A reader that assumes a PPQ instead of reading the header misplaces every note. SMPTE-division files are not supported by some programs.
- Instruments. Missing Program Changes, or bank select messages that the receiving synth does not understand. Drums not on channel 10 play as pitched notes under General MIDI.
- Missing or doubled notes. Parsers that ignore running status or zero-velocity Note Ons. Truncated files whose track length runs past the end.
- Garbled names or lyrics. Text events have no declared encoding.
How to check
Open the file in the MIDI file analyzer. Inspect the header (format, track count, division), then the tempo events, channels and Program Changes, and compare them with what the importer did. Then play it in the MIDI player to hear the file as written.
Fix
Use your DAW’s “split by channel” option for format 0 files, or re-export as format 1. Enable “import tempo” (or the equivalent) in the DAW. Add Program Changes at tick 0 for each channel. If you are writing the exporter, check it against the MIDI file pitfalls, and test your reader with the MIDI test files.
Knobs, faders or pedals do nothing
Symptom: notes play, but moving a control has no effect.
Likely causes
- The control sends a CC number that the receiver does not map to anything. For example, CC 74 changes brightness only if the synth patch assigns it.
- The control sends on a different channel from the notes.
- The control sends NRPN/RPN sequences or 14-bit pairs, which the receiver only understands as complete sequences.
- It sends Program Changes or notes instead of CCs (a controller in a different mode or preset).
How to check
Move the control with the monitor open and note the CC number, channel and value range. Look the number up in the CC chart (for example, CC 74).
Fix
Use “MIDI learn” in the receiver, or remap the controller to a CC that the receiver already understands. Make sure notes and controls share a channel. For RPN-based parameters such as pitch bend range, send the full sequence shown in Control Change.
Still stuck? Reduce the problem to the bytes. Capture what is sent with the monitor or the analyzer, and compare it with MIDI messages in bytes. Once you can see the bytes, the cause is usually clear.