Audio → MIDI

Audio to MIDI Converter

What is a MIDI file?

A MIDI file is not a recording of sound — it is a short list of time-stamped instructions that tells an instrument or a player which notes to start, which notes to stop, how hard to play them, and when. The sound is made later, by whatever opens the file. On this converter, a 2.25-second clip of four notes (C4, D4, E4, G4) becomes 89 bytes holding 4 note-on messages, 4 note-off messages, one tempo, one time signature and two end-of-track markers — and no audio samples at all. That is the whole idea: the file carries a performance description, not a performance. If you have an audio file and want that description, convert it here in the browser, then read on for exactly what the file you get is, what “MIDI file format” means, what a track is, what these files are used for, and how to open one.

The definition, and the three things it is not

A Standard MIDI File (SMF) is a plain binary file of events. Each event says something like “at this time, start note 60 at velocity 113” or “at this time, set the tempo”. Nothing in the file describes a waveform. Three distinctions follow directly, and they are the ones that cause most of the confusion:

We tested the first claim with this site’s own analyser rather than just asserting it. We took the 89 bytes of the real .mid export, reinterpreted them as 16-bit PCM samples, and fed them back through the very same pitch detector that produced the file. The detector saw one analysis frame and returned 0 notes. The original audio, through the identical detector with identical settings, returned 4 notes. A file of instructions does not survive being treated as a file of samples.

The “no audio in it” test, run on this site’s own DSP with identical settings.
Input to the analyserBytesSamples / durationFramesNotes found
The real 2.25 s four-note WAV99 22649 613 / 2.25 s—4
The 89-byte .mid misread as PCM168944 / 0.002 s10

The three chunks in that 89-byte file are tagged MThd, MTrk, MTrk — a header and two tracks. Not one chunk holds waveform data, and the file contains no text, lyric or track-name event: apart from the three chunk tags, nothing in it is meant to be read as text.

What “MIDI file format” actually means

The word format here does not mean a codec like MP3 or FLAC. It means the Standard MIDI File container: a fixed header chunk, followed by one or more track chunks, each with a type tag, a length, and a stream of time-stamped events. The header of every file this converter writes is exactly 14 bytes:

4D 54 68 64   00 00 00 06   00 01   00 02   01 E0
“MThd” · header length 6 · format 1 · 2 tracks · 480 ticks per quarter note

Those last six bytes are the whole declaration: which SMF type the file is, how many track chunks follow, and the timing resolution (480 = 0x01E0 ticks per quarter note). Type 0 keeps everything in one track; type 1 uses simultaneously played tracks, which is what this site writes; type 2 holds independent patterns, each with its own timing.

Rather than describe that from a specification, we built the same four notes three ways with this site’s own writer and parsed each result back:

One four-note melody, three SMF types; all built from the same note events at 480 TPQ and parsed back with the same reader.
SMF typeWhat the tracks holdBytesTracksNote-on / offNote events
0Single track: tempo, time signature and all notes together7714 / 4Byte-identical to type 1’s notes
1Track 1 tempo map, track 2 notes — this site writes this8924 / 4The real export
2Two independent patterns, each carrying its own tempo map and its own copy of the four notes14028 / 8Doubled, because each pattern is self-contained

The type 0 file is 12 bytes smaller and carries exactly the same note events. Our type 2 example is larger because we built two self-contained patterns from the same four notes, so each one repeats the tempo map and the note list instead of sharing them — that is a property of this constructed example, not a rule that every type 2 file doubles its notes. In other words, the type is a statement about how the chunks relate to each other, not a different encoding of the music.

One more measurement makes that concrete. We took the real 89-byte type 1 file and changed only the two-byte format word from 00 01 to 00 00. The file stayed 89 bytes, the parser still found 2 tracks, and every one of the 4 note-on and 4 note-off events was byte-identical. Two header bytes changed; the music did not. (That patched file is not spec-valid — type 0 declares a single track — so this is a demonstration of where the label lives, not a file we would ship.) What is actually inside a MIDI file walks the same header field by field; the point here is simply that “format” names a container rule.

What a MIDI track is: a container, not a voice

This is the question that the word track makes misleading. People arrive from a DAW where a track is a singer, a guitar or a drum kit. In an SMF, a track is just a container holding a time-ordered stream of events. It has no name, no instrument and no fixed musical role unless someone puts those events inside it. The two tracks of a real export from this site show that plainly:

Census of the two track chunks in the real 89-byte export, parsed event by event.
ChunkData bytesTotal with tagNote-onNote-offMeta eventsNotes
MThd header61400——
Track 1 — the tempo map192700tempo (0x51), time signature (0x58), end of track (0x2F)none
Track 2 — the notes404844end of track (0x2F)60, 62, 64, 67

Track 1 contains zero notes. It exists to carry the tempo and time signature. So on this site, “two tracks” does not mean “two parts” or “two instruments” — it means one timing track plus one note track. That is a structural choice of the writer, not a fact about the music.

Three things people mix up with a track — measured by patching one real file

A channel is a 4-bit address inside the note message; an instrument is a separate program-change message; a track is the enclosing chunk. They are three independent axes. We proved it by editing the real 89-byte export three different ways and re-parsing each result:

Three single-axis edits to the same real file. Each changes one concept and leaves the notes alone.
EditBytes changed / addedFile sizeTracksChannelsProgram changesNotes (pitch / velocity)
Original export—8921060, 62, 64, 67 / all 113
Channel: rewrite the 8 note status bytes from channel 1 to channel 168 changed8921 (ch 16)0unchanged
Instrument: insert one program-change event (00 C0 0B) plus a track-length update3 added92211unchanged
Track: split the same 4 notes across two note tracks1 added90210unchanged

Read down the columns. Moving every note to channel 16 costs eight byte edits and changes no track, no note and no file size. Naming an instrument costs exactly three bytes and changes no note. Re-partitioning the four notes into two tracks costs one byte, leaves one channel and zero instruments, and still plays the same four pitches. That is what it means for a track to be a container.

The channel sweep also shows why “how many channels does my MIDI have” is a different question from “how many tracks”. We patched the same file to channel 1, channel 10 (the conventional drum channel) and channel 16; in all three the parse came back 2 tracks, 4 note-on, 4 note-off, pitches 60/62/64/67, velocities 113, size 89 bytes. Only the 4-bit address changed. Mono vs poly explains what the two detection modes do to the notes themselves; none of that changes the container.

What MIDI files are used for

Because the file is a list of instructions, its uses are the things you can do by editing instructions. We measured the cheapest ones on the real four-note export, so the cost of each use is a byte count rather than a claim:

Common uses, and what each one costs in the bytes of a real 89-byte export.
UseWhat you changeMeasured costResult
Transpose a whole partAdd 12 to the 8 pitch bytes (4 note-on + 4 note-off)8 bytes edited, size still 8960, 62, 64, 67 → 72, 74, 76, 79; every other byte identical
Change the instrumentInsert one program-change message+3 bytes → 921 program change, 0 notes altered
Retime a noteChange its delta-time in ticks1 tick = 1.0417 ms at 120 BPMOnsets in the re-parsed file: 0, 0.4875, 0.9990, 1.4979 s
Re-voice or split partsMove note events into another track or channel+1 byte for a two-track splitSame 4 notes, 1 channel, 0 instruments
Drive notation or a DAWImport the .mid; the app supplies the sound and layout0 bytes changedSame file, different rendering in every app

That is why a converted MIDI is a starting point rather than a finished part: transposing all four notes is eight one-byte additions, and nothing else in the file moves. It is also why the same file sounds different in different programs — the instrument was never in the file to begin with. How to make a MIDI file compares the three routes that produce this same two-track shape; what you can fix after a conversion covers the edits that need a real editor.

Equally important is what the file cannot be used for, and here the census is exact:

Event census of the real 89-byte export. Counts come from parsing the file, not from a specification.
EventCountWhat that rules out
Note-on / note-off4 / 4Four notes, nothing more
Tempo / time signature1 / 1One tempo, one 4/4 declaration
End of track2One per track chunk
Key signature0You cannot ask the file what key it is in — does audio to MIDI tell you the key explains why
Text, lyric or track name0No lyrics, no part labels
Program change0No instrument is stored
Pitch bend0No glide or vibrato is stored
Channels used1One address, not a multi-part arrangement
Audio sample bytes0You cannot listen to the file as audio

Those zeros are the honest boundary of this browser converter. It writes notes, a tempo and a time signature. Anything requiring words, an instrument assignment, a key signature or separate parts has to be added later, in an editor or a DAW. Cleaning up a converted MIDI is the practical order for that later work.

How to open a MIDI file

Opening a MIDI file means giving its instructions to something that can turn them into sound or notation — a MIDI player, a notation program, or a DAW with an instrument loaded. Double-clicking the .mid does not play back a recording; your operating system or app picks a default synth and renders the notes. Since the file has 0 program-change events and 0 audio sample bytes, the sound you hear is entirely the opener’s choice, and different openers will legitimately sound different.

If you see a score instead of a waveform, that is expected: audio to notes is the plain-language version of the same note list, and MIDI to sheet music covers the notation route.

Should you stay here, or walk away?

Convert right here. You have an audio file and want the notes out of it. A 2.25-second four-note clip becomes an 89-byte file with 4 note-on and 4 note-off events, and the whole conversion runs in your browser with nothing uploaded.

Open a player or a notation app. You want to hear or see what you already have. The file contains 0 program-change events and 0 audio sample bytes, so the sound and the layout must come from whatever opens it — no amount of re-converting will add them.

Go to a DAW or a real MIDI editor. You need separate parts, lyrics, an instrument assignment or a key signature. The export holds 1 channel, 0 lyric events, 0 program changes and 0 key-signature events; adding one program change is a 3-byte edit, but doing it properly belongs in an editor.

Keeping those three cases apart saves a lot of re-conversion. A note that was never detected is an audio problem — the dropped-note troubleshooting order starts there. A note that is present but late, wrong or flat is a file problem, and the file is small enough to fix by hand.

Questions people actually ask

Is a MIDI file an audio file?

No. It contains note instructions and timing, not samples. A 2.25-second WAV of four notes is 99 226 bytes at 22 050 Hz / 16-bit mono; the .mid from the same clip is 89 bytes. When we fed those 89 bytes back through this site’s analyser as if they were PCM, it found 0 notes; the real audio found 4.

What is the MIDI file format?

It is the Standard MIDI File container: a 14-byte header (MThd, length 6, a format type, a track count, a ticks-per-quarter value) followed by MTrk chunks of time-stamped events. Type 0 uses one track, type 1 uses simultaneous tracks, type 2 holds independent patterns. This converter writes type 1 with 2 tracks and 480 ticks per quarter note. We built the same four notes as type 0 (77 bytes), type 1 (89 bytes) and type 2 (140 bytes); the note events were identical in types 0 and 1.

What is a MIDI track?

A container for a time-ordered stream of events, not a voice or an instrument. In a real export from this site, track 1 holds 19 data bytes, 0 notes and only the tempo, time signature and end-of-track marker; track 2 holds 40 data bytes and all 4 note-on / 4 note-off pairs. Splitting the same four notes across two tracks costs 1 byte and leaves 1 channel and 0 instruments.

Is a track the same as a channel?

No. A channel is a 4-bit address inside the note message. We rewrote the 8 note status bytes of the real 89-byte file to move every note from channel 1 to channel 16: the file stayed 89 bytes, 2 tracks, 4 note-on, 4 note-off, pitches 60/62/64/67, velocities 113. Only the address changed.

What are MIDI files used for?

Anything that edits instructions: transposing, retiming, re-voicing, changing instrument, driving a synth or notation software, or importing into a DAW. On the real export, transposing up an octave is 8 one-byte edits to the pitch bytes and the file stays 89 bytes; one tick of retiming is 1.0417 ms at 120 BPM. What they cannot do is play back a recording, supply their own instrument, or store lyrics and a key signature — all of those are absent from the file.

Why is my MIDI file silent, or why does it sound like a different instrument?

Because the file has 0 program-change events and 0 audio samples. Whatever opens it chooses the sound. Load an instrument on the track in your DAW, or render it with a synth; what playback actually shows walks through the round trip.

Can I turn a MIDI file back into audio with this converter?

Not as input. This converter decodes audio samples, and a .mid contains none — when we fed the bytes back into the analyser it found 0 notes. To get a WAV or MP3 you need a synth that renders the note events; see MIDI to WAV and MIDI to MP3.

Does the file remember where the notes came from?

No. We compared a recording, a hand-drawn note list and a score export through this writer: the resulting event census is the same shape, and there is no origin field in the file. Three routes, one file structure has the byte comparison. The file also does not contain the tempo as a measurement — how accurate the tempo is explains what the BPM field actually writes.

Related guides

Convert a file now — runs in your browser, nothing is uploaded, and the .mid and the .csv are yours to open, inspect or edit.