MIDI
Introduction
“MIDI (Musical Instrument Digital Interface, pronounced /ˈmɪdi/) is an industry-standard protocol defined in 1982[1] that enables electronic musical instruments such as keyboard controllers, computers, and other electronic equipment to communicate, control, and synchronize with each other. MIDI allows computers, synthesizers, MIDI controllers, sound cards, samplers and drum machines to control one another, and to exchange system data (acting as a raw data encapsulation method for sysex commands). MIDI does not transmit an audio signal or media — it transmits "event messages" such as the pitch and intensity of musical notes to play, control signals for parameters such as volume, vibrato and pa” (Musical Instrument Digital Wikipedia, retrieved 10:04, 26 May 2009 (UTC))
In more practical terms, with midi you can:
- Register what you played on a synthesizer, e.g. an electronic keyboard, with a symbolic language (MIDI).
- Play MIDI files on a synthesizer, i.e. an electronic instrument such as a keyboard, but also computer or mobile devices sound cards.
- Write computer programs that generate midi sounds (e.g. in instructional applications or computer games).
The advantage of using midi formats in educational technology and computer games, are twofold. Midi files take little space and sounds can be dynamically generated with relative ease.
See also:
- digital piano
- Yamaha CVP-509 digital piano
- digital music library (a page with links to repositories)
File formats
Standard Midi
Standard Midi File (SMF) include the following information:
- Tracks with music (sounds) that are played on channels
- Each sound can have extra information about how it should be played
More technicall speaking, MIDI defines messages:
- MIDI messages include an eith-bit status byte plus one or two data bytes
- The most important MIDI messages are Channel messages.
- Channel messages are either Channel Voice messages (sounds) or Mode Messages that define how the instrument will play the sound.
General Midi
“General MIDI or GM is a standardized specification for music synthesizers that respond to MIDI messages. [...] GM imposes several requirements beyond the more abstract MIDI 1.0 specification. While MIDI 1.0 by itself provides a protocol which ensures that different instruments can interoperate at a fundamental level (e.g. that pressing keys on a MIDI keyboard will cause an attached MIDI sound module to play musical notes)” (Wikipedia, retrieved 10:04, 26 May 2009 (UTC)).
GM was introduced in 1991, and is today a minimalist standard that ought be supported by most devices.
GM-compatible devices (e.g. synthesizers and sound-cards) are required to be able to:
- Define instrument sounds for each of the 128 possible program numbers. (Sometimes numbered between 0 and 127). These sounds or programs can then be associated with a channel. One channel can hold more than one track (!)
- Allow 24 voices to be active simultaneously (including at least 16 melodic and 8 percussive voices)
- Support 16 channels simultaneously (with channel 10 reserved for percussion)
- Support polyphony (multiple simultaneous notes) on each channel
- Controlling information for a sound: sound on/off, amount of modulation, overal volume, left-right pan, expression, sustain
General MIDI 2
Introduced in 1999, this specification extends General MIDI, e.g. with a larger instruments palette, additional control messages, etc.
Downloadable Sounds (DLS)
“DLS is a family of standardized file formats for digital musical instrument sound banks (collections of virtual musical instrument programs). The DLS standards also include detailed specifications for how MIDI protocol-controlled music synthesizers should render the instruments in a DLS file.” (Wikipedia, retrieved 10:04, 26 May 2009 (UTC).
eXtensible Music Format ("XMF")
“The Extensible Music Format (XMF) is a tree-based digital container format used to bundle music-oriented content, such as a MIDI file and optionally the sounds it uses, liner notes or other content grouped by language-codes.” (Wikipedia, retrieved 10:04, 26 May 2009 (UTC).)
Mimetypes and filename extensions
Midi files:
- The Standard MIDI File
- Mime type: audio/midi (or sometimes audio/x-midi ?)
- File extensions: .mid, .midi, or .smf
Midi kar files:
- Unofficial (but popular) karaoke extension
- Mime type:
- File extension: .kar
DLS:
- FC 4613
- Type: audio/dls
- File extensions: .dls
XMF:
- MIDI (SMF) plus DLS (downloadable sounds)
- RFC 4723
- Type: audio/mobile-xmf
- File extensions: .xmf
For more information, see Wikipedia's MIDI article or another source.
Inclusion of midi in web pages
A minimal solution is the following:
- Create a link to the midi file: http://tecfa.unige.ch/themes/FAQ-FL/son_dans_pageWEB/allegro.mid
- Configure the server to serv *.mid files as audio/x-midi
Depending on the browser, this may load a new page.
If you want embedded controls for the user:
- Use the embedd tag, e.g. like this
<embed src="http://tecfa.unige.ch/themes/FAQ-FL/son_dans_pageWEB/allegro.mid"
align="baseline" border="0" controls="smallconsole"
autostart="true" loop="2"/>
Note: Will not work in this wiki, since we don't allow the embedd tag.
In principle, one also could use the "object" tag, but sometimes it's not implemented.
There exist also JavaScript wrappers to deal with various browser and plugin combos.
Hardware
- Sound Cards
Most sound cards should be able to play MIDI directly if some player software like QuickTime is installed.
If your sound card doesn't handle midi, you can try a software synthesizer such as TiMidity++.
- Keyboards
Most keyboards do have a MIDI interface. Some (few) keyboards can't make sounds themselves, but only act as a MIDI controller.
- Other instruments
Other MIDI instruments include electronic drums, foot pedal keyboards, electronic wind instruments (EWI), and guitar synthesizers
Software
Midi clients for listening
- Quicktime and Windows Media player can play MIDI.
- See the Playing MIDI files article on Wikipeida]
- MIDI STUDIO MAX. A JavaScript program to make it work on Windows for various browsers + Windows Media player.
MIDI editors and sequencers
(at some point, we should reorganize a bit)
For longer lists, see:
- List of MIDI editors and sequencers on Wikipedia
- Music Sequencer on Wikipedia
- List of audio trackers on Wikipedia. These in principle are not MIDI, but but MOD (Module files).
Below, we just mention a few free products grouped by rough categories:
- Music Notation software
- Most Music notation software can write and read MIDI files
- See Music notation software
Some sequencers allow allow to edit with music notation and some music notation software may have some recording / playback capabilities.
- Sequencers (including multi-purpose tools)
- MusE is a free software MIDI/Audio sequencer for Linux (only) with recording and editing capabilities. It was originally written by Werner Schweer and now is developed by the Muse development team. Deb and RPM packages exist. In Ubuntu, it can be found in the "universe". (Wikpedia).
- Tested under Win 7-64 bit and Ubuntu 10.04 LTS. recommended - Daniel K. Schneider 12:08, 9 September 2011 (CEST). It also has been translated to many languages. To change, use Edit->Preferences.
- This program can import/export either MusicXML or Standard MIDI Files
- Open shared partitions at musescore.com directly in the editor.
- Z-Maestro is a commercial easy to use MIDI and digital audio sequencer for Windows. There is a free limited (and opensource) lite version (that uses FluidSynth as synthesizer).
- AriaMaestosa is an open-source (GPL) midi tracker/editor. It lets you compose, edit and play midi files with a few clicks in a user-friendly interface offering keyboard, guitar, drum and controller views. It can import (simple!) MIDI files and play a file on a connected keyboard. (tested under Win7 and a Yamaha CVP-509)
- Rosegarden is “is a free software digital audio workstation program developed for Linux with ALSA and QT4. It acts as an audio and MIDI sequencer, scorewriter and musical composition and editing tool. It is intended to be a free alternative to such applications as Cubase.” (Wikipedia), retrieved 12:08, 9 September 2011 (CEST).
- Anvil Studio. The free version can record music with MIDI and audio equipment, compose, sequence and play with a computer. Additional (commercial modules) include more features.
- PianoRollComposer is a MIDI sequencer for composing and playing music for Windows.
- Pd (aka Pure Data) is a real-time graphical data-flow programming environment for audio, video, and graphical processing. It's a branch of the family of patcher programming languages known as Max (Max/FTS, ISPW Max, Max/MSP, jMax, etc.
- Pure Data (Wikipedia)
- jMax is a system of the Max family, like notably Max/Msp and Puredata. It was developped in IRCAM at the end of the 90s, and was restarted in 2008.
- Composition software
- Software synthesizers
- TiMidity++ is a “a software synthesizer that can play MIDI files without a hardware synthesizer. It can either render to the sound card in real time, or it can save the result to a file, such as a PCM .wav file.” (Wikipedia, retrieved 12:08, 9 September 2011 (CEST)).
- FluidSynth is “a free open source software synthesizer which converts MIDI note data into an audio signal using SoundFont technology without need for a SoundFont-compatible soundcard. FluidSynth can act as a virtual MIDI device, capable of receiving MIDI data from any program and transforming it into audio on-the-fly. It can also read in SMF (.mid) files directly. On the output side, it can send audio data directly to an audio device for playback, or to a Raw or Wave file” (Wikipedia, retrieved 12:08, 9 September 2011 (CEST)). For Unix and Windows. Download FluidSynth on SourceForge.
Software developer tools
.... there are many more.
Links
- Some Wikipedia entries
Wikipedia includes several articles on MIDI standards, in particular:
- Musical Instrument Digital Interface (Wikipedia)
- Comparison of MIDI standards
- MIDI usage and applications (Wikipedia).
- General MIDI
- Extensible Music Format (XMF)
- Tutorials
- Midi.org tutorials
- Tutorial on MIDI and Music Synthesis, Jim Heckroth (1995). Good.
- MIDI Overview
- MIDI Basics, by Eric Lipscomb (1989). (Short high-level overview)
- Free repositories with Midi files
- See: digital music library (the page where we plan links to all different sorts of digital music)
- Commercial
- ....
- Technical infos
- midi.org/ (MIDI Manufacturers association). Includes the most important specifications.
- MIDI Controller Numbers (GM ?)
- Controllers
- Outline of the Standard MIDI File Structure