Help:Media (MIDI)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Playing standard MIDI files

Standard MIDI files trigger sounds played on a synthesizer. audio speaker iconPlay 

Standard MIDI Files (SMF) contain instructions that trigger sounds played by a synthesizer which is typically expected to meet the General MIDI specification. On a personal computer these instructions can be turned into sound by either a software synthesizer, or by sending them along to a hardware synthesizer. There can be remarkable differences in the sound produced by a MIDI file, depending on the machine on which it is played and the instrument samples it uses.

It is possible to play MIDI files on Wikipedia, but rather than relying on the user's browser and operating system to support MIDI files, it relies on an extension that internally converts the MIDI instructions into a digital audio file that is playable on most browsers, and displays an audio player. For example, here is a [[File:]] wikilink to a MIDI file:

The {{listen}} template shows this audio player when you specify a MIDI filename.

If a page has a [[Media:]] wikilink to a MIDI file, this directly links to the MIDI file, so the playback of the file does depend on the user's browser and operating system's support for MIDI files; many browsers will prompt to download the file. For example, Media:Twelve bar boogie-woogie blues in C.mid. As of May 2020 the {{Audio}} template for inline sounds directly links to the MIDI file, while the speaker icon next to the file name links to the emulated audio player. For example, audio speaker iconMIDI file of example of twelve bar blues

There is another way to play a MIDI file using the Score extension which renders a musical score and can also transform it into MIDI and thence into a digital audio file. An example is below.

Problems playing MIDI files directly

The following problems might occur when playing MIDI files:

  • The machine on which you play the file must have both the software and hardware required to play MIDI files. This is natively supported in Windows, used to be built into Macintosh computers by default. Now you may need to install additional software.
  • Your web browser might need a plug-in to play MIDI files by clicking on an embedded link in a web page. Firefox plug-ins that support MIDI playback include Quicktime (Fix common audio and video issues) as well as Totem. Internet Explorer supports MIDI playback by launching Windows Media Player, which plays MIDI natively. As of 2015-04, there seems to be no OS X 10.8+ browser plugin that allows playing MIDI files without downloading them first.
  • Your sound card mixer playback settings might need to be changed. You can enable and unmute all playback devices, and then increase the volume of all of them, to ensure that your sound card sends MIDI audio to its output.
  • MIDI files encoded with a more recent version of the MIDI standard might not be correctly rendered if your machine doesn't support that version of the standard.
  • Some hardware manufacturers produce proprietary extensions to the general MIDI standard that are not rendered by all MIDI players. Such hardware-specific extensions are to be avoided in MIDI files uploaded to Wikipedia.

If your sound card does not support MIDI – or on OS X 10.8+ –, free cross-platform software such as MuseScore and TiMidity is able to play these files after you have downloaded them to your computer, or convert them to other sound formats. VLC media player is a cross-platform open source media player that can play MIDI files with some configuration.

Free software is available to display the content of the most current types of MIDI files in sheet music or sequencer format, or both, including Rosegarden and Lilypond.


MIDI files may be created with MIDI sequencing software such as Cakewalk or scorewriting software such as Sibelius. MIDI may also be created within the editor as Lilypond is available in MediaWiki via the Score extension code. For example, this notation (of a simplified version of Solfeggietto in C minor by C.P.E. Bach):

<score sound="1">\relative c' { f d f a d f e d cis a cis e a g f e }</score>

transforms into

\relative c' { f d f a d f e d cis a cis e a g f e }

More complex scores, including lyrics, are also possible within MediaWikis.