Audio to MIDI for a Melody Over a Kick Drum

To get the lead as MIDI, convert the clearest version of the melody you have. In our test, adding three kick hits kept the same three notes and all of their timings. Both MIDI downloads match byte for byte. This pair used one synthetic kick at one level under one melody.

Three kicks that start during the lead notes

The two PCM16 WAVs contain the same A3, D4 and E4 lead. We added a low sweep to the second file at about 0.25, 0.75, 1.25 seconds. Each hit occupies about 184 ms, starting at 112 Hz and falling as it decays. The first hit starts during A3 and extends into the gap before D4. The other two use the same stored sweep.

We subtracted the two saved WAVs sample by sample. The difference matches the three computed kicks, with 12126 changed samples across the three hit windows and zero changes outside them. Both files retain the same length and sample rate. This gives us one known change to compare with the exported note events.

Three orange kick windows start during A3, D4 and E4 in the mixed WAV.
The green bars show the programmed melody. Orange shows the added kick windows.

Both downloads contain the same MIDI events

We selected each WAV in Chrome and exported at 120 BPM with the final-release estimate enabled. Each file contains 74 bytes, one MIDI track and A3, D4 and E4. Reading both files independently gave the same events. The kick added no note in this pair.

WAV cues and shared MIDI events, in seconds
NoteWAV cueMIDI startMIDI end
A30.0000.0000.395
D40.5000.3950.882
E41.0000.9051.393

Both files place D4 about 105 ms ahead of its programmed 0.500-second cue. Its start event is at tick 379. At 480 ticks per quarter and 120 quarters per minute, dividing a tick position by 960 gives seconds. Check the early notes against the recording before using the MIDI as a timing reference.

A3, D4 and E4 appear with the same boundaries in both MIDI downloads.
The two MIDI outputs have the same notes and timings. The WAV row shows where each lead note was programmed.

Listen and download

Download file hashes and exact note events

Watch the test

Hear the clean WAV and the version with three kick hits, then follow the shared MIDI note timings.

Watch the test on YouTube

Questions about a kick under a melody

Will the kick itself appear as MIDI notes?

Editorial question. Check the returned track against the audible rhythm. In this pair all three kick hits are audible in the mixed WAV, while the MIDI contains the three lead pitches. If you want to edit a drum pattern, keep a separate rhythm reference.

How should I check my own melody over drums?

Editorial question. Save the same short phrase with and without the drums if you have separate tracks. Export both at the same MIDI tempo. Compare pitches and event starts, then listen to the original to decide where an event needs moving.

What if the source sounds muffled?

Hear the same lead after a low-pass filter and compare its measured level with its exported MIDI events.

The higher notes lose more level after the low-pass.
The original lead and the filtered version use identical note cues.
See the muffled melody experiment