Audio → MIDI

Audio to MIDI Converter

MIDI player: what playing a MIDI file back actually shows

The short answer: a MIDI player does not play a recording. It executes a list of note events — a pitch number, a start time, an end time and a velocity — and synthesizes sound from those. The instrument, the timbre, the words and the original waveform are not in the file at all. This site’s own writer makes that measurable: a four-note C4 D4 E4 G4 export is 89 bytes holding 4 note-on / 4 note-off events, one tempo, one 4/4 time signature, two end-of-track markers, and zero program-change, zero pitch-bend and zero text or lyric events, all on one channel. What you hear is the player’s choice of sound, not the recording’s. To find out what playback actually preserves, we rebuilt the exact Play-preview voice from this site’s app.js into a buffer and fed it back into the same detector. Four notes came back as the same four pitches, but velocity fell from 113 to 82.3, and a 0.20 s note that the detector had found was gone after one playback pass. So: use a player to check pitches, timing and whether a note exists at all — never to judge how the original sounded. The conversion and the preview both run entirely in your browser, with no upload and no account.

1. What the file actually hands the player

The most useful way to think about a MIDI player is as an interpreter of a very short instruction list. We built three exports from known note lists and parsed each byte back into an event census with a running-status-aware reader, so nothing below is inferred from a description of the format:

Event census of three real exports from this site’s midi.js at 120 BPM.
Notes in listFile sizeNote-onNote-offMeta eventsChannelsProgram changePitch bend
053 B000x51 ×1, 0x58 ×1, 0x2F ×2000
162 B110x51 ×1, 0x58 ×1, 0x2F ×2100
489 B440x51 ×1, 0x58 ×1, 0x2F ×2100

Every file is format 1 with two tracks and 480 ticks per quarter note. Even the zero-note export is a valid 53-byte Standard MIDI File: a player opening it will simply play silence. Notice what is absent from all three rows. There is no 0xC0 program-change, so no instrument is specified; no 0xE0 pitch-bend, so no glide or vibrato; and no 0x01 text, 0x05 lyric, 0x03 track-name or 0x59 key-signature event, so no words and no named key. A previous byte-level check on a two-note export found exactly 71 bytes and only those three meta types.

That absence is the whole answer to “why does it sound different in every player?”. The player is not failing to read the instrument; there is no instrument byte to read. The same 89 bytes played through a piano patch, a guitar patch or a plain oscillator give three different sounds from identical data. What is actually inside a MIDI file walks through the rest of the byte layout, and how big an audio-to-MIDI file can get explains why the size depends on note count rather than audio length.

What a general-purpose MIDI player adds on top of these bytes

A Standard MIDI File player reads the header, expands the delta-time values into ticks, applies the tempo event to turn ticks into seconds, and routes each note-on to a voice of its own choosing — a soundfont, a built-in synth or an external instrument. None of that routing is stored in the file. Pitch, start, end and velocity are the four things the file supplies; everything else is the player’s decision. This is a statement about the file structure, not a recommendation of any particular product.

2. There are two playback clocks, and they do not agree

This is the part most people miss, and it is specific to this converter. The on-page Play preview schedules one oscillator per detected note at the note’s raw analysis time. The .mid you download instead writes times as integer ticks. Both describe the same four notes, but they run on different grids:

We computed the deviation for all four onsets at six tempos. It is small, but it is real, and it changes with the BPM you typed even though the audible note positions do not:

Onset deviation between the frame-grid preview and the tick-grid file, four known notes.
Typed BPMTicks for the four onsetsLargest deviationMean deviation
600, 245, 496, 7470.5130 ms0.2452 ms
900, 368, 744, 11200.2724 ms0.1247 ms
1200, 490, 992, 14940.5130 ms0.2452 ms
1400, 572, 1157, 17420.3814 ms0.1900 ms
1730, 707, 1430, 21530.1003 ms0.0378 ms
2000, 817, 1653, 24890.2140 ms0.1222 ms

The tempo itself changes only the 0xFF 51 event and the tick numbers; the ticks and the tempo scale together, so the note still lands at the same moment. That is the same result as the dedicated measurement in how accurate the tempo a converter writes is. If you want a tempo and key read from the audio rather than typed in, the BPM finder is the separate page that does that. The audio to notes page compares the seven-column note list with the tick-rounded file side by side.

3. A player can address 128 pitches; this file can only use 75

A Standard MIDI File note number runs from 0 to 127, which spans 8.176 Hz to 12 543.854 Hz. The pitch detector behind this converter searches only 55–1800 Hz in monophonic mode and keeps polyphonic spectral peaks up to 4000 Hz. Converting those three boundaries into note numbers gives a hard ceiling on what any player will ever be asked to play from a file made here:

Addressable range of a MIDI player versus the range this writer can emit.
BoundaryFrequencyNote numberWhere it comes from
Player’s lowest8.176 Hz0MIDI note number range
Detector floor55.00 Hz33 (A1)F_MIN = 55 in dsp.js
Monophonic ceiling1800 Hz93 (A6 is 1760 Hz)F_MAX = 1800
Polyphonic peak ceiling4000 Hz107 (3951.07 Hz)P_MAX = 4000
Player’s highest12 543.854 Hz127MIDI note number range

So the widest possible file from this converter occupies note numbers 33–107, or 75 of the 128 a player understands — 58.6% of its range. In monophonic mode it is 33–93, just 61 note numbers. A player is not hiding your sub-bass or your top octave: those notes were never written. The low end is arithmetic rather than a setting, as the bass line extraction and drum transcription limits pages show.

4. The round trip: what one pass of playback actually preserves

This is the measurement that separates “playing a file” from “hearing a recording”. The site’s Play button builds one triangle oscillator per detected note with a 12 ms linear attack, a gain ceiling of (velocity / 127) × 0.28, an exponential release down to a fixed 0.0001, and an 80 ms lead-in. We re-implemented that voice exactly, rendered the four known note lists into samples, and ran those samples back through the same dsp.js detector. The site itself never records its preview; this buffer exists only for the measurement.

First conversion from audio, then a second conversion of the played-back audio.
ClipPass 1 notesPass 1 pitchesPass 1 velocityPass 2 notesPass 2 pitchesPass 2 velocity
C4 D4 E4 G4, 0.5 s each460 62 64 67113 ×4460 62 64 6782.3 mean
C major triad, 1 s, poly760 64 67 79 60 64 67115.1 mean664 67 60 64 67 6093.0 mean
A1 pure 55 Hz, 1 s633 ×6113 ×60——
Eight fast notes, 0.14 s860 62 64 67 69 67 64 62112 ×80——

Three things are worth reading out of that table. First, pitch survives: the clean melody came back as the same four note numbers. Second, level does not: velocity 113 became a mean of 82.3, because the preview plays at a fixed quiet ceiling and then decays, so the second conversion hears a quieter signal. Third, the player faithfully reproduces the detector’s mistakes. The triad’s first pass already contained a spurious G5 (note 79) and a duplicate set of the three chord tones; those events are in the file, so they are what gets played. A player has no way to know which notes were real.

The zero rows matter too. A 55 Hz tone that produced six low note objects on the first pass produced none on the second, and the eight fast notes vanished entirely. The cause is the preview’s own envelope, not the MIDI format. With a ceiling of 0.2491 and a release to 0.0001 (about −80 dBFS), the level at the midpoint of a note is already far below its own peak:

Level at the midpoint of a played note, computed from the exact ramps in app.js.
Note lengthPeak gainMidpoint gainMidpoint below peak
0.05 s0.24910.017159−23.24 dB
0.14 s0.24910.007202−30.78 dB
0.43 s0.24910.005584−32.99 dB
1.00 s0.24910.005234−33.55 dB

By halfway through a 0.14 s note the voice is 30.78 dB down. That is why a preview is a note-and-timing check, not an audition. MIDI to WAV measures the same voice’s harmonic content and fixed −11.06 dBFS ceiling, and explains why it is wired to the speakers rather than to a file.

5. The shortest note that survives a playback pass

To pin the short-note boundary down rather than describe it, we swept one C4 tone from 0.05 s to 1.00 s and, for each length, compared two renderings of the same detected note: the site’s real decaying preview voice, and a control voice that simply holds its level flat with the same 12 ms attack. Both were converted a second time.

Note count after the first conversion, after the decaying preview, and after a flat-sustain control.
Note lengthFirst conversionAfter preview voiceAfter flat sustain
0.05 s000
0.08 s000
0.12 s000
0.14 s000
0.20 s101
0.30 s111
0.43 s111
0.50 s111
1.00 s323

The 0.05–0.14 s rows are the detector’s own floor: those notes never appeared in the first place, so no player can bring them back. The interesting row is 0.20 s. One note was detected, a flat-sustain player returned one note, but this site’s preview returned zero — the exponential release erased a note the detector had already found. The shortest length that survived the real preview in this sweep is 0.30 s. At 1.00 s the first conversion split one sustained tone into three objects and the preview round trip kept two, while the flat control kept all three.

This is a measured property of this preview’s envelope, not of MIDI players in general. A piano patch in a sequencer sustains differently and would give a different second pass. The general rule stands regardless: whatever the player adds at playback is new information, and a conversion of that playback is a conversion of the player, not of your recording. If short or missing notes are your actual problem, start with the four-step order for fixing dropped notes and the mono versus poly decision instead of judging the preview.

6. Three decisions, and when to walk away

Most searches for a MIDI player are really one of three different jobs. Each line below carries one number from the measurements above, so you can tell which job you have.

Stay on this page and use the Play preview. You have just converted a recording and want to know whether the right notes and timing came back. The preview plays exactly the detected note list — one oscillator per note, 12 ms attack, 4 note-on events in an 89-byte file — with nothing between you and the note data. It is the fastest way to spot an octave error or a chord that collapsed.

Go open a dedicated MIDI player or your DAW. You want a piano, a guitar, or any timbre other than a triangle wave. The file contains zero program-change events, so the sound is entirely the player’s choice; the same 89 bytes will sound different in every one. If you then need an audio file of that performance, MIDI to MP3 and MIDI to WAV lay out the render step this site does not do. Cleaning up a converted MIDI covers the five edits worth making before you audition it.

Go back to the recording; no player can help. You need the sung words, the original dynamics, a glide, or the actual waveform. There are zero lyric or text events in the file, and one playback round trip already cost 31 velocity steps (113 → 82.3). A player cannot reconstruct what was never written. See why lyrics do not become notes, what pitch bend detection would add, and why converted MIDI sounds flat for the three separate reasons.

One honest boundary: you cannot drop a .mid into this converter to hear it. The input path hands the file to the browser’s audio decoder, which needs samples; a MIDI file has none, so it fails to decode. If you already hold a .mid and want to listen, that is the dedicated-player case above. If you hold a recording and want notes, you are in the right place — MP3 to MIDI and how to make a MIDI file cover the other direction.

7. What playback can never show you

The list below is short because the reason is always the same: the event is not in the file. Each item is a byte-level fact about this writer, not a limitation of any particular player.

Questions people actually ask

Is a MIDI player playing my recording back?

No. It is executing note events. A four-note export here is 89 bytes with 4 note-on and 4 note-off events and no samples at all. The sound you hear is synthesized by the player from those events.

Can I drop a .mid into this converter to hear it?

No. The input is decoded by the browser’s audio decoder, which expects samples, and a MIDI file holds instructions instead. Use a dedicated MIDI player or a DAW for that job; this page is for the opposite direction, audio to notes.

Why does the same file sound different in different players?

Because the instrument is the player’s decision. The file carries zero program-change events, so nothing in those 89 bytes says piano, guitar or anything else. Pitch, timing, duration and velocity are the only things the file supplies.

Does the BPM I typed change when the notes play?

No. The tempo event and the tick numbers scale together. At 120 BPM the onset at 0.5108 s becomes tick 490 and plays at 0.510417 s, a deviation of 0.38 ms caused by rounding, and BPM 60 through 200 changed the largest deviation only from 0.1003 ms to 0.5130 ms across our four-note test. Tempo accuracy has the full table.

Why do short notes disappear when I play the preview and convert again?

Because of the preview’s release, not the MIDI format. Its gain falls exponentially to 0.0001, so at the midpoint of a 0.14 s note it is already 30.78 dB below its own peak. In a duration sweep a 0.20 s note that was detected came back as zero after the preview, while a flat-sustain control returned one; 0.30 s was the shortest length that survived.

Will a MIDI player show me the words or the key of the song?

No. This writer emits no lyric, text, track-name or key-signature meta events — a two-note export starting at zero is 71 bytes containing only tempo, time signature and two end-of-track markers. Lyrics and key detection are separate pages.

Why will a player never give me notes below A1 or above the top of the piano?

Because they were never written. A player addresses 128 note numbers from 8.176 Hz to 12 543.854 Hz, but this detector’s 55–1800 Hz search and 4000 Hz polyphonic peak ceiling confine its output to notes 33–107 — 75 of the 128, or 58.6%.

Is the Play preview a recording I can save?

No. It is one triangle oscillator per note wired to your speakers, and closing it tears down the audio context. The only two downloads on this site are the .mid and the .csv. MIDI to WAV measures that voice and explains the missing encoder step.

Related guides