AudioToMidiNow Use the audio-to-MIDI converter

MIDI NOTE-BOUNDARY REPAIR

Why One Held Hum Becomes Two MIDI Notes

If the audio is one continuous hum and both MIDI events have the same pitch, replace them with one event that keeps the first note’s start and the second note’s end. If you hear a new attack or a real pause, keep two notes. A split in the piano roll is a clue to check, not proof that the transcription is wrong.

The useful question is not just “Are these pitches the same?” Compare the note boundary with the source: did the voice continue through it, or did the singer release and start again? Listen to a short loop around the boundary before editing.

Decide whether the boundary is real

  1. Loop the source around the split. Listen for a fresh consonant, breath, glottal onset, or silence. A clearly restarted sound is evidence for two notes even when their pitches match.
  2. Compare the MIDI events. Confirm both note numbers are the same, then note the first event’s start and the second event’s end. Check whether the gap is only in the MIDI or is also audible in the source.
  3. Choose the edit from the audio. For an uninterrupted held tone, make one event from the first start through the final end. For a real release and re-attack, leave the events separate. Do not merge merely to make the piano roll look tidy.
  4. Audition the repair against the recording. Keep the original audio beside the MIDI. If the merged note sustains through a silence that you can hear, undo it; if the source is continuous and the edited event now follows it, keep the repair.

Keep the endpoints, not the accidental middle edge

For two same-pitch events, label the first start A, the apparent split B, and the last release C. If the sound never restarted at B, the continuous candidate is A–C. The edit removes the internal MIDI boundary; it should not move A earlier or shorten C. This is an endpoint-preservation rule, not a command for every pair of touching notes.

What you hear at BSafer actionWhy
One uninterrupted held toneConsider one event from A to CThe internal edge may be a detection gap rather than a new performance.
A breath, silence, or fresh attackKeep two eventsThe boundary represents a real release and restart.
The audio is masked or unclearDo not merge yetUse a cleaner crop or listen at a slower rate before deciding.

A small frame-grouping simulation—not a vocal test

I reran this site's unchanged groupFrames function from dist/script.js on synthetic pitch-frame lists. The hop was 512 samples at 11,025 Hz (about 0.04644 seconds per frame). With 20 continuous same-pitch frames the function returned one note; with one omitted frame it still returned one. With two omitted frames it returned two pitch-69 events starting at 0.000 and 0.511 seconds. A separate two-semitone frame change returned two notes starting at 0.000 and 0.464 seconds.

In the inspected function, accepted frame indices stay in a group when the next is no more than two indices after the last and its pitch is within one semitone of the current group median. Under the synthetic inputs above, a larger index gap or pitch change begins another group. This does not show that a real hum contains silence, identify why a real detector missed frames, or measure transcription accuracy. Low level, uncertain pitch, and other signal conditions can affect which frames are accepted; this simulation did not test those causes.

Synthetic input to grouping logicReturned eventsWhat it tells us
20 continuous frames, pitch 691, start 0.000 sContinuous accepted frames stayed in one group.
One omitted frame, then pitch 691, start 0.000 sThis single-frame gap did not split this case.
Two omitted frames, then pitch 692, starts 0.000 and 0.511 sThe simulated accepted-frame gap produced a second group.
Pitch changes from 69 to 712, starts 0.000 and 0.464 sThe changed detected pitch produced a second group.

These are code-level synthetic observations, not recordings of a person humming and not a browser-to-MIDI accuracy benchmark. A MIDI event stores note timing and pitch, not the original vocal waveform; compare any edit with the saved audio that supplied the melody. The MIDI Association’s file overview describes MIDI files as event data for playback rather than recorded sound.

Quick repair checklist

For broader voice-to-MIDI input limits, see what the converted file keeps. For a general pass over note starts, ends, and pitch, use the MIDI export check.