Audio to MIDI for a Melody With a Brief Dropout

Keep the original WAV handy if the break inside a note matters. In our controlled pair, about 110 milliseconds of silence inside D4 still produced a single held D4 in the MIDI. Both downloads were byte-for-byte identical. This test uses one synthetic melody and one position for the break.

Where the signal drops out

Both WAVs contain A3, D4 and E4 at the same programmed positions. D4 is present from 0.500 to 0.860 seconds in the original. In a copy, we zeroed the samples from frame 13,451 up to frame 15,876, excluding the latter. At 22,050 samples per second, the cut lasts (15,876 − 13,451) ÷ 22,050 seconds, or about 110 milliseconds. Sound returns at 0.720 seconds inside the same programmed D4.

Independent reading of both stored files found exactly 2425 altered samples and identical data outside the cut. The complete 33,075-frame files both last 1.5 seconds. We left the other notes and the file length fixed.

The second WAV goes silent inside D4 while its other note windows remain the same.
The amber segment shows where the copied WAV was zeroed. Both rows use the same scale.

What the actual MIDI keeps

Chrome downloaded two 74-byte MIDI files using the same 120 BPM setting and final-release estimation enabled. A separate MIDI reader found three notes in each file with the same start and end events. D4 runs from tick 379 to 847. At 480 ticks per quarter note and 120 BPM, seconds equal ticks divided by 960. Its approximate duration is 0.488 seconds, spanning the full 0.610–0.720 second cut.

The silent section is audible in the second WAV. Playing either MIDI with a sustained instrument will play a held D4 through that interval. If you need the break for phrasing, compare the recording and MIDI on the same timeline before changing the note events.

Same note events in both MIDI files
NoteTicksSeconds
A30–3790.000–0.395
D4379–8470.395–0.882
E4869–13370.905–1.393
A single D4 MIDI event crosses the entire WAV dropout in both exports.
A close view of the matching D4 events. Amber marks the time of the WAV dropout.

Listen and download

Download the exact note events and file hashes

Questions about gaps in a held note

Should I split the D4 in my MIDI editor?

Editorial question. Split it if you want a distinct note-off and a second attack. Align the original WAV and MIDI, then match the note-off and next note-on to the beginning and end of the silence. Play the edit with your chosen instrument to hear how its release affects the gap.

Will a longer dropout produce two MIDI notes?

Editorial question. Convert the affected phrase and inspect the number of events for that pitch. This 110-millisecond edit gives one measured point. A longer gap, a different pitch or a quieter source needs its own check.