Why does MP3 to MIDI add extra repeated notes?
An MP3-to-MIDI converter can keep returning the intended pitch while producing too many separate note events. Check the note starts and ends against the recording before deleting duplicates. In our real browser test, three clips authored with eight repeated C4 attacks returned 8, 15 and 8 MIDI notes. All output pitches were 60; the middle result shows why pitch alone does not settle repeated-note transcription.
Try your MP3 · Read the full measured results
Three MP3 inputs, eight authored attacks each
We generated three six-second mono clips on 12 November 2026. Every clip contains eight repetitions of MIDI pitch 60, corresponding to 261.6255653005986 Hz under the generator's A4 = 440 Hz tuning. Each authored note lasts 250 ms, with a 5 ms attack and 20 ms release. The first note starts at 0.300 seconds.
Only the intended gap between note envelopes changes: 30, 120 or 350 ms. The waveform combines a fundamental with second- and third-harmonic weights of 0.35 and 0.15, scaled by 0.35. This is an authored harmonic tone, not a recording of a piano or guitar. All clips were written as 44,100 Hz, 16-bit mono WAV, then encoded to mono MP3 using FFmpeg's libmp3lame -b:a 128k. Each MP3 is 97,009 bytes; the browser decoded each as 6.000 seconds.
The gap values describe the waveform we authored before encoding. We have not established that every sample in those gaps remains exactly zero after MP3 encoding and decoding. That distinction matters when interpreting the extra events: this experiment does not isolate a codec effect from model or note-extraction behavior.
Actual production conversions
We selected each MP3 in the live Note Local converter, ran one conversion per input, and downloaded its MIDI and conversion report. We then reopened the downloaded MIDI with @tonejs/midi 2.0.28, checked its SHA-256 against the browser report and compared every decoded event with the saved report. These outputs came from the converter, rather than being authored as MIDI fixtures.
| Authored gap | Authored attacks | Decoded MIDI notes | Output pitches | Downloads |
|---|---|---|---|---|
| 30 ms | 8 | 8 | 60 | MP3 · MIDI · Report |
| 120 ms | 8 | 15 | 60 | MP3 · MIDI · Report |
| 350 ms | 8 | 8 | 60 | MP3 · MIDI · Report |
The counts are not monotonic: increasing the gap from 30 to 120 ms raised this output count from 8 to 15; increasing it again to 350 ms returned 8. These three observations do not establish a universal safe gap, an optimum setting or a transcription-accuracy percentage. Even the two eight-note outputs still require a timing review.
Inspect the 120 ms case
Its first three authored note intervals are 0.300–0.550, 0.670–0.920 and 1.040–1.290 seconds. Its downloaded MIDI begins with the following six events, all at pitch 60:
| Event | Pitch | Start | End | Length |
|---|---|---|---|---|
| 1 | 60 | 0.290625 | 0.522917 | 0.232292 |
| 2 | 60 | 0.522917 | 0.662500 | 0.139583 |
| 3 | 60 | 0.661458 | 0.893750 | 0.232292 |
| 4 | 60 | 0.893750 | 1.033333 | 0.139583 |
| 5 | 60 | 1.033333 | 1.265625 | 0.232292 |
| 6 | 60 | 1.265625 | 1.405208 | 0.139583 |
The second detected event starts at 0.522917 and ends at 0.662500 seconds. Our first authored note ends at 0.550 and the next starts at 0.670. That output event therefore extends through 112.5 ms of the intended 120 ms gap: (min(0.6625, 0.670) − max(0.522916…, 0.550)) × 1,000 = 112.5. This compares against the authored envelope schedule, not a claim of perfect silence in decoded MP3 samples.
In this controlled sequence, fifteen output events represent seven more events than the eight authored attacks. That count difference does not assign every event a clinical-style correctness label or yield an accuracy score. The downloadable full event lists let you inspect where the starts and ends occur, including small overlaps. We have not identified which part of the processing pipeline caused them.
Settings held fixed
The browser reports @spotify/basic-pitch 1.0.1 with TensorFlow.js WASM 3.21.0. All three runs used onsetThreshold 0.5, frameThreshold 0.3, minNoteFrames 11 and modelSampleRate 22,050 Hz. The input browser sample rate was 44,100 Hz. The model URL, resource responses, input hash, output hash, event list and run timestamp are retained in each original conversion report.
We did not sweep thresholds, repeat each condition many times, compare products or convert the WAV controls in this experiment. We therefore cannot attribute the pattern specifically to MP3 compression, recommend a different threshold or rank a converter. A new model, waveform, instrument or recording can give different results.
Credited public guidance
Spotify's Basic Pitch documentation says the model works best on one instrument at a time and documents its model-to-note workflow. Jukeblocks advises using simple recordings and reviewing difficult transcriptions; AI-MIDI recommends a clearly audible instrument and reviewing detected parts. Those are public recommendations, credited here. They do not constitute tests we ran on those services.
Our contribution is narrower and reproducible: the three owned MP3 inputs, their actual Note Local MIDI outputs and the complete 8/15/8 event comparison. A simple source can still need event-level inspection, as this particular 120 ms fixture demonstrates. This result is not a general claim that adding space always fixes or always worsens repeated-note conversion.
What to do with extra repeated notes in your MIDI
- Keep the original MP3 and untouched MIDI. Loop the affected phrase and compare the audible attacks with the note starts.
- Look at pitch and duration together. Several consecutive events at the same pitch can be either genuine repetitions or a transcription split; their pitch labels alone do not decide which.
- Check the gaps against the recording before joining or deleting events. Preserve intentional repeated attacks and edit only a verified mismatch.
- If a problem repeats, test a short controlled clip and save the conversion report. Change one setting or preprocessing step at a time and compare the new actual events; this page does not establish a preferred threshold.
Reproduce this MP3-to-MIDI test
Download the MP3s and MIDI files from the table, plus input-reference.json and results.json. The audio generator creates the source WAVs and MP3s with Node.js and FFmpeg. Run node generate-audio.mjs PATH_TO_FFMPEG from a working directory; it writes files under public/examples/repeated-notes/. Our encoder build was FFmpeg N-126374-g089a48eb36-20260831; another encoder build can change the compressed bytes.
Select each generated MP3 in the converter, click Convert to MIDI, then download both outputs. To verify the saved files supplied with this page, place the three MP3s, MIDI files, original conversion reports and results.json beside verify-results.mjs, install @tonejs/midi 2.0.28 there and run node verify-results.mjs. It checks hashes and every reported note event. This verifies our archived run; future conversions remain new observations to record.
Did the middle file contain fifteen authored notes?
No. Its generator schedule contains eight note envelopes. The live conversion produced fifteen decoded MIDI events, all at pitch 60.
Does the result prove MP3 compression caused the extra notes?
No. We did not run a WAV-conversion control here or isolate encoder, model and extraction stages. The MP3 inputs and measured outputs are available for further testing.
Should I increase the gap to 350 ms?
This test does not establish a universal gap recommendation. Its counts were 8, 15 and 8. Review your actual phrase rather than applying a number from one synthetic source.