thumb|Example of music created in MIDI format
thumb|alt=Several rack-mounted synthesizers that share a single controller|Using MIDI, a single controller (often a musical keyboard, as pictured here) can play multiple electronic instruments, which increases the portability and flexibility of stage setups. This system fits into a single rack case, but before MIDI, it would have required four separate full-size keyboard instruments, plus outboard mixing and [[effects units.]]
Musical Instrument Digital Interface (; MIDI) is an American-Japanese technical standard that describes a communication protocol, digital interface, and electrical connectors that connect a wide variety of electronic musical instruments, computers, and related audio devices for playing, editing, and recording music. A single MIDI cable can carry up to sixteen channels of MIDI data, each of which can be routed to a separate device. Each interaction with a key, button, knob or slider is converted into a MIDI event, which specifies musical instructions, such as a note's pitch, timing and velocity. One common MIDI application is to play a MIDI keyboard or other controller and use it to trigger a digital sound module (which contains synthesized musical sounds) to generate sounds, which the audience hears produced by a keyboard amplifier. MIDI data can be transferred via MIDI or USB cable, or recorded to a sequencer or digital audio workstation for editing or playback. A MIDI recording of a performance on a keyboard could sound like a piano or other keyboard instrument; however, since MIDI records the messages and information about their notes and not the specific sounds, this recording could be changed to many other sounds, ranging from synthesized or sampled guitar or flute to full orchestra.
Before the development of MIDI, electronic musical instruments from different manufacturers had limited facilities to communicate with each other, principally using CV/gate connections. With MIDI, any MIDI-compatible keyboard (or other controller device) can be connected to any other MIDI-compatible sequencer, sound module, drum machine, synthesizer, or computer, even if they are made by different manufacturers.
MIDI technology was standardized in 1983 by a panel of music industry representatives and is maintained by the MIDI Manufacturers Association (MMA). All official MIDI standards are jointly developed and published by the MMA in Los Angeles and the MIDI Committee of the Association of Musical Electronics Industry (AMEI) in Tokyo. In 2016, the MMA established The MIDI Association (TMA) to support a global community of people who work, play, or create with MIDI.
History
In the early 1980s, there was no standardized means of synchronizing electronic musical instruments manufactured by different companies. Manufacturers had their own proprietary standards to synchronize instruments, such as CV/gate, DIN sync and Digital Control Bus (DCB). Ikutaro Kakehashi, the president of Roland, felt the lack of standardization was limiting the growth of the electronic music industry.
Kakehashi felt that Oberheim's system was too cumbersome, and spoke to Dave Smith, the president of Sequential Circuits, about creating a simpler, cheaper alternative. thumb|Dave Smith (right), one of the creators of MIDIUsing Roland's DCB as a basis, at the Audio Engineering Society show in October 1981. The standard was discussed and modified by representatives of Roland, Yamaha, Korg, Kawai, and Sequential Circuits. Kakehashi favored the name Universal Musical Interface (UMI), pronounced you-me, However, he liked the use of instrument instead of synthesizer, and proposed Musical Instrument Digital Interface (MIDI).
At the 1983 Winter NAMM Show, Smith demonstrated a MIDI connection between Prophet 600 and Roland JP-6 synthesizers. The MIDI specification was published in August 1983. In 1983, the first instruments were released with MIDI, the Roland Jupiter-6 and the Prophet 600. In 1983, the first MIDI drum machine, the Roland TR-909, and the first MIDI sequencer, the Roland MSQ-700, were released.
The MIDI Manufacturers Association (MMA) was formed following a meeting of "all interested companies" at the 1984 Summer NAMM Show in Chicago. The MIDI 1.0 Detailed Specification was published at the MMA's second meeting at the 1985 Summer NAMM Show. The standard continued to evolve, adding standardized song files in 1991 (General MIDI) and adapted to new connection standards such as USB and FireWire. In 2016, the MIDI Association was formed to continue overseeing the standard. An initiative to create a 2.0 standard was announced in January 2019. The MIDI 2.0 standard was introduced at the 2020 Winter NAMM Show.
The BBC cited MIDI as an early example of open-source technology. Smith believed MIDI could only succeed if every manufacturer adopted it, and so "we had to give it away".
Impact
MIDI's appeal was originally limited to professional musicians and record producers who wanted to use electronic instruments in the production of popular music. The standard allowed different instruments to communicate with each other and with computers, and this spurred a rapid expansion of the sales and production of electronic instruments and music software. MIDI's introduction coincided with the dawn of the personal computer era and the introduction of samplers and digital synthesizers. The creative possibilities brought about by MIDI technology are credited for helping revive the music industry in the 1980s.
MIDI introduced capabilities that transformed the way many musicians work. MIDI sequencing makes it possible for a user with no notation skills to build complex arrangements. A musical act with as few as one or two members, each operating multiple MIDI-enabled devices, can deliver a performance similar to that of a larger group of musicians. The expense of hiring outside musicians for a project can be reduced or eliminated, As of 2022, Smith's original MIDI design is still in use.
Applications
Instrument control
MIDI was invented so that electronic or digital musical instruments could communicate with each other and so that one instrument can control another. For example, a MIDI-compatible sequencer can trigger beats produced by a drum sound module. Analog synthesizers that have no digital component and were built prior to MIDI's development can be retrofitted with kits that convert MIDI messages into analog control voltages. MIDI also provides remote control over instrument parameters like volume, effects, etc.
Synthesizers and samplers contain various tools for shaping an electronic or digital sound. Filters adjust timbre, and envelopes automate the way a sound evolves over time after a note is triggered. The frequency of a filter and the envelope attack (the time it takes for a sound to reach its maximum level), are examples of synthesizer parameters, and can be controlled remotely through MIDI. Effects devices have different parameters, such as delay feedback or reverb time. When a MIDI continuous controller number (CCN) is assigned to one of these parameters, the device responds to any messages it receives that are identified by that number. Controls such as knobs, switches, and pedals can be used to send these messages. A set of adjusted parameters can be saved to a device's internal memory as a patch, and these patches can be remotely selected by MIDI program changes.
Composition
MIDI events can be sequenced with computer software, or in specialized hardware music workstations. Many digital audio workstations (DAWs) are specifically designed to work with MIDI as an integral component. MIDI piano rolls have been developed in many DAWs so that the recorded MIDI messages can be easily modified. These tools allow composers to audition and edit their work much more quickly and efficiently than did older solutions, such as multitrack recording. Compositions can be programmed for MIDI that are impossible for human performers to play.
Because a MIDI performance is a sequence of commands that create sound, MIDI recordings can be manipulated in ways that audio recordings cannot. It is possible to change the key, instrumentation or tempo of a MIDI arrangement, or even edit individual notes. The ability to compose ideas and quickly hear them played back enables composers to experiment.
Algorithmic composition programs provide computer-generated performances that can be used as song ideas or accompaniment. After Roland sold MPU sound chips to other sound card manufacturers, The widespread adoption of MIDI led to computer-based MIDI software being developed. Retro Innovations also makes a MIDI interface cartridge for Tandy Color Computer and Dragon computers.
Chiptune musicians also use retro gaming consoles to compose, produce and perform music using MIDI interfaces. Custom interfaces are available for the Family Computer/Nintendo Entertainment System, Game Boy, Game Boy Advance and Sega Mega Drive/Sega Genesis.
<span class="anchor" id="Standard files"></span>Computer files
thumb|MIDI files contain sound events such as a finger striking a key, which can be visualized using software such as [[Synthesia (video game)|Synthesia.]]
A MIDI file is not an audio recording. Rather, it is a set of instructionsfor example, for pitch or tempoand can use a thousand times less disk space than the equivalent recorded audio. Due to their tiny filesize, fan-made MIDI arrangements became an attractive way to share music online, before the advent of broadband internet access and multi-gigabyte hard drives. The major drawback to this is the wide variation in quality of users' audio cards, and in the actual audio contained as samples or synthesized sound in the card that the MIDI data only refers to symbolically. Even a sound card that contains high-quality sampled sounds can have inconsistent quality from one sampled instrument to another. played back through low-quality digital-to-analog converters. The low-fidelity reproduction and the quality of its playback depends entirely on the quality of the sound-producing device. The compact size of these files led to their widespread use in computers, mobile phone ringtones, webpage authoring and musical greeting cards. These files are intended for universal use and include such information as note values, timing and track names. Lyrics may be included as metadata, and can be displayed by karaoke machines.
SMFs are created as an export format of software sequencers or hardware workstations. They organize MIDI messages into one or more parallel tracks and time-stamp the events so that they can be played back in sequence. A header contains the arrangement's track count, tempo and indicates which of three SMF formats the file uses. A type 0 file contains the entire performance, merged onto a single track, while type 1 files may contain any number of tracks that are performed synchronously. Type 2 files are rarely used and store multiple arrangements, with each arrangement having its own track to be played in sequence.
RMID files
Microsoft Windows bundles SMFs together with Downloadable Sounds (DLS) in a Resource Interchange File Format (RIFF) wrapper, as RMID files with a <code>.rmi</code> extension. RIFF-RMID has been deprecated in favor of Extensible Music Files (XMF).
Software
The main advantage of the personal computer in a MIDI system is that it can serve a number of different purposes, depending on the software that is loaded.
Sequencers may take alternate forms, such as drum pattern editors that users can use to create beats by clicking on pattern grids,
Notation programs include Finale, Encore, Sibelius, MuseScore and Dorico. SmartScore software can produce MIDI files from scanned sheet music.
Editors and librarians
Users can program their equipment through the patch editor as a computer interface. These became essential with the appearance of complex synthesizers such as the Yamaha FS1R, which contained several thousand programmable parameters, but had an interface that consisted of fifteen tiny buttons, four knobs and a small LCD. Digital instruments typically discourage users from experimentation, due to their lack of the feedback and direct control that switches and knobs provide, Some editors are designed for a specific instrument or effects device, while other, universal editors support a variety of equipment, and ideally can control the parameters of every device in a setup through the use of System Exclusive messages. Universal editor/librarians that combine the two functions were once common, and included Opcode Systems' Galaxy, eMagic's SoundDiver, and MOTU's Unisyn. Although these older programs have been largely abandoned with the trend toward computer-based synthesis using virtual instruments, several editor/librarians remain available, including Coffeeshopped Patch Base, Sound Quest's Midi Quest, and several editors from Sound Tower. Native Instruments' Kore was an effort to bring the editor/librarian concept into the age of software instruments, but was abandoned in 2011.
Auto-accompaniment programs
Programs that can dynamically generate accompaniment tracks are called auto-accompaniment programs. These create a full-band arrangement in a style that the user selects and sends the result to a MIDI sound-generating device for playback. The generated tracks can be used as educational or practice tools, as accompaniment for live performances, or as a songwriting aid. Synthesizers implemented in software are subject to timing issues that are not necessarily present with hardware instruments, whose dedicated operating systems are not subject to interruption from background tasks as desktop operating systems are. These timing issues can cause synchronization problems, and clicks and pops when sample playback is interrupted. Software synthesizers also may exhibit additional latency in their sound generation.
The roots of software synthesis go back as far as the 1950s, when Max Mathews of Bell Labs wrote the MUSIC-N programming language, which was capable of non-real-time sound generation. Reality, by Dave Smith's Seer Systems was an early synthesizer that ran directly on a host computer's CPU. Reality achieved a low latency through tight driver integration, and therefore could run only on Creative Labs soundcards. Syntauri Corporation's Alpha Syntauri was another early software-based synthesizer. It ran on the Apple IIe computer and used a combination of software and the computer's hardware to produce additive synthesis. Some systems use dedicated hardware to reduce the load on the host CPU, as with Symbolic Sound Corporation's Kyma System, which power an entire recording studio's worth of instruments, effect units, and mixers. The ability to construct full MIDI arrangements entirely in computer software allows a composer to render a finalized result directly as an audio file. and "primitive".
Wavetable daughterboards that were later available provided audio samples that could be used in place of the FM sound. These were expensive, but often used the sounds from respected MIDI instruments such as the E-mu Proteus.
Other applications
Despite its association with music devices, MIDI can control any electronic or digital device that can read and process a MIDI command. MIDI has been adopted as a control protocol in a number of non-musical applications. MIDI Show Control uses MIDI commands to direct stage lighting systems and to trigger cued events in theatrical productions. VJs and turntablists use it to cue clips, and to synchronize equipment, and recording systems use it for synchronization and automation. Wayne Lytle, the founder of Animusic, derived a system he dubbed MIDIMotion, which he used to produce the Animusic series of computer-animated music video albums. Animusic later designed its own animation software specifically for MIDIMotion called Animotion. Apple Motion allows for a similar control of animation parameters through MIDI. The 1987 first-person shooter game MIDI Maze and the 1990 Atari ST puzzle video game Oxyd use MIDI to network computers together.
Devices
Connectors and interface
DIN connector
Per the original MIDI 1.0 standard, cables terminate in a 180° five-pin DIN connector (DIN 41524). Typical applications use only three of the five conductors: a ground wire (pin 2), and a balanced pair of conductors (pins 4 and 5) that carry the MIDI signal as an electric current. This connector configuration can only carry messages in one direction, so a second cable is necessary for two-way communication. Some proprietary applications, such as phantom-powered footswitch controllers, use the spare pins for direct current (DC) power transmission.
Opto-isolators keep MIDI devices electrically separated from their MIDI connections, which prevents ground loops and protects equipment from voltage spikes.
TRS minijack connector
To save space, some MIDI devices (smaller ones in particular) started using 3.5 mm TRS phone connectors (also known as audio minijack connectors). This became widespread enough that the MIDI Manufacturers' Association standardized the wiring. The MIDI-over-minijack standards document also recommends the use of 2.5 mm connectors over 3.5 mm ones to avoid confusion with audio connectors.
Thru port
Most devices do not copy messages from their input to their output port. A third type of port, the thru port, emits a copy of everything received at the input port, to pass data forwarded to another instrument Not all devices feature thru ports, and devices that lack the ability to generate MIDI data, such as effects units and sound modules, may not include out ports.
Management devices
Each device in a daisy chain adds delay to the system. This can be avoided by using a MIDI thru box, which contains several outputs that provide an exact copy of the box's input signal. A MIDI merger combines input from multiple devices into a single stream, so multiple controllers can connect to a single device. A MIDI switcher switches between multiple devices, and eliminates physical repatch cables. MIDI routers combine all these functions—with multiple inputs and outputs, able to rout any combination of input channels to any combination of outputs. Routing setups can be created using computer software, stored in memory, and selected by MIDI program change commands. MIDI data processors are used for utility tasks and special effects. These include MIDI filters, which remove unwanted MIDI data from the stream, and MIDI delays, effects that send a repeated copy of the input data at a set time. Because MIDI is serial, it can only send one event at a time. If an event is sent on two channels at once, the event on the second channel cannot transmit until the first one is finished, and so is delayed by 1 ms. If an event is sent on all channels at the same time, the last channel's transmission is delayed by as much as 16 ms. This contributed to the rise of MIDI interfaces with multiple in- and out-ports, because timing improves when events are spread between multiple ports as opposed to multiple channels on the same port.
Controllers
thumb|alt=A Novation Remote 25 two-octave MIDI controller|Smaller MIDI controllers are popular due to their portability. This two-[[octave unit provides a variety of controls for manipulating various sound design parameters of computer-based or standalone hardware instruments, effects, mixers and recording devices.]]
There are two types of MIDI controllers: performance controllers that generate notes and are used to perform music, and controllers that may not send notes, but transmit other types of real-time events. Many devices are a combination of the two types.
Keyboards are by far the most common type of MIDI controller. This was seen as a limitation by composers who were not interested in keyboard-based music, but the standard proved flexible, and MIDI compatibility was introduced to other types of controllers, including guitars, and other stringed instruments and drum controllers and wind controllers, which emulate the playing of drum kit and wind instruments, respectively and specialized and experimental controllers. Some of these shortcomings have been addressed in extensions to the protocol.
Software synthesizers offer great power and versatility, but some players feel that division of attention between a MIDI keyboard and a computer keyboard and mouse robs some of the immediacy from the playing experience. Devices dedicated to real-time MIDI control provide an ergonomic benefit and can provide a greater sense of connection with the instrument than an interface that is accessed through a computer. Controllers may be general-purpose devices that are designed to work with a variety of equipment, or they may be designed to work with a specific piece of software. Examples of the latter include Akai's APC40 controller for Ableton Live, and Korg's MS-20ic controller, a reproduction of the control panel on their MS-20 analog synthesizer. The MS-20ic controller includes patch cables that can be used to control signal routing in their virtual reproduction of the MS-20 synthesizer and can also control third-party devices.
Instruments
thumb|alt=A General MIDI sound module.|A [[sound module, which requires an external controller (e.g., a MIDI keyboard) to trigger its sounds. These devices are highly portable, but their limited programming interface requires computer-based tools for comfortable access to their sound parameters.]]
A MIDI instrument contains ports to send and receive MIDI signals, a CPU to process those signals, an interface for user programming, audio circuitry to generate sound, and controllers. The operating system and factory sounds are often stored in a read-only memory (ROM) unit.]]
MIDI messages are made up of 8-bit bytes transmitted at 31,250
