MID
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
Midi Preview.
At a glance
| Original creator | The MIDI Manufacturers Association |
| Purpose | The Standard MIDI File: a wrapper that stores MIDI messages, the instructions that tell a synthesiser how to play a piece of music, with their timing. |
| Extensions | .mid |
| Poka parser | poka-midi |
| Viewer | none: the parser draws its own preview |
| Depth tier | Standalone parser (see Depth tiers) |
| Breadth tier | B3 Core (see Breadth tiers) |
How much Poka reads
B3 Core. Only the main content type or types are decoded (for example geometry but not materials, layers or annotations, or only one version family). The list of gaps is substantial.
Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-16: parsers/poka-midi/src/main.rs (402 lines, midly parser; owns .mid with .smf and .midi aliases; the poka-mid crate is a disabled duplicate). No unit tests and no tests/samples.rs; the corpus has many .mid files (artcraft-soundcraft-mid-*) that no test runs. Covers Standard MIDI File types 0, 1 and 2 as parsed by midly.
What Poka does not read
- note lengths and velocities (only the start of each note-on is plotted, as a 2x2 dot)
- MIDI channels and drum tracks (no channel shown)
- tempo changes (only the first tempo event is used, so the duration is wrong for files with tempo changes)
- time signature and program changes after the first one
- lyrics, text, copyright, marker and cue-point meta events
- key signature
- controllers, pitch bend, aftertouch and SysEx
- SMPTE-timecode files (no duration)
- type 2 sequential tracks are drawn overlaid on one time axis
- RIFF-wrapped MIDI (.rmi) is not routed
- no audio playback
Background
The Library of Congress quotes the specification: the chunk design is like Electronic Arts' IFF, but chunks are not nested. A file starts with an MThd header chunk followed by track chunks. Poka parses the file with the midly crate and draws a piano roll that plots a small dot at the start of every note across all tracks (note lengths are not drawn), with a card listing each track's instrument, note range and event count.
Versions
| Version | Identifier | Poka | Note |
|---|---|---|---|
| Standard MIDI File, types 0, 1 and 2 | MThd |
Read | parsers/poka-midi/src/main.rs names all three types. With SMPTE timecode timing the module leaves out the duration. The duration uses the first tempo event only, and type 2 tracks are drawn overlaid. |
Derived and related formats
- RIFF-based MIDI file (RMID) (
.rmi): Listed by the Library of Congress as related; Poka does not claim it here.
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- midly (used; Unlicense; Rust)
- ghakuf (candidate; MIT OR Apache-2.0; Rust; https://github.com/acknak/ghakuf) — Event-driven SMF parser/builder; README mentions some BSD-like licensed portions. Appears older; page showed no activity date.
- rimd (candidate; MIT; Rust; https://github.com/rustaudio/rimd) — Low-level MIDI/SMF reader and writer; search listings indicate a single 2016 release (Rust 2015), so likely stale.
- midifile (Craig Sapp) (candidate; BSD-2-Clause; C++; https://github.com/craigsapp/midifile) — C++ classes for reading and writing Standard MIDI files.
- Kaitai Struct standard_midi_file spec (candidate; CC0-1.0; unknown; https://formats.kaitai.io/standard_midi_file/) — language: Rust, C++, Python, Java, JavaScript, Go, C#/.NET; Declarative format spec compiled to parsers in many languages, including Rust; the spec licence is CC0-1.0, and the generated code needs the Kaitai runtime.