YouTube-to-MIDI DC offset test

Can DC offset add false YouTube to MIDI notes?

Yes, in this controlled test. Adding a constant +0.15 offset raised the MIDI event count from 6 to 10, while +0.30 raised it to 12. All four intended pitches remained, but the offset versions added short low notes near the end.

Convert a local audio file

These results describe three synthetic files and this converter. They do not define a universal DC-offset threshold.

What we tested

We generated a 22,050 Hz, 16-bit mono WAV containing isolated C4, E4, G4, and C5 sine tones. Each note lasted 0.900 seconds with a 0.300-second gap. The centered waveform ranged from -0.55 to +0.55.

We made two copies by adding a constant value to every sample. The +0.15 file ranged from -0.40 to +0.70, and the +0.30 file ranged from -0.25 to +0.85. No file clipped, and pitch, timing, amplitude, envelopes, and sample rate otherwise stayed fixed. We converted all three at the site's default controls without changing its logic.

Measured meanMIDI eventsIntended pitches retainedAdded output
0.006C4, E4, G4, C5None after the final C5
+0.1510C4, E4, G4, C5A0, A-sharp 0, F-sharp 1, G-sharp 1
+0.3012C4, E4, G4, C5One early C4 plus five low tail notes

The intended notes survived

Every output contained the four designed pitches. Their main events stayed close: C4 began at 0.255 seconds in all files, E4 at 1.451 or 1.462 seconds, G4 at 2.648 seconds, and C5 at 3.856 or 3.868 seconds.

Main-note velocities also stayed within a narrow range. The centered file produced 83, 83, 79, and 79; the +0.30 file produced 81, 83, 79, and 77. The clearest difference was not a lost intended pitch but additional short events.

The offset created a low-note tail cluster

The +0.15 file added four notes beginning at 4.925 seconds: A0, A-sharp 0, F-sharp 1, and G-sharp 1. Their durations ranged from 0.093 to 0.151 seconds. The +0.30 file added those pitches plus D-sharp 2 at the same boundary, and it also added a 0.070-second C4 fragment before the designed first note.

The test does not establish why the model produced those exact pitches. It does show that a constant sample bias can change this converter's event output even when the audible sine frequencies are unchanged.

How to check a source for DC offset

  1. Inspect the waveform center. Silence and symmetric passages should sit around the zero line rather than consistently above or below it.
  2. Measure the sample mean. A value far from zero is evidence of a constant bias, although the appropriate tolerance depends on the source.
  3. Make a corrected copy. Use a DC-offset removal or high-pass operation, then keep the original for comparison.
  4. Compare the MIDI drafts. Check intended pitches, short edge fragments, low-note clusters, timing, and velocities.

What this test does not prove

It does not define a safe offset limit, recommend a high-pass frequency, or test mastered music, lossy streaming audio, mixed instruments, or clipped samples. It records the current tool's output for three controlled local WAV 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