Help:Media (MIDI)

From The Goon Show Depository

Playing standard MIDI files

Standard MIDI files trigger sounds played on a synthesizer. Play 

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 here, 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, MIDI 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.
  • Since around 2017 web browsers such as Firefox and Google Chrome dropped support for NPAPI plug-ins like Quicktime and Totem that could play MIDI files by clicking on an embedded link in a web page. Internet Explorer supports MIDI playback by launching Windows Media Player, which plays MIDI natively. As of April 2015, 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.

Creating

You can create MIDI files with MIDI sequencing software such as Cakewalk or scorewriting software such as Sibelius. Wikipedia editors may also create MIDI files by putting music score code in Lilypond or ABC format in the text of Wikipedia articles, which the Score extension code turns into MIDI. 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 <score sound="1">\relative c' { f d f a d f e d cis a cis e a g f e }</score> Click on the musical score image to get a link to download the MIDI file.

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