Recording prep · Before you convert

Two prep steps change the output. The rest is housekeeping.

The advice usually given before a pitch-to-MIDI pass is a list of four or five things: de-reverb, denoise, mono, normalise, high-pass. Measured on one six-note phrase through a line-by-line replica of this site's detector, only one of them decides whether you get notes at all, and one more moves the accuracy. The converter reads channel 0 and nothing else — a stereo export with the take panned right returns zero notes, and so does a left channel sitting 20 dB down. That is not a quality issue you can hear; it is a file-layout issue you can only fix on export.

The second one is level, but the obvious version of the advice is wrong. Raising the take to −12 dBFS does get every note through at all three sensitivity settings. It also pushed two of the six notes a semitone sharp in this test, while the same phrase at −30 dBFS came back with all six pitches correct. There is a window, not a direction.

Select audio to create a MIDI draft locally.

The selected audio is decoded in your browser; it is not uploaded to a server.

The one that decides everything

A stereo file is not downmixed. Channel 0 is the whole input.

The decoder returns an AudioBuffer, and the detector takes its samples from buffer.getChannelData(0). There is no sum, no average, no per-channel loop — the right channel of a stereo file is never read. Nothing in the interface warns you, because from the file's point of view the conversion succeeded; it simply found no notes, or found a quiet, broken version of the take.

Same phrase, same 0.25 peak, only the channel layout changed. The left column is what the detector sees:

Export layoutChannel 0 RMSChannel 1 RMSNotes found
Mono (both sides identical)0.100.106 of 6
Stereo, take on the left0.100.006 of 6
Stereo, take on the right0.000.100 of 6
Stereo, left 20 dB down0.010.100 of 6

The right-panned case fails completely — no error message, no partial result, just the "no clear notes were detected" stop. The quiet-left case is worse in a way, because it fails differently at each sensitivity: 6 notes at Low, 0 at Balanced, 0 at High. A file like that looks fine in any player and behaves inconsistently in the converter.

Collapsing to mono before conversion fixes both rows outright: the same right-only and quiet-left signals, summed as (L+R)/2, returned 6 of 6 at all three sensitivity levels. That is the entire argument for exporting mono, and it has nothing to do with the detector's pitch accuracy — it is about not throwing away the only channel that gets read.

How to check a take in one step. If you are not sure which channel carries the part, convert twice — once as exported and once after a mono sum — and compare the note counts. Identical counts mean the layout was fine. Zero versus six means the part was on the wrong side.

The one that has a window

Too quiet loses notes. Too loud does not buy accuracy.

Each analysis frame is gated on RMS before any pitch is estimated, and the gate moves with the sensitivity setting: 0.009 at Low, 0.015 at Balanced, 0.023 at High. A take that never crosses the gate produces no frames, so no notes — that part of the usual advice is solid. What the numbers do not support is the idea that hotter is better.

PeakPeak dBFSNotes at LowNotes at BalancedNotes at HighPitches returned
0.006−44.4000—
0.012−38.4000—
0.03−30.566057, 59, 60, 62, 64, 65 — all correct
0.25−12.066657, 59, 61, 63, 64, 65 — two a semitone sharp
0.9−0.966657, 59, 61, 63, 64, 65 — same two

The phrase was A3, B3, C4, D4, E4, F4 — MIDI 57, 59, 60, 62, 64, 65. At −30.5 dBFS the detector returned exactly that. At −12 dBFS and at −0.9 dBFS the third and fourth notes came back as 61 and 63, one semitone high, and pushing the level higher did not change it. So the −12 dBFS target gets you a full note count at every setting, but it is not the most accurate level in this test; it is the loudest one that still behaves predictably.

The per-frame readings show where the semitone comes from, and it is not the pitch estimator drifting. At the −12 dBFS level the tail of the previous note is still well above the RMS gate when the next note begins — 0.069 RMS in the frame that starts 20 ms before the true onset, against a gate of 0.015. That frame's window straddles two pitches, the correlation peaks between them at lag 159 — 277.4 Hz, which quantises to MIDI 61 — and because the note-merging rule accepts a difference of one semitone, the first frame sets the pitch for the whole note. At −30.5 dBFS the same frame sits below the gate, the note starts on its true pitch, and both notes come back correct.

Practical version: aim for peaks around −12 dBFS if you want every note at every sensitivity, then correct the occasional semitone by hand. If pitch accuracy matters more than recall, run at a lower peak and keep the sensitivity at Low or Balanced — the strictest setting is the first to lose quiet material. Do not clip the take to get there: at −0.9 dBFS the result was identical to −12, so headroom above the gate buys nothing.

The one that is oversold

Reverb only hurts when it is heavy, and a gate does not undo it.

Reverb is the item at the top of most prep lists, so it is worth measuring rather than assuming. The same dry phrase, convolved with a 1.2-second decaying noise tail at four wet amounts:

Wet amountNotes at LowNotes at BalancedNotes at HighShortest noteLongest note
0 — dry6660.28 s0.31 s
0.257660.29 s0.32 s
0.506660.29 s0.39 s
0.808640.09 s0.64 s

Up to a wet amount of 0.5 the note count does not move at all — six notes, correct pitches, same as dry. What changes is duration: the longest note grows from 0.31 s to 0.39 s because the tail keeps the frame above the gate after the note has ended. At 0.8 the output degrades properly: a spurious 0.09-second note appears at Low, the strictest setting drops two notes, and one note stretches to 0.64 s — more than double its real length. If your take sounds like a church, this is the failure you will see: extra short notes and note lengths that no longer match what you played.

And the fix is not the obvious one. A downward expander set to −20 dB relative to peak with a 30 ms hold — the time-domain shape most "de-reverb" presets approximate — was applied to the wet 0.5 and wet 0.8 signals and changed nothing: identical note counts, identical pitches, identical 0.09 s shortest note, identical 0.64 s longest note. A gate that closes on amplitude cannot separate a note tail from a reverb tail, because they are the same signal at the same frequency. That is worth knowing before you spend twenty minutes auditioning plugins: if the note count and note lengths are wrong because of reverb, the reliable fix is a drier take, not a stronger gate.

Test conditions. One six-note phrase (A3, B3, C4, D4, E4, F4), each note 0.30 s with a 5 ms attack and an exponential decay, separated by 0.10 s of silence, 44.1 kHz mono, generated in Node and fed through a line-by-line replica of the detector in converter.js: frame 1,024, hop 256, lag range 31–512, RMS thresholds [0.009, 0.015, 0.023], minimum durations [0.055, 0.075, 0.11] s, MIDI clamp 28–96. The reverb is a convolution with a 1.2 s exponentially decaying noise impulse response, mixed at the wet amounts shown. The gate is a −20 dB expander with a 30 ms hold. These are synthesized signals, not recordings. A real take adds breath, room modes and mic noise that this model does not contain, so treat the numbers as the shape of the failure rather than a prediction for your file. Log: localmidi-private/logs/recording-prep-2026-11-09.txt.

In practice

The export settings worth changing, in order.

  • Export mono. This is the only step that can turn zero notes into six. If your DAW will not sum to mono, at least centre the pan on the track carrying the part and check that the left meter moves.
  • Set the peak near −12 dBFS, not higher. Everything below −38 dBFS produced nothing here, and everything above −12 produced the same result as −12. The window is wide; the useful part of it is the middle.
  • Fix the tails, not the room. If notes come out too long, the previous note's decay is still above the gate. Trimming the tail or leaving a longer gap between phrases does more than any de-reverb plugin, and it is reversible if you keep the original.
  • Skip the denoiser unless the noise is audible. The gate already discards frames below 0.009–0.023 RMS, which is a fairly high floor; a hiss quiet enough to pass that floor is also quiet enough to leave alone. What noise does at higher levels is covered on the noise page.
  • Do not chase pitch errors with prep. A note that comes back a semitone off is the frame-level rounding described on the wrong notes page; no amount of cleaning before conversion moves the lag grid.

Once the file is clean, the conversion itself and what the exported MIDI contains are covered in how to convert audio to MIDI. If the take is polyphonic — a chord, a piano part, two voices — prep will not help, because the detector reduces every frame to a single pitch: see the polyphonic guide.

FAQ

Questions that come up before a conversion.

Why did my file convert to nothing at all?

Most likely the part is not on channel 0. The detector reads getChannelData(0) only, so a stereo export with the take panned right returns zero notes regardless of how loud or clean it is. Export mono and try again before changing anything else.

Should I normalise to 0 dBFS for the best detection?

No. The gate is a floor, not a target: anything above roughly −12 dBFS behaved identically here, and −0.9 dBFS gave no better pitches than −12 dBFS. Peaking at 0 dBFS only removes the headroom you need if you later change the level.

Does a de-reverb plugin help?

Only if it removes the tail rather than gating it. A −20 dB expander with a 30 ms hold changed no note count and no note length at either wet 0.5 or wet 0.8 in this test. A drier take, or trimming the silence between phrases, is the reliable fix.

Is noise reduction worth doing first?

Rarely. Frames below 0.009–0.023 RMS are discarded before pitch detection, so low-level hiss never reaches the estimator. Heavy noise is a different problem — it lifts the floor and adds short spurious notes — and that case is covered on the noise page.

Does the sample rate or bit depth matter?

Not for detection. The gate and the lag search both work on normalised samples, and a 24-bit file at the same peak level behaves the same as a 16-bit one. Bit depth only changes file size, which matters for the 20 MB limit — see the file size page.