YouTube-to-MIDI compression test

Does dynamic range compression change YouTube to MIDI?

Yes, in this controlled test it changed both note boundaries and MIDI velocities. The uncompressed source produced 4 events, light compression produced 5, and heavy compression produced 8. Every version still retained C4, E4, G4, and C5.

Convert a local audio file

These results describe one synthetic sequence, two compressor settings, and this converter. They do not prove that compression improves real music.

What we tested

We generated a 22,050 Hz, 16-bit mono WAV with isolated C4, E4, G4, and C5 sine tones. Each note lasted 0.900 seconds and the source amplitudes were deliberately different: 0.12, 0.32, 0.68, and 0.18 peak.

We kept one file unchanged. A light compressor used a 0.30 linear threshold, 3:1 ratio, and 1.3 times makeup gain. A heavy compressor used a 0.12 threshold, 8:1 ratio, and 2.5 times makeup gain. Both used a 5 ms attack and 80 ms release. We then ran all three files through the current local converter at its default controls without changing its logic.

Source conditionMIDI eventsIntended pitches retainedMIDI size
Uncompressed4C4, E4, G4, C589 bytes
Light compression5C4, E4, G4, C597 bytes
Heavy compression8C4, E4, G4, C5121 bytes

Compression narrowed the measured note levels

Before compression, the quietest note measured 0.08485 RMS and the loudest measured 0.48087 RMS. With heavy compression, those four note levels occupied a much smaller range, from 0.21213 to 0.28775 RMS.

The MIDI velocities did not mirror the RMS values one-for-one. The uncompressed notes used velocities 65, 74, 80, and 60. The main events in the heavily compressed file used 79, 106, 104, and 103. This converter estimates velocity as part of its transcription, so makeup gain, attacks, and the model's segmentation all affect the exported numbers.

More even audio produced more MIDI fragments here

The uncompressed file returned one event for each intended note. Light compression added a 0.070-second G4 tail fragment. Heavy compression split every intended note, returning eight total events; four of the added fragments lasted between 0.070 and 0.081 seconds.

That result is a warning against treating compression as an automatic cleanup step. Making quiet notes louder can help them cross a detector boundary, but the changed attack, release, and gain movement can also create extra event boundaries.

How to compare compressed and uncompressed audio

  1. Keep an unprocessed copy. Change only the compressor for the comparison.
  2. Use one short passage. Include both quiet and loud notes you can identify.
  3. Compare pitches and boundaries. Check for missing notes, short duplicates, shifted starts, and changed ends.
  4. Inspect velocity separately. A narrower audio level range does not guarantee a narrower MIDI velocity range.

What this test does not prove

It does not define an ideal threshold, ratio, attack, release, or makeup gain. It does not test a limiter, multiband compressor, mastered song, live instrument, full mix, or streamed video audio. It records this tool's current output for three controlled local files.

After the note draft: MIDI Agent is a text-to-MIDI AI music plugin for a DAW that can help develop editable melody, chord, drum, and bassline parts from prompts.

Explore MIDI Agent