MP3 to MIDI: check stereo cancellation before retrying
If a melody survives in a stereo channel but vanishes in mono, keep the useful channel as a separate mono input before retrying MP3-to-MIDI. Do not raise detection sensitivity to recover sound that is no longer in the analysed signal. Compare the channels and mono preview first; an empty result alone does not prove cancellation.
Convert your audio · Follow the channel check · Inspect the actual files
First establish what reaches transcription
Before blaming note detection for an empty MP3-to-MIDI result, compare the left channel, right channel and the mono signal that will be transcribed. If the wanted melody is present in a channel but disappears in the sum, preserve that channel as a separate mono input rather than exporting both channels back into the same cancelling mix. Check that the exported file still contains the target part before converting. Do not choose a channel solely because its meter is louder: it may omit the instrument you need. Raising the gain after complete cancellation cannot restore a zero signal, and swapping left and right does not change their sum. If the mono signal still contains the melody, cancellation has not been established; continue diagnosis without labelling the empty result a phase problem.
- Keep the original stereo file. Use the same musical interval for every preview and avoid changing gain while comparing sources.
- Listen to each channel separately. Establish which contains the instrument or melody you actually want, not just which has more energy.
- Preview the mono combination. If the target weakens or disappears there, compare it with the isolated channels before treating the missing MIDI as a note-detector failure.
- Export only the retained target channel as its own mono file, preview that exported file, then convert it. Preserve the stereo original for parts not present in the selected channel.
Split is not the same as isolate
Splitting a stereo track into two mono tracks does not help if both are still playing together into the export. Solo or export the selected track only, then inspect the actual output. Audacity's track-splitting manual distinguishes stereo splitting from two centred mono tracks; these are public tool instructions, not our exclusive finding.
For a channel-selecting copy with FFmpeg, the tested extraction command is ffmpeg -i opposite-polarity.mp3 -af "pan=mono|c0=c0" -c:a pcm_s16le recovered-left.wav. Here c0 selects the first input channel; this is channel selection, not the usual two-channel sum. The official pan documentation explains channel mapping. Do not apply this left-channel choice blindly to a recording whose wanted part is on the right.
What does not repair a cancelled sum
After a complete sum has become zero, multiplying it by a gain leaves it zero. Swapping the two channels leaves their sum unchanged. Inverting both also leaves a fully cancelled sum zero. These are arithmetic properties, not new test results. Do not destructively invert one side of a real mix as a universal repair: it changes which material reinforces or cancels, and the other parts may matter.
If only part of a real recording weakens, our exact opposite-channel fixture cannot tell you how much of it will be recoverable. Check the desired part in the exported mono candidate. If it is missing from both channels individually, selecting either channel cannot recreate it. If it survives mono, investigate another cause without claiming a stereo diagnosis.
Why this can happen before the model
The Web Audio speaker downmix rule specifies stereo-to-mono as half the sum of left and right. When R is exactly −L, that sum is zero. This is credited public signal arithmetic, not a claim that every converter uses the same path. Our online app prepares one channel with OfflineAudioContext; today's actual runs below used the CLI fallback with FFmpeg decoding. They are not online-browser conversion measurements and do not establish an identical gain scale between the two paths.
What today's real conversions establish
We created a new five-second, 44,100 Hz PCM fixture with eight authored attacks, a same-polarity stereo version and an opposite-polarity version. All three original MP3 controls were independently encoded at 128 kbit/s. Four fresh CLI runs used BasicPitch 1.0.1 / TensorFlow.js WASM 3.21.0 at onset 0.5, frame 0.3 and minimum 11 frames. Model resources loaded with HTTP200. Browser control returned access denied, so no online run is claimed.
Decoding the opposite MP3 into two channels gave left RMS 0.08992712458522525 and right RMS 0.08992712458522525; the arithmetic-mean RMS was 0. The actual CLI mono decode was also all zero. The same-polarity control returned eight notes; the opposite-polarity input produced no notes and exported no MIDI. Selecting the left channel from that actual opposite MP3, exporting WAV and re-encoding a mono MP3 returned eight notes in a new run. That recovery includes another lossy encode; it does not prove unchanged velocities or universal transcription accuracy.
The additional original left-only control also returned eight notes. It is not substituted for the recovered file. The failure report is retained as a failure, not represented by a fabricated empty MIDI.
Inputs, original reports, independently parsed MIDI and reproduction
Runs occurred at 2026-11-25T17:58:07.064Z, 2026-11-25T17:58:10.038Z, 2026-11-25T17:58:12.691Z, 2026-11-25T17:59:14.260Z UTC (26 November Beijing time). Successful MIDI files were independently parsed with midi-file and checked against every report note, start and duration tick. Input and output hashes were verified. These records support the reader decisions; event counts and hashes are not an originality percentage.
| Input | Actual outcome | Input SHA256 |
|---|---|---|
| same-polarity | 8 | 1f1deac2288fd9b279cbba17a7a4b71c7e0226b0de1683e943bdc8ac115d8f41 |
| opposite-polarity | No notes; no MIDI exported | d67ac85c65101d73167a081772cd89b97f461477500ee972c653165e96aefacd |
| left-only | 8 | 9cea69dc4d2cc11556a398e64502777e0f316d44901f8c514ee656aea6804c7b |
| recovered-left | 8 | 2abed533ce93c79b927f8f8aacb871071e1c1f2ddd3cba1fdf4eaebd88551b5c |
same-polarity
| Key | Start tick | End tick | Velocity |
|---|---|---|---|
| 60 | 290 | 591 | 68 |
| 62 | 769 | 1070 | 73 |
| 64 | 1248 | 1549 | 73 |
| 65 | 1728 | 2019 | 75 |
| 67 | 2208 | 2498 | 71 |
| 65 | 2676 | 2977 | 74 |
| 64 | 3167 | 3479 | 73 |
| 62 | 3657 | 3937 | 75 |
left-only
| Key | Start tick | End tick | Velocity |
|---|---|---|---|
| 60 | 290 | 591 | 73 |
| 62 | 769 | 1070 | 73 |
| 64 | 1248 | 1549 | 72 |
| 65 | 1728 | 2019 | 76 |
| 67 | 2208 | 2498 | 75 |
| 65 | 2687 | 2977 | 75 |
| 64 | 3167 | 3479 | 75 |
| 62 | 3657 | 3937 | 75 |
recovered-left
| Key | Start tick | End tick | Velocity |
|---|---|---|---|
| 60 | 290 | 591 | 70 |
| 62 | 769 | 1070 | 74 |
| 64 | 1248 | 1549 | 73 |
| 65 | 1728 | 2019 | 75 |
| 67 | 2208 | 2498 | 72 |
| 65 | 2676 | 2977 | 75 |
| 64 | 3167 | 3479 | 73 |
| 62 | 3657 | 3948 | 75 |
- convert-cli-evidence.mjs
- generate-inputs.mjs
- input-reference.json
- left-only-conversion.json
- left-only.mid
- left-only.mp3
- left-only.wav
- opposite-polarity-failure.json
- opposite-polarity.mp3
- opposite-polarity.wav
- reader-difference.txt
- recovered-left-conversion.json
- recovered-left.mid
- recovered-left.mp3
- recovered-left.wav
- same-polarity-conversion.json
- same-polarity.mid
- same-polarity.mp3
- same-polarity.wav
- verified-results.json
- verify-and-build.mjs
From the existing project root, run generate-stereo-inputs.mjs with your FFmpeg executable path; run the supplied converter adapter with FFmpeg path, public/examples/stereo-cancellation and each input name. The recovery extraction above plus 128 kbit/s MP3 encoding creates recovered-left. Run build-stereo-article.mjs with FFmpeg to verify the actual MIDI/reports and decoded cancellation. Existing project dependencies are required. No threshold sweep was performed.
Reader questions
Should I convert every stereo file to one channel?
No. Selecting a channel can discard wanted material. Use this route only after checking which channel retains the target and whether the mono sum loses it.
Does no MIDI prove a phase problem?
No. Establish loss at the channel-combination step before attributing this failure. This page does not diagnose an arbitrary empty result from its label.
Does restoring eight notes prove the transcription is correct?
No. Audition pitch and timing against the exported source. The fixture verifies this recovery path, not a general accuracy rate.
What was already public
Current converter pages already advise clear or isolated source material, supported formats and MIDI editing. This guide adds the channel-versus-mono diagnostic, a target-preserving export decision and the limits on gain/swapping as repairs. The fresh conversion files test that workflow; they do not create exclusivity by themselves.