# MIDI File Inspector > See what is inside a MIDI file: tracks, instruments, tempo map, notes, length and an estimated key. Reads a Standard MIDI File (.mid, format 0, 1 or 2) and lists its tracks with channels, General MIDI instruments, note counts and ranges, the tempo map, time and key signatures, note lengths, the most notes sounding at once, drum hits and an estimated key from the pitch content. Includes a piano-roll overview. The same reader Tickwork uses to import MIDI files. Part of usefulweb.app (https://usefulweb.app/). Part of [Tickwork](https://tickwork.usefulweb.app/) (ownerApp: tickwork). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://tickworkmidiinspector.usefulweb.app/ (interactive tool at https://tickworkmidiinspector.usefulweb.app/tool) - JSON API: POST https://tickworkmidiinspector.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://tickworkmidiinspector.usefulweb.app/api/v1/tool) - OpenAPI: https://tickworkmidiinspector.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://tickworkmidiinspector.usefulweb.app/mcp - tool `tickwork_midi_inspector` ## Inputs - file (file): MIDI file (.mid) - Up to 4 MB. Leave empty to inspect a built-in sample. Nothing is stored; the file is read once for this report. - sample (select): Sample when no file is uploaded ## Method - The file is parsed byte by byte following the Standard MIDI File 1.0 specification: header chunk, track chunks, variable-length delta times, running status, meta and SysEx events. Unknown chunks are skipped; RIFF-wrapped files (.rmi) are unwrapped. - Notes are paired from note-on to the next note-off of the same key and channel (a note-on with velocity 0 counts as a note-off). Times in seconds use the tempo map (120 BPM until the first tempo event); SMPTE files use frames per second instead. - The key estimate correlates the duration-weighted pitch-class histogram of all pitched notes (channel 10 excluded) with the Krumhansl–Kessler major and minor key profiles in all 24 keys and reports the best and second-best match. - Polyphony is the largest number of notes sounding at the same moment across all tracks; note lengths are given in beats (quarter notes). ## Limits - The key is a statistical estimate from the notes, not an analysis of harmony; modal or atonal music often gets a nearby major or minor key.