Note Local

MP3 to MIDI notes too long? A release-tail test

Check the note-off positions and whether adjacent attacks became one long MIDI event before shortening everything. In our two fresh MP3 conversions, eight authored C4 attacks produced 8 MIDI notes with a 20 ms source release, but 7 with a 200 ms release. The latter included a 1.207291667-second event spanning another authored attack. These are measured examples, not a universal explanation for long notes.

Convert your MP3 · Inspect every parsed event

The short-release output has eight separated events; the long-release output has seven, including one longer event.
Original diagram from the supplied source schedule and actual MIDI files. Gray bars show the generated envelope support, not a measured perceptual threshold.

What changed in the source

On 15 November 2026 we authored two new six-second mono sources and ran each once through this site's online converter using its actual file picker and Convert button. We downloaded both original MIDI files and both conversion reports. No prior conversion output was reused.

Both inputs have eight starts at 0.300, 0.900, 1.500, 2.100, 2.700, 3.300, 3.900 and 4.500 seconds. Each tone holds for 250 ms from its start, including a 5 ms linear attack; a linear release then lasts either 20 or 200 ms. The source formula is 0.2 × envelope × (sin(2πfx) + 0.35 sin(4πfx) + 0.15 sin(6πfx)), with x measured since that start and f = 440 × 2^((60−69)/12) = 261.625565301 Hz. MIDI pitch 60 is the intended fundamental.

The first source gate ends at 0.550 s in both cases. Its envelope reaches zero at 0.570 or 0.750 s. With starts 600 ms apart, the authored zero-amplitude gaps are 600 − 250 − 20 = 330 ms and 600 − 250 − 200 = 150 ms. The source envelope duration is therefore 270 or 450 ms. These are synthetic amplitude envelopes, not a reverb effect, a sustain pedal or a real piano performance.

We generated 44,100 Hz mono 16-bit WAV, then encoded each separately with FFmpeg libmp3lame at 128 kbit/s. Both MP3s are 97,009 bytes and decoded by the browser as 6.000 seconds. The exact FFmpeg build, source hashes and pre-quantization peak of 0.23777125741951236 are preserved in the reference. We did not equalize RMS: changing a release also changes energy and the silent interval. The generated boundaries are not a perceptually measured note-off after MP3 encoding.

The actual files

SourceNotesMIDI bytesDownloads
release-20ms8150MP3 · WAV · MIDI · Report
release-200ms7134MP3 · WAV · MIDI · Report

Every exported note in both files is pitch 60. Both raw files contain two MTrk chunks and one note-bearing track. Runs finished at 04:22:11.172 and 04:22:43.724 UTC on 15 November. The short/long output SHA256 prefixes are 554cb58075121d45 and 72be0bf653497660; complete hashes are in the reports and results. Hashes identify these files; they do not establish musical accuracy.

Where the MIDI actually ends

The files use 480 PPQ and 120 BPM: seconds per tick = (60/120)/480 = 1/960. End tick is start tick plus duration ticks. No quantization was applied to the downloaded files.

release-20ms: every exported event

EventStart tickLength ticksEnd tickEnd seconds
12903015910.615625000
285831211701.218750000
3143831217501.822916667
4200731223192.415625000
5256532328883.008333333
6316731234793.623958333
7374630240484.216666667
8431630146174.809375000

release-200ms: every exported event

EventStart tickLength ticksEnd tickEnd seconds
12905688580.893750000
285858014381.497916667
3143857020082.091666667
42007115931663.297916667
5316758037473.903125000
6374657043164.495833333
7431646847844.983333333

For the first short-release event, (290 + 301)/960 = 0.615625 s. This is 65.625 ms after the authored gate end and 45.625 ms after the authored envelope end. For the first long-release event, (290 + 568)/960 = 0.893750 s: 343.750 ms after the gate end and 143.750 ms after the envelope end. These differences are relative to our generated source schedule, not a general latency calibration.

The fourth long-release event starts at tick 2007 and lasts 1159 ticks: 2007/960 = 2.090625 s and 1159/960 = 1.207291667 s, ending at 3166/960 = 3.297916667 s. It spans the next authored start at 2.700 s. The source had two distinct envelopes there, with the first ending at 2.550 s and the next beginning at 2.700 s. The output does not include a separate note-on near 2.700 s. That is a concrete boundary/count mismatch in this sample; it does not identify an internal model cause.

How to check your own long-note result

Loop a short source phrase and inspect the corresponding MIDI starts and ends. Decide whether the musical reference calls for a sustained note or a new attack. If the correct starts exist but their ends run long, edit those ends against that reference. If an attack is missing inside one long event, shortening the event alone cannot recreate the missing attack; check where a separate event belongs. Keep an unedited copy before changing anything.

Do not apply our 45.625 ms difference as a blanket trim. Later events and the other envelope condition differ. We did not test other instruments, reverb removal, threshold sweeps or repeated runs, and make no accuracy-rate, best-release or general model-causation claim. This page measures release boundaries, distinct from our earlier short-note quantization and repeated-note gap experiments.

Public guidance, credited separately

Jukeblocks' converter FAQ describes MIDI timing and note-length data as editable and says complex sources may need correction. Spotify's Basic Pitch demo recommends refining the MIDI in a DAW. CraftMusic's workflow and FAQ explicitly discusses editing note lengths and warns about reverberant or dense sources. These pages were read on 15 November 2026. Their shared advice is public information; it is not our exclusive material, and we did not benchmark their conversions.

Our added information is the exact paired source construction, the two newly downloaded exports, every start/duration/end tick, the specific crossed-attack observation, and the verification artifacts. The current ten-result reader-disclosure audit records these items separately from generic cleanup advice. We do not substitute a word-count ratio for information increment.

Reproduce and check the evidence

Download the source reference, input generator, all parsed events and verification script, plus the table's audio, MIDI and original reports. Run node generate-inputs.mjs PATH_TO_FFMPEG in an empty folder to generate public/examples/release-tail/. The reference identifies the FFmpeg build; another build may produce different encoded bytes.

For a fresh observation, choose each MP3 in the online tool, convert, and download both MIDI and report. The measured runs used Basic Pitch 1.0.1 with TensorFlow.js WASM 3.21.0, onsetThreshold 0.5, frameThreshold 0.3, minNoteFrames 11 and modelSampleRate 22,050 Hz. Reports retain actual load requests, timing and hashes. New runs are observations, not a promise of identical bytes.

Place the supplied files beside the verification script, install @tonejs/midi version 2.0.28 and midi-file version 1.2.4, then run node verify-results.mjs. It checks both input and output hashes, byte counts, dates, note counts and every independently parsed pitch/time/duration/velocity against the original report and saved results.

See the measured boundaries

Watch the measured comparison. The narration summarizes the same evidence; it is not a new conversion or an originality check.

Does a long MIDI note prove the source had sustain pedal?

No. These inputs contain no pedal data or piano performance. Their long event is an observed transcription output, not evidence of a pedal.

Can quantizing fix the missing attack?

Moving existing notes does not itself supply the separate event absent near 2.700 s in this file. Check the intended phrase before splitting or inserting a note.

Does this test show reverb causes long notes?

No. We changed a synthetic linear amplitude release and did not apply reverb or isolate a model mechanism.