File Formats & Notation12 min read · Updated 2026-12-01

Standard MIDI File (SMF) Format 0 vs. Format 1, 480/960 PPQN Resolution & MusicXML 4.0 Export Guide

Quick Answer & Key Benchmarks

Use Standard MIDI File Format 0 at 480 PPQN for single-instrument clips and universal drag-and-drop DAW import, Format 1 when bundling multiple synchronized instrument tracks with a dedicated Track 0 tempo map, and MusicXML 4.0 (.musicxml) whenever live musicians need readable clefs, key signatures, rests, and stacked chord notation in MuseScore 4 or Dorico.

  • Format 0 vs. Format 1: Format 0 stores all 16 channels inside one MTrk chunk for 100% single-clip DAW compatibility; Format 1 separates each instrument into its own MTrk with Track 0 holding tempo and time-signature meta events.
  • 480 PPQN is the mathematical sweet spot: 480 divides cleanly by 2, 3, 4, 5, 6, 8, 10, 12, and 16—giving exact integer ticks for 1/16th notes (120 ticks), 1/8T triplets (160 ticks), and 1/32nd notes (60 ticks) at 1.04 ms resolution at 120 BPM.
  • 960 PPQN doubles timing precision to 0.52 ms at 120 BPM (0.49 ms at 128 BPM) for orchestral micro-timing and tuplets, while legacy 96 PPQN introduces up to 5.21 ms quantization rounding on swing grooves.
  • MIDI is performance data, not engraving: .mid files omit clef choice, enharmonic spelling (C# vs. Db), and clean measure rests—which is why MusicXML 4.0 cuts sheet-music cleanup time by 65%–80%.

1. Inside Standard MIDI Files: Format 0 vs. Format 1 vs. Format 2 Binary Structure

Every valid .mid file published since the MIDI Manufacturers Association ratified Standard MIDI Files 1.0 begins with a 14-byte Header Chunk labeled by the four ASCII magic bytes MThd (hexadecimal 4D 54 68 64). Bytes 4–7 specify the header payload length (always 6 bytes: 00 00 00 06), bytes 8–9 declare the SMF Format type (0, 1, or 2), bytes 10–11 state the total number of track chunks (ntrks), and bytes 12–13 define timing division—almost universally positive Pulses Per Quarter Note (PPQN) rather than SMPTE frame rates.

In SMF Format 0 (bytes 8–9 = 00 00, ntrks = 00 01), every meta event—Set Tempo, Time Signature, Track Name—and every channel voice event across MIDI channels 1–16 lives inside a single MTrk chunk sorted chronologically by delta time. That single-track design is why hardware grooveboxes, Arranger keyboards, web piano rolls, and DAW clip browsers love Format 0: dragging a Format 0 clip onto an existing Ableton Live, FL Studio, or Logic Pro track drops notes directly onto that instrument without spawning unwanted extra lanes.

In SMF Format 1 (bytes 8–9 = 00 01, ntrks >= 2), all tracks play simultaneously from tick 0. By convention defined in the MIDI Association specification, Track 0 functions exclusively as the Conductor (Tempo) Track carrying Set Tempo (0xFF 0x51), Time Signature (0xFF 0x58), Key Signature (0xFF 0x59), and markers, while Tracks 1 through N store individual instrument parts (Piano, Bass, Strings, Drums on Channel 10). Format 2 stores independent asynchronous patterns and is ignored by over 95% of modern DAWs.

Choosing the wrong format creates immediate workflow friction. If you export a single vocal hook as Format 1 with an empty tempo track plus Track 1 notes, some older samplers import an empty first slot or spawn two separate tracks in Logic Pro. Conversely, exporting a 12-instrument orchestral mock-up as Format 0 merges all instruments into one lane until the receiving DAW manually invokes 'Separate by MIDI Channel'.

Table 1 — Standard MIDI File Format 0 vs. Format 1 vs. Format 2 Engineering Comparison
Specification FieldSMF Format 0SMF Format 1SMF Format 2
MThd Format Bytes (8–9)0x00 0x000x00 0x010x00 0x02
Track Chunks (MTrk)Exactly 1 (all 16 channels merged)2+ synchronous (Track 0 = tempo map)Multiple independent async sequences
Tempo & Time Sig LocationInside the single MTrk at tick 0+Dedicated Conductor Track 0Separate tempo map per pattern track
Single-Clip DAW Drag-Drop100% clean drop onto active trackOften prompts to create multiple tracksRejected or misread by >95% of DAWs
Best Production Use CaseTranscribed riffs, basslines, chord loops, hardware synthsFull multitrack arrangements & orchestral stemsLegacy drum-machine pattern banks only

2. 96 vs. 480 vs. 960 PPQN: Tick Divisibility, Triplets & Millisecond Precision

PPQN (Pulses Per Quarter Note, also written TPQ or PPQ) defines how many discrete timing ticks fit inside one quarter-note beat. Real-time hardware MIDI Clock still broadcasts 24 pulses per quarter note (established in 1983 so 31.25 kbps serial cables would not saturate), whereas Standard MIDI Files store higher sequencer resolutions—most commonly 96, 240, 480, or 960 PPQN.

Why did 480 PPQN become the dominant modern standard across Logic Pro, Cubase, MuseScore, and MidiRoll Desk? Look at its prime factorization: 480 = 2^5 × 3 × 5. That single factor of 3 and factor of 5 guarantees exact integer ticks not only for straight binary grids (1/4 = 480, 1/8 = 240, 1/16 = 120, 1/32 = 60, 1/64 = 30), but also for triplet grids (1/4T = 320, 1/8T = 160, 1/16T = 80, 1/32T = 40) and even quintuplets (1/4 quintuplet = 96 ticks) with 0.0% cumulative rounding error.

By contrast, FL Studio historically defaulted new projects to 96 PPQN (adjustable up to 960 PPQN in Project General Settings) to save CPU on older computers. At 96 PPQN, a 1/32nd triplet equals 8 ticks and a 1/64th note equals 6 ticks—leaving almost no room for subtle 54% swing or unquantized human micro-timing before notes snap noticeably by ±5.21 ms at 120 BPM. Doubling 480 PPQN to 960 PPQN shrinks each tick to 0.52 ms at 120 BPM (0.49 ms at 128 BPM) and adds exact septuplet and 1/64T (40-tick) precision while increasing file size by less than 4% thanks to Variable-Length Quantity delta encoding.

Table 2 — PPQN Resolution Comparison Across Subdivisions, Triplets & Millisecond Granularity
PPQN Setting1/16 Note Ticks1/8T Triplet Ticks1/16T Triplet Ticks1 Tick @ 120 BPM1 Tick @ 128 BPMTypical Host Default
24 PPQN (MIDI Clock)6 ticks8 ticks4 ticks20.83 ms19.53 msHardware DIN sync only
96 PPQN24 ticks32 ticks16 ticks5.21 ms4.88 msFL Studio legacy default
240 PPQN60 ticks80 ticks40 ticks2.08 ms1.95 msCompact mobile sequencers
480 PPQN (Standard)120 ticks160 ticks80 ticks1.04 ms0.98 msMidiRoll Desk, Cubase, MuseScore, Ableton
960 PPQN (High-Res)240 ticks320 ticks160 ticks0.52 ms0.49 msLogic Pro, REAPER, Pro Tools

3. Essential SMF Meta Events, Channel Messages & Delta-Time VLQ Rules

Many broken MIDI exports fail not on note pitch, but on missing or malformed meta events at tick 0. Inside an MTrk chunk, every event is preceded by a delta time—the number of ticks elapsed since the previous event—encoded as a Variable-Length Quantity (VLQ) using 7 data bits per byte and setting the most significant bit (0x80) to 1 on every byte except the last. Values from 0 to 127 require only 1 byte; values from 128 to 16,383 take 2 bytes.

Immediately after tick 0, a DAW-ready MIDI file should embed four baseline header messages: Track Name (0xFF 0x03), Set Tempo (0xFF 0x51 0x03 followed by a 24-bit integer representing microseconds per quarter note = round(60,000,000 / BPM)), Time Signature (0xFF 0x58 0x04 nn dd cc bb where dd is a power of 2, so 4/4 encodes as 04 02 18 08), and Program Change (0xC0 | channel). Without a Set Tempo meta event, the SMF specification forces receiving DAWs to assume 120.0 BPM (500,000 µs per beat), stretching or compressing any non-120 BPM riff on import.

Ordering touching notes at the same tick is another subtle engineering detail. When Note A ends at tick 480 and Note B of the same pitch starts at tick 480, placing Note Off (0x80 or 0x90 with velocity 0) strictly before Note On (0x90) prevents stuck hanging notes or retrigger truncation on hardware synths and samplers. Every track chunk must terminate cleanly with the mandatory End of Track meta event (0x00 0xFF 0x2F 0x00).

Table 3 — Core Standard MIDI File Meta Events & Channel Messages Reference
Event NameHex SignaturePayload Formula / ExampleWhy DAWs & Notation Apps Need It
Set Tempo (Meta)0xFF 0x51 0x03MPQ = 60,000,000 / BPM (128 BPM -> 07 27 0E)Prevents fallback to default 120 BPM on import
Time Signature (Meta)0xFF 0x58 0x044/4 -> 04 02 18 08; 6/8 -> 06 03 18 08Sets measure barlines and metronome accent grouping
Key Signature (Meta)0xFF 0x59 0x02sf (-7..+7 flats/sharps), mi (0 major, 1 minor)Guides sharp vs. flat accidental spelling in score view
Note On / Note Off0x9n pp vv / 0x8n pp 00Pitch 0–127 (60 = C4), Velocity 1–127 (0 = off)Drives pitch, dynamics, and note length in piano roll
End of Track (Meta)0xFF 0x2F 0x00Zero-length terminator at final tickRequired by SMF 1.0 spec; missing triggers parse errors

4. MIDI (.mid) vs. MusicXML 4.0 (.musicxml) vs. MIDI 2.0: Choosing the Right Export

Importing a raw .mid file directly into MuseScore 4, Dorico 5, Sibelius, or Finale is infamous among arrangers for producing unreadable rhythms: a legato quarter note that overlaps by 15 ticks renders as a quarter tied to a 64th note, and bass melodies routinely appear on treble clefs packed with ledger lines. That happens because SMF encodes raw performance timestamps rather than engraved notation.

MusicXML 4.0—maintained by the W3C Music Notation Community Group—bridges this gap with explicit semantic engraving elements. Every measure declares <divisions> (for example, divisions = 4 places 16th-note resolution cleanly inside each quarter beat), <clef> (<sign>G</sign><line>2</line> for treble or <sign>F</sign><line>4</line> for bass when mean pitch sits below MIDI 55), <time>, <key><fifths>, metronome <direction> plus <sound tempo>, explicit <rest/> objects that fill empty measure space cleanly, and <chord/> tags on simultaneous notes sharing an onset.

Meanwhile, MIDI 2.0 (Universal MIDI Packet / UMP) expands real-time performance expressiveness to 32-bit velocity and per-note pitch control, supported natively in macOS, Logic Pro, and modern hardware controllers. However, as of 2026, SMF 1.0 (.mid) remains the universal file exchange format supported by 100% of DAWs, web synths, and hardware sequencers, while MusicXML 4.0 (.musicxml / compressed .mxl) is the universal standard for printable sheet music.

Table 4 — SMF (.mid) vs. MusicXML 4.0 (.musicxml) vs. MIDI 2.0 Feature & Compatibility Matrix
CapabilitySMF 1.0 (.mid, 480 PPQ)MusicXML 4.0 (.musicxml)MIDI 2.0 (UMP / Clip)
Velocity & Controller Precision7-bit (0–127) standardDynamic markings (pp–ff) + sound attrs16-bit velocity / 32-bit controllers
Clefs, Rests & Enharmonic SpellingNot stored (guessed on import)Explicit <clef>, <rest/>, <alter>, <chord/>Performance protocol (no engraving)
DAW Compatibility (Ableton/FL/Logic/Cubase)100% universal import & drag-dropSupported in Logic, Cubase, Dorico; not FL/AbletonGrowing (Logic Pro, Cubase 13+, macOS/Win11)
Notation Compatibility (MuseScore/Dorico/Sibelius)Imports raw ticks (heavy cleanup needed)100% native printable engraving readyNot used for sheet-music exchange
Typical 8-Bar File Size0.4–1.8 KB (compact binary)8–28 KB XML (2–6 KB zipped .mxl)1.5–4.0 KB binary packet stream

Worked Numerical Case Study

Worked Byte-Level Case: Encoding a 128 BPM 4/4 Clip at 480 PPQN + MusicXML 4.0 Divisions

You transcribe a 128 BPM synth riff in MidiRoll Desk starting with a C4–E4–G4 chord on beat 1 (length = dotted quarter = 1.5 beats), followed by an A4 sixteenth note starting on beat 2.5 (duration = 0.25 beats). Let us verify the exact binary SMF bytes and MusicXML XML durations.

  1. Step 1 — Header Chunk (MThd, 14 bytes): 4D 54 68 64 (MThd) | 00 00 00 06 (size 6) | 00 00 (Format 0) | 00 01 (1 track) | 01 E0 (480 PPQN, since 0x01E0 = 256 + 224 = 480).
  2. Step 2 — Set Tempo Meta Event for 128 BPM: Microseconds per quarter note = round(60,000,000 / 128) = 468,750 µs. Converting 468,750 to 24-bit hex gives 0x07270E (7×65,536 + 39×256 + 14 = 468,750). Track bytes: 00 FF 51 03 07 27 0E.
  3. Step 3 — Tick & VLQ Calculation for Chord Release (1.5 beats): 1.5 beats × 480 PPQN = 720 ticks (= 703.125 ms at 128 BPM). Encoding 720 as 7-bit VLQ: 720 = (5 × 128) + 80 -> high byte (0x05 | 0x80) = 0x85, low byte = 0x50 -> VLQ bytes [85 50].
  4. Step 4 — Touching Note Ordering & 1/16th Duration: At tick 720, emit Note Off for C4/E4/G4 (delta 85 50 for C4 off, 00 for E4 off, 00 for G4 off) BEFORE Note On for A4 (MIDI 69 = 0x45, delta 00). The A4 1/16th note lasts 0.25 × 480 = 120 ticks (= 117.19 ms), encoded in 1 single VLQ byte 0x78.
  5. Step 5 — Parallel MusicXML 4.0 Mapping (<divisions>4</divisions>): Mean MIDI pitch = (60+64+67+69)/4 = 65 >= 55 -> Treble Clef (G2). The dotted-quarter chord takes duration = 1.5 × 4 = 6 units (<chord/> on E4 and G4), A4 takes duration = 1 unit (<type>16th</type>), and the remaining 9 units in the 16-unit 4/4 measure fill cleanly with explicit <rest/> entries.

Bottom Line: Encoding exact 480 PPQN ticks with embedded 0x07270E tempo bytes guarantees 0.00 ms tempo error across all DAWs, while matching MusicXML 4.0 <divisions>4</divisions> opens directly in MuseScore 4 and Dorico with zero rhythm tie clutter.

Common Producer Pitfalls to Avoid

  1. 1. Exporting MIDI without a Set Tempo (0xFF 0x51) meta event

    When the tempo meta event is missing, DAWs default to 120 BPM. A 92 BPM hip-hop melody suddenly plays 30.4% faster until you manually stretch or re-conform the clip.

  2. 2. Sending raw unquantized .mid files to session players instead of MusicXML 4.0

    Human micro-timing of ±18 ms looks great in a DAW piano roll but explodes into dotted 32nd rests and double ties inside notation apps. Quantize cleanly and export MusicXML 4.0 for any printable chart.

  3. 3. Using legacy 96 PPQN on triplet-heavy jazz or modern trap hi-hat rolls

    At 96 PPQN, 1/32nd triplets fall to 8 ticks and swing percentages quantize coarsely in 5 ms jumps. Always work at 480 or 960 PPQN so binary and triplet grids coexist with zero rounding error.

  4. 4. Placing Note On before Note Off at identical ticks for repeated notes

    If Note On precedes the previous note's Note Off on the same tick, the immediate Note Off kills the freshly triggered note silently. Always sort Note Off strictly before Note On when ticks tie.

  5. 5. Exporting Format 1 for a single monophonic clip intended for loop drag-and-drop

    Format 1 forces DAWs like Logic Pro and Cubase to parse a separate Track 0 conductor lane, triggering import dialogs that break fast clip auditioning. Use Format 0 for single-instrument clips.

Studio Pre-Export Verification Checklist

  • Choose SMF Format 0 for single-instrument melodies, basslines, and chord clips; choose Format 1 only when transferring multi-instrument projects.
  • Verify resolution is at least 480 PPQN (or 960 PPQN for orchestral micro-timing) so both 1/16 straight and 1/8T triplets divide into exact integers.
  • Confirm Set Tempo (0xFF 0x51), Time Signature (0xFF 0x58), and End of Track (0xFF 0x2F) are written inside the MIDI file header/track.
  • Ensure overlapping same-pitch notes shorten by at least 1–5 ticks or sort Note Off before Note On so samplers never choke retriggered notes.
  • When sharing readable parts with players or engravers, quantize to 1/8 or 1/16 and download MusicXML 4.0 (.musicxml) alongside the .mid performance file.
  • Open the exported .musicxml once in MuseScore 4 or Dorico to verify clef choice (treble G2 vs. bass F4) and key accidental spelling before distributing PDFs.

Frequently Asked Questions

What is the practical difference between MIDI Format 0 and Format 1 when importing into a DAW?

Format 0 puts all events into a single track chunk so dragging the file into Ableton Live, FL Studio, or Logic Pro drops straight onto one track cleanly. Format 1 separates instruments across multiple synchronized track chunks with a dedicated Track 0 tempo lane, which is ideal for whole multi-instrument songs.

Is 480 PPQN accurate enough for professional electronic, hip-hop, and film music?

Yes. At 120 BPM, 480 PPQN resolves time down to 1.04 ms—roughly 5 to 10 times finer than the human ear's rhythmic timing threshold—and divides evenly into straight 1/16th notes (120 ticks), 1/8T triplets (160 ticks), and 1/16T triplets (80 ticks). Upgrade to 960 PPQN only if you write dense micro-timed orchestral rubato or 1/64T tuplets.

Why does MidiRoll Desk export both .mid (SMF Format 0) and .musicxml (MusicXML 4.0)?

Because production DAWs and sheet-music engravers need completely different metadata. DAWs rely on 480 PPQ MIDI ticks and velocity values to trigger virtual instruments, whereas MuseScore 4, Dorico, Sibelius, and Finale rely on MusicXML 4.0 clefs, measure rests, and <chord/> tags to render readable printable sheet music.

How do I open a .musicxml file in MuseScore 4 or Dorico without losing the tempo?

Simply press Ctrl+O (Cmd+O on macOS) and select the .musicxml file. Standards-compliant MusicXML 4.0 embeds both a visible <metronome> marking and a machine-readable <sound tempo='...'> tag inside Measure 1, so both score playback and printed tempo markings match automatically.

Why did my MIDI file import at 120 BPM instead of my original 96 BPM or 140 BPM?

Either the exporter omitted the 0xFF 0x51 Set Tempo meta event—forcing the DAW to fall back to the SMF default of 120 BPM—or your DAW imported the MIDI clip with 'Import Tempo Information' unchecked so it conformed the clip to your current project tempo.

Can MIDI Format 0 carry chords and multiple channels at once?

Yes. Format 0 supports full polyphony (hundreds of simultaneous notes at delta time 0) and all 16 MIDI channels (0–15) inside its single MTrk chunk. Format 0 only restricts the file to one track chunk, not to one note or one channel.

Should I switch my MIDI workflow to MIDI 2.0 files in 2026?

Not for file exchange yet. Use MIDI 2.0 for live hardware controller connections where both your OS and DAW support UMP, but continue exporting SMF 1.0 (.mid) at 480/960 PPQN whenever sharing files across collaborators, web tools, or sample packs so 100% of recipients can open them cleanly.

Official Specifications & Primary-Source Citations

  1. The MIDI Association — Primary specification covering MThd headers, Format 0/1/2 track architecture, PPQN division, VLQ delta-times, and mandatory meta events.
  2. The MIDI Association — Official status-byte table for Note Off (0x8n), Note On (0x9n), Program Change (0xCn), Control Change, and Pitch Bend.
  3. The MIDI Association — Official roadmap explaining 16-bit velocity, 32-bit controllers, per-note expression, and backward compatibility with MIDI 1.0.
  4. W3C Music Notation Community Group — Primary W3C community specification for score-partwise and compressed .mxl sheet-music interchange.
  5. W3C Music Notation Community Group — Defines how MusicXML translates quarter-note subdivisions into exact integer note and rest durations.
  6. W3C Music Notation Community Group — Specifies how polyphonic chords stack vertically on a shared rhythmic onset without advancing the measure time cursor.

Run This Workflow Locally in Your Browser

Zero server uploads — decode MP3/WAV locally, inspect notes on the piano roll, quantize grooves, and download 480 PPQ .mid or MusicXML 4.0.

Export 480 PPQ .MID & MusicXML 4.0

Continue Reading