Audio to MIDI for a Hard-Panned Melody

Try the stereo WAV first. If notes disappear, listen to the occupied channel and export it as mono for a second pass. Our hard-left fixture kept all three notes in the live Chrome converter. The converter source averages the channels, which halves the peak for this pair.

This result covers one synthetic melody and one set of conversion settings.

The two files share the same left channel

We prepared a pair of synthetic PCM16 stereo WAVs at 22050 samples per second with 33,075 frames per channel. The dual-mono control copies its left samples to the right. The hard-left version replaces those right samples with zeros. We opened the saved files and checked the relationship at every position. There is no pan law, effect, or level change on the retained left channel.

In the code served by the converter, each decoded channel adds its sample divided by the channel count. At a position with left sample x, the control average becomes (x + x) ÷ 2. The hard-left average becomes (x + 0) ÷ 2. On the original integer scale, the absolute peaks are 8192 and 4096. The level difference is 20 × log10(4096/8192) = −6.02 dB. This is a comparison of the peaks of the two computed mono signals. W3C stereo down-mix reference

The same left waveform is paired with a copy on the right or with silence.
Dual mono keeps the original average. A silent right channel halves it.

The same notes survived in Chrome

We converted the two original stereo WAV files separately in Chrome, set the export grid to 120 BPM and enabled the final-release estimate. Both results displayed C4, D4 and E4. We clicked the MIDI download after each conversion and checked the saved files with a separate Standard MIDI File parser. Published converter script

Each MIDI file has 74 bytes. Both downloads match byte for byte and have identical note-on and note-off events. They also match the separate local run of the same published code. The level comparison comes from the saved inputs and the local calculation of the channel average.

Programmed starts and measured ticks in both MIDI outputs
Note Source start (s) MIDI on (ticks) MIDI off (ticks) MIDI start (s)
C4 0.000 0 379 0.000
D4 0.500 379 847 0.395
E4 1.000 869 1337 0.905
Two identical rows of C4, D4 and E4 MIDI event ranges.
The pictured local outputs match both Chrome downloads at every tick.

Check timing even when all pitches survive

The MIDI files use 480 ticks per quarter note. At 120 BPM that gives 960 ticks per second. Programmed D4 began at sample 11025 or 0.500 seconds. The decoded MIDI event starts at tick 379, or 0.395 seconds in both files. The panning changes the signal level, and the shared timing error still calls for an edit.

Try soloing each channel in your editor before converting a quiet recording. Use a channel with a clear lead and compare the exported notes against the waveform. A real stereo take may have other instruments or opposing signal on the second channel. The matching exports here came from switching one exact channel off. See the companion test with opposite-polarity channels

Watch the hard-pan experiment

Watch on YouTube

Listen and download the test files

Download source hashes and every measured MIDI event

Questions about one-sided audio

Should I raise the level or extract the channel?

Editorial question. Inspect both channels first. If the right channel is silent and the left carries the melody, exporting the left channel directly keeps its sample values. A level adjustment after averaging can compensate for a clean half-level signal. It also affects any noise or competing sounds still present.

Do identical MIDI files mean panning makes no difference?

Editorial question. For these two files, the pitch and timing events matched after a half-level input to the same code. A different input may fall below a detection threshold or carry a competing source. Examine the result before editing or replacing the original take.

What if the tone changes?

The harmonic comparison keeps the programmed melody and changes the strength of the second harmonic at a matched saved peak.

Fundamental and second harmonic weights in two input WAVs.
The two takes share note windows and saved peak.
See the harmonic comparison