MIDI file viewer: every note on a piano roll, and play it
Open a .mid, .midi, .kar or .rmi file without installing a music program. You see every note on a piano roll, what each track is (its channel, the General MIDI instrument it asks for, how many notes it has and its lowest and highest note), every tempo change, the time and key signatures, the length in seconds, and karaoke lyrics with their times. Press Play to hear it on a simple synth.
The file is read on your device. It is not uploaded, and no sound library is downloaded.
What it shows
- The header. Format 0 (one track holding all 16 channels), 1 (several tracks played together, the usual kind) or 2 (independent patterns), the number of tracks, and the timing: ticks per quarter note, or SMPTE frames per second and ticks per frame.
- Timing. The tempo map, with every tempo change at its tick and its time in seconds, the time and key signatures, and the total length in seconds, worked out across every tempo change.
- Each track. Its name, the channels it plays on, the General MIDI instrument each channel is set to (from the channel's program change; with none, the default, Acoustic Grand Piano), the number of notes, and the lowest and highest note by name and number. Channel 10 is General MIDI percussion, where each note number is a drum (36 is Bass Drum 1, 38 Acoustic Snare, 42 Closed Hi-Hat), and the drum names are shown.
- A piano roll. Time runs left to right and pitch bottom to top, with bar lines and C labels. Each track has its own colour and its own note style (solid, outlined, banded or half-filled), so the tracks can be told apart without colour. Drag sideways to move, pinch or press Ctrl and scroll to zoom, tick tracks on and off, and tap to move the playhead there.
- Lyrics and text. Lyric events, or a .kar file's karaoke text, joined into lines, each with its time (tap the time to jump there), plus markers, cue points, copyright lines and every other text event.
- Playback. Play, pause and seek. It is a simple synth, not the real instruments: one plain waveform per instrument family (a soft triangle for pianos, a slow sawtooth for strings, a square wave for organs) and noise bursts or short pitch drops for drums. Nothing plays until you press Play.
- A CSV of every note. One row per note: track, channel, start and duration in seconds, note number, note name, velocity. It opens in any spreadsheet.
How ticks become seconds: a worked example
A MIDI file stores no clock times. Each event carries a delay in ticks, and the file says how many ticks make a quarter note (the header's division, often 96, 480 or 960). The tempo events say how long a quarter note lasts, in microseconds.
Take a file with 480 ticks per quarter note that starts at 120 BPM (a tempo event of 500,000 µs per quarter note) and changes to 60 BPM (1,000,000 µs) at tick 960. The first 960 ticks are two quarter notes at half a second each: 1.0 s. A note at tick 1,920 comes 960 ticks after the change, two quarter notes at one second each, so it starts at 1.0 + 2.0 = 3.0 seconds. Without the tempo change it would start at 2.0 s. A player that ignores the tempo map gets every note after a change wrong, which is why the tempo map is listed in full.
With no tempo event at all, the MIDI standard's default is 120 BPM, and this page uses it. A file with SMPTE timing counts real time directly (for example 25 frames per second with 40 ticks per frame is 1,000 ticks a second), so its tempo events do not change the timing.
Files it opens
- .mid and .midi
- Standard MIDI Files, formats 0, 1 and 2. The reader was written for this page from the Standard MIDI File 1.0 specification, with no MIDI library: running status (events that leave out a repeated status byte), a note-on with velocity 0 read as a note-off, system-exclusive messages skipped by their length, and unknown chunks skipped.
- .kar (karaoke)
- A format 1 MIDI file that follows the Tune 1000 karaoke convention: the words are text events, a leading
/starts a new line and\a new verse, and lines starting with@are headers (@Ttitle,@Llanguage,@Iinformation). They are shown as the karaoke header and as timed lyric lines. - .rmi
- A Windows RIFF file of type RMID. Its
datachunk holds an ordinary MIDI file, which is taken out and read. - Text in odd encodings
- MIDI does not say which character set its names and lyrics use. Text that is valid UTF-8 is read as UTF-8; anything else as Windows-1252, which is right for most Western European karaoke files. Japanese Shift_JIS lyrics show as garbled Latin letters.
Useful to know about MIDI files
- Why the same file sounds different on every device
- A MIDI file holds no sound, only instructions: which note, how hard, when, and which instrument number. The instrument names come from the General MIDI 1 sound set (MIDI Manufacturers Association, “General MIDI System Level 1”, 1991), 128 programs in 16 families of 8, plus the drum map on channel 10. Each synthesizer, from Windows' built-in one to a phone app, plays those numbers with its own recorded sounds.
- Program numbers: 1 to 128 or 0 to 127?
- The bytes in the file run from 0 to 127, and the General MIDI list numbers them 1 to 128. Program byte 0 is instrument 1, Acoustic Grand Piano; byte 40 is instrument 41, Violin. This page shows the 1-to-128 number beside the name.
- Middle C: C4 or C3?
- Note 60 is middle C. This page calls it C4 (scientific pitch notation, as most notation programs do); Yamaha instruments, Cubase and FL Studio call the same note C3, so their note names are an octave lower than the ones here for the same numbers.
- Format 0 or format 1?
- A format 0 file keeps everything in one track, so its parts can only be told apart by channel; the Tracks table then shows one track with several channels. Format 1 gives each part its own track, and the first track usually holds only the tempo and time signature (it shows 0 notes).
What this cannot do
- Show sheet music. There is no notation: no staves, clefs or note values. MuseScore (free) imports a .mid file as a score.
- Play the real instruments. There is no SoundFont or sampled sound, only the simple synth described above. Volume and pan controllers, pitch bend, the sustain pedal and effects are ignored in playback (and not listed). To hear a file properly, or turn it into an audio file, use a synthesizer with a sound bank, such as your computer's built-in MIDI player, GarageBand or MuseScore.
- Edit. It only reads and saves the notes as CSV; the MIDI file itself is never changed or written.
- Draw bars for SMPTE files. A file timed in SMPTE frames is read and timed correctly, but has no beats, so no bar lines are drawn for it.
- Read other MIDI-like formats. XMF, RIFF DLS sound banks, SoundFont (.sf2), MIDI 2.0 clip files, and tracker modules (.mod, .xm) are not read.