What is a .MIDI file?
A .MIDI file is the full-form extension of the Standard MIDI File category. Standard MIDI Files are usually saved with either the .MIDI or the .MID extension. The Standard MIDI File has been defined by the MIDI Manufacturers Association and Japan’s Association of Musical Electronics Industry from 1988 onwards to exchange MIDI performance across sequencers, synthesizers, notation application, and DAWs. A standard midi file consists of timed event rather than digital audio and includes things such as notes on or off messages, tempo changes, and pitch bend data.
A user comes across files under extension .midi while using karaoke/lyrics databases, downloading old music on websites, piano training software programs, video game music production process, notation application interchange, and DAW project interchange. Not many popular and totally different mainstream files can use a .midi extension. It should be noted here that all valid .Midi file begins at byte # 0, hexadecimal 4D 54 68 64 which stands for ASCII “MThd”. While old windows systems like .MID extension better, mac and other software can read both equally well.
How to open a .MIDI file
Open a .MIDI file on Windows
- 1 Go to the folder with your file in File Explorer. Usually, downloaded files end up in Downloads.
- 2 Double-click your .MIDI file if you have an app for .midi files on your computer. In case it does not open, move on to step three.
- 3 Right-click your .MIDI file -> select .
- 4 Choose VLC media player in the list (Windows 11: choose Always). For Windows 10 -> put a check on "Always use this app to open .midi files" and click OK.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Windows
- VLC media player open-source
- MuseScore Studio open-source
- Ableton Live paid
- FL Studio paid
- Cakewalk by BandLab free
- REAPER paid
- Ardour open-source
- FluidSynth open-source
Open a .MIDI file on macOS
- 1 In the Finder app, locate your .MIDI file.
- 2 Just double-click your .MIDI file in order to automatically launch the program which is connected with it.
- 3 Need another app on your Mac? Control-click the file (or right-click with a mouse). In the pop-up menu select .
- 4 If it isn't in the list, choose and find the application manually.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for macOS
- VLC media player open-source
- MuseScore Studio open-source
- GarageBand free
- Logic Pro paid
- Ableton Live paid
- FL Studio paid
- REAPER paid
- Ardour open-source
Open a .MIDI file on Linux
- 1 Launch your file manager. Depending on the desktop it may be named Files (GNOME), Dolphin (KDE Plasma), Nemo (Cinnamon) or Thunar (Xfce).
- 2 Double-click the file.
- 3 Or choose another program by right-clicking the file -> .
- 4 Install VLC media player (if it is not installed on your computer) from the software centre, repository or Flathub.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Linux
- VLC media player open-source
- MuseScore Studio open-source
- REAPER paid
- Ardour open-source
- Rosegarden open-source
- FluidSynth open-source
- TiMidity++ open-source
Open a .MIDI file on Android
- 1 Launch Files or another file management app.
- 2 In Downloads, find the .MIDI file and open it by tapping.
- 3 A list of apps capable of opening the file will be shown. Tap VLC media player and press Always to permanently connect the file type with this app.
- 4 No apps able to open this file? Download VLC media player from the Google Play Store.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Android
- VLC media player open-source
- FL Studio paid
- Synthesia freemium
- BandLab freemium
Open a .MIDI file on iPhone / iPad
- 1 Use the Files app and go to On My iPhone, iCloud Drive or Downloads.
- 2 Tap the .MIDI file you want to open.
- 3 If the file can be opened by a built-in iOS app (supported format), it opens automatically.
- 4 Touch and hold the file to get the context menu -> choose -> select VLC media player from the list of apps.
- 5 If there is no such option, download the app first from the App Store and then tap the document again.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for iPhone / iPad
- VLC media player open-source
- GarageBand free
- FL Studio paid
- Synthesia freemium
- BandLab freemium
Open a .MIDI file online
- 1 Move to the online viewer at the top of this page.
- 2 Drag the file there or select it, and its contents will appear in your browser tab. The file is not uploaded.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Online
- Online Sequencer free
- BandLab freemium
More details about opening .MIDI files
For Windows users it is recommended to choose VLC for fast playing, Windows Media Player should be used if MIDI synthesis is properly setup, Cakewalk by BandLab for sequencing MIDI files, MuseScore Studio for notations importing into software editor and paid music editors as FL Studio, Ableton Live, REAPER or similar Cubase-style sequencers. It should be mentioned that most editors have commercial licenses whereas VLC, MuseScore Studio and Cakewalk by BandLab can be freely used. In the case of macOS users GarageBand and Logic Pro will work with MIDI previews/imports, GarageBand or any VLC-based application with MIDI playing, while editors like MuseScore Studio, REAPER, Ardour, Ableton Live and FL Studio will do the editing.
In Linux MIDI files can be imported in MuseScore Studio program, sequenced using Rosegarden, DAW jobs can be accomplished with the help of Ardour and REAPER programs, VLC program can play these files, and rendering from terminal line will be done using FluidSynth/TiMidity++. For mobile phones running iOS or Android OS such MIDI applications as Synthesia, which plays files during learning to play piano, FL Studio Mobile editor or GarageBand/iOS for working within the Apple ecosystem (iOS), or for working on cloud with BandLab (any operating system), or playing MIDI with the help of VLC (when available).
In an Internet browser, you can use the online sequencer Online Sequencer and the cloud production platform BandLab. For the case of opening no actions, one has to use right-click option "Open With" and to install a corresponding MIDI capable program/player or to rename file extension from .MIDI to .mid when starting from symbol sequence MThd. To get exact audio performance it will be needed to use GM-suitable synthesizer/soundfont.
Technical details
The standard MIDI file (SMF) is a chunked binary format developed since 1988. The file must begin with the MThd ASCII chunk (hex 4D 54 68 64) at address 0, containing the length of this chunk in the following 32 bits as big-endian and generally valued as 00 00 00 06 in bytes. In six bytes, it is then specified the format (three big-endian 16 bits): 0 - one single multi-channel track, 1 - several tracks which have common timing and 2 - multiple async tracks. Possible pulse per quarter (PPQ) numbers comprise 96, 120, 240, 480 and 960, while an alternate form of timing uses SMPTE frame timing instead of PPQ.
Each single track of an SMF file is stored as a separated chunk MTrk, with hex value 4D 54 72 6B, 32-bit big-endian byte length and the stream of variable length delta time encoded events. The data contained in each track consists of the channel voice messages, channel mode messages, the FF starting meta-event message, the F0 starting system exclusive messages and possibly F7. Running status feature allows to save status byte when a number of channel events have equal status. The time info is delivered through tempo meta-event, marked as the FF 51 meta event which includes microseconds per quarter note info and other events for meter, scale/key information, lyrics and marker events.
As a general feature, no compression/encryption/copyright data is provided within the SMF file and only the basic chunk level meta-data is delivered. Normally the size varies up from kilobytes up to hundreds kilobytes, but the large quantity of controller info, as well as the SysEx dumps, leads to even bigger file sizes than usual. The audio/midi, audio/sp-midi MIME types and their analogs such as audio/x-midi, audio/mid, or application/x-midi may still use older software. The last-named specified version was named to be Standard MIDI Files 1.0 and is supported together with MIDI 2.0 packet in Universal MIDI Packet specifications.
How to convert .MIDI files
For conversion of .MIDI into any of WAV, MP3, AAC, OGG, or FLAC audio is needed, when the intended recipient is a mobile device or a stream uploading, or use as media in video or in web browsers that are not equipped to process the original MIDI file format. Conversion into audio format needs a synthesizer and soundfont or other source. Such command as fluidsynth -ni soundfont.sf2 input.midi -F output.wav -r 44100 followed by FFmpeg encoding the generated .WAV in MP3, AAC, FLAC or Ogg can be performed in practice.
MuseScore Studio allows the import of .MIDI into notation in different formats such as MIDI and exporting it into PDF, WAV, MusicXML, MP3, FLAC or OGG formats dependent on the installed software. The imported MIDI files need much cleaning up due to the quantizing, voices splitting, assignment of staff, and spell checking in enharmonics. DAW applications including Logic Pro, GarageBand, REAPER, FL Studio, Cakewalk, Ableton, and Ardour enable importing of .MIDI tracks and mixing the resulting sounds.
When changing a MIDI format for the same kind of file as .mid only reassignment or export of SMF from the application used is required, as their bit streams are almost the same. Transcription of audio format to MIDI is a separate problem, and when converting MIDI to audio, the editable notations, map of tempo of the play, lyrics, and SysEx device information become lost.
| Convert to | Tool | Command / note |
|---|---|---|
| WAV audio | FluidSynth | fluidsynth -ni soundfont.sf2 input.midi -F output.wav -r 44100 Renders MIDI events through a SoundFont; instrument sound depends on the chosen SF2/SF3 soundfont. |
| MP3 audio | FluidSynth + FFmpeg | fluidsynth -ni soundfont.sf2 input.midi -F - -r 44100 | ffmpeg -f wav -i - -codec:a libmp3lame -q:a 2 output.mp3 Produces shareable audio; after rendering, notes and controller events are no longer separately editable. |
| OGG Vorbis audio | TiMidity++ | timidity input.midi -Ow -o - | ffmpeg -i - -codec:a libvorbis -q:a 5 output.ogg Useful for web/game audio; final timbre depends on TiMidity++ patch configuration. |
| MusicXML score | MuseScore Studio | mscore input.midi -o output.musicxml MIDI-to-notation conversion is heuristic; quantization, voices, articulations, and enharmonic spelling may need manual cleanup. |
| PDF sheet music | MuseScore Studio | mscore input.midi -o output.pdf Creates a printable score, but imported MIDI may require staff assignment and rhythm correction. |
| WAV audio | FFmpeg with FluidSynth support | ffmpeg -i input.midi output.wav Works only in FFmpeg builds configured with a MIDI synthesizer such as libfluidsynth and an available soundfont. |
| Standard MIDI File .mid | File rename or DAW export | .MIDI and .MID normally contain the same Standard MIDI File data; renaming is often enough if the file begins with MThd. |
Common problems and fixes
"Cannot open file" or empty import suggests that the file is not even a Standard MIDI File to begin with. Check if the file indeed starts with MThd bytes (hex 4D 54 68 64, offset = 0) followed by several track chunk headers MTrk (hex 4D 54 72 6B). This file may be a misleadingly renamed regular audio file, RIFF-wrapped audio track or otherwise damaged.
DAW "errors", such as "Unexpected end of file" and "bad track length", usually occur due to file truncation or wrong header lengths. Try opening this track inside a proper importer, such as MuseScore Studio, REAPER or other software capable of loading .mid. Midicsv-style tools can help inspect and rebuild corrupted track chunks of a damaged MIDI track. The best course of action, if the track seems truncated though, would be replacing a faulty copy by downloading it anew.
In cases of silent playback the main reason for this problem is either missing synthesizer on the computer, inactive MIDI output channel, unregistered SF2/SF3 soundbank for FluidSynth, CoreAudio device, TiMidity++, or non-operational (unavailable) physical hardware output.
Incorrect assignment of instruments usually refers to using General MIDI mapping scheme, custom GS, or XG patch banks or SysEx settings unsupported by current MIDI Player app. Try importing an SF2 file to play a custom bank, use a built-in sound set or patch a sequencer in another way accordingly.
Improperly set tempo and lyrics are the consequence of a file loaded without proper time-division or import algorithm that fails to interpret Tempo Maps of the MIDI file or interprets incorrectly. Use any sequencer, check your tempo data in tracks tab as well as FF 05 lyrics meta events. Also some MIDI Players fail to associate MIDI files with the respective program properly due to browser security policy or incorrect MIME type, so you'd need MThd check as well. Excessive controller automation might also disrupt player.
Security considerations
There are no executables, macros or script language support in Standard MIDI Files; hence a normal .MIDI file is relatively safer compared to documents or executable content. The biggest risk that is inherent within these .MIDI files involves potential parsing problems by the various types of devices which may try to parse any kind of corrupted chunks, large size lengths, running status or SysEx data present within a standard .MIDI attachment. Be wary while opening .MIDI attachments - use reliable players, avoid old plugins and never run any suspicious installer programs or codecs. There is the potential of a .MIDI file triggering actions on your connected MIDI hardware using SysEx messages like adjusting some parameters, writing patches and other behavior depending upon specific devices attached. Meta message type information may expose the tracks/sequences/markers/patches/literal text/license notices/patch names etc. To verify the file contents, you can use a hex viewer/ midicsv style dumper or just import in DAW while switching off all external outputs.
History and versions
In addition to the protocol defined by its first official version in 1983 in cooperation with a number of instrument manufacturers, MIDI allows the interexchange of performance data using this standard between synthesizers, drum machines and sequencers. Its portable disk representation in form of the MIDI file format has been available since the year of 1988; it allows the event stream to be saved independently from a specific project file used on any MIDI sequencer. By the year 1991, General MIDI 1 has made many .MIDI files more predictable as for their results thanks to common mappings for program numbers and percussion instruments.
The standard formats .mid and .midi refer to the content encoded in the format called the SMF format; though .mid turned out more popular as the DOS and first Windows operating systems preferred shorter file name extensions consisting of three characters at maximum. These files were widely spread during the 1990s on the Internet and BBS as well in karaoke collections, computer games, learning resources due to significantly lower sizes of this data type in comparison with digital audio files.
Related formats
.MID is also the extension associated with Standard MIDI File with the same contents as .midi, with the exception that you are better off using .mid where compatibility with an old sequencer, a computer from back then or similar is paramount. .KAR files generally have SMF files inside but usually have lyrics attached as special meta event; while regular MIDI readers play these files, a specialized software will present them correctly to the user. The extension of .RMI is for RIFF MIDI - a type of Windows container holding MIDI data which doesn’t start with ‘MThd’ string but with RIFF, being much less popular than it. .XMI/XMIDI refers to Extended MIDI; while similar to SMF format is still different enough to require specific conversion tool for games where they’re encountered. .MUS is actually a catch-all extension referring to various audio formats; a common example would be DOOM MUS, a format by Id Software. Notably, .MUS isn’t even an SMF file. Use .MusicXML or .MXL to exchange notations; .WAV/.mp3/.FLAC/.aac/.ogg should work for fixed playback and recording; .SF2/3 refers to sound fonts.
No comments yet. Be the first to share your experience with this file type.