Presentation is loading. Please wait.

Presentation is loading. Please wait.

The MIDI Standard A.

Similar presentations


Presentation on theme: "The MIDI Standard A."— Presentation transcript:

1 The MIDI Standard A

2 Overview What is MIDI? Brief history of MIDI How does MIDI work?
Short Example MIDI Files and Connections Timing Issues Advantages and Disadvantages A

3 What is MIDI? MIDI stands for Musical Instrument Digital Interface
Standard that specifies the hardware interface and the data format of electronic instruments and audio systems Intended to connect to musical instruments, computers, and related audio devices Small file size, large range of instruments, and easy to modify MIDI is like sheet music, and sound cards are the instrument and musician A Picture Define channels

4 Why does MIDI exist? Before MIDI (early 1980s) there was no standard for communication between electronic musical instruments different manufacturers means different standards possibly trying to link analog and digital devices to each other limiting musicians ability to perform with many different machines Roland, a Japanese musical instrument company, proposed making a standard Wanted it to be simple and small The music community, specifically Roland, Oberheim Electronics, Sequential Circuits, Yamaha, Korg and Kawai, then created MIDI A

5 Basic Vocabulary Channel: synonymous to slave select
Each MIDI device usually has several channels Think of a channel as an individual capable of playing many instruments and switching between them Program/Patch: the “instrument” that the channel will be imitating (e.g. electric guitar, drum, bass, etc) MIDI Instrument: MIDI defines this as any MIDI device Include sequencer, synthesizer, drum machine, etc. S

6 MIDI Communication Protocol
MIDI messages are sent over asynchronous serial at baud Start bit, 8 data bits, stop bit 10 bits over a period of 320 mircoseconds per serial byte The messages are broken up into Status bytes and Data bytes Status byte is sent first, followed by each data byte S picture From MIDI 1.0 Specification

7 MIDI Communication Protocol
Upper 4 bits of the Status describe the command (MSB is always 1) Lower 4 bits are the channel number The structure of the data bytes is dependent on the command Instructions can be sent in real-time or stored in a MIDI file (depending on device) S

8 Some Important MIDI messages
NoteOn - 0x9M 0xNN 0xNN Plays a note with specific pitch and attack (volume) NoteOff - 0x8M 0xNN 0xNN Turns off a note on a channel ControlChange - 0xCM 0xNN Knob, switch, pedal, etc. Generated when state of a controller changes ProgramChange - 0xBM 0xNN Used to switch program on a specified channel System Exclusive Messages Unique to specific MIDI devices (determined by the manufacturer) M - channel select bits N - depends on input J

9 MIDI Note Range Zero-indexed from C-1 (note 0) to G9 (note 127)
This goes beyond the range of an 88-key piano C-1 is approximately 8 Hz -- below the human hearing range G9 is approximately 12.5 KHz -- within the typical human hearing range J

10 How does a MIDI synthesizer work?
When a key is pressed, a “NoteOn” message is generated based on the key That message is sent over serial to a microcontroller The microcontroller reads the message and play audio from a stored bank of samples When the key is released, a “NoteOff” message is sent in the same way Pedals, pitch wheels, knobs, and other devices can be used to send “ControlChange” messages that can modify the sound, select what instrument is being played, etc. J

11 Example MIDI Sequence Status Data1 - Pitch Data2 - Attack
animations Example from

12 Standard MIDI File (SMF)
Standardized file formats to save sequences that can then be played back on other MIDI devices Header contains information about the file arrangement track count, tempo, and format Type 0, 1 and 2 files Type 0: single track of entire performance Type 1: multitrack to be played back simultaneously Type 2 (rare): multiple arrangements, each arrangement in own track to be played sequentially Popular way to distribute music in Europe and Japan in the 1990s C

13 MIDI Connections 180° five-pin DIN connector
Typically only 3 pins used USB connectors also now common MIDI in, thru and out In: provides input from MIDI controller Thru: output signal that provides copy of the MIDI in (daisy chaining) Out: provides output to another MIDI device, perhaps a synthesizer Image sources: Pack/dp/B009GUP5SW, MIDI 1.0 Specification C Clarify USB connection

14 C “To avoid ground loops, and subsequent data errors, the transmitter circuitry and receiver circuitry are internally separated by an opto-isolator (a light emitting diode and a photo sensor which share a single, sealed package).” MIDI 1.0 Specification

15 https://whitefiles.org/b1_s/1_free_guides/fg1mt/pgs/h15g.htm C

16 Timing Issues 3 Bytes of data takes around 1ms to send
Sending the same info to all 16 channel can be a delay of 16ms Only one note can start or stop per MIDI instruction What if you want more than one to start or stop simultaneously? Some MIDI devices use timestamps to specify in advance when notes should stop or start. Using timers and interrupts, these instructions can be executed with significantly less delay! Length of cords can cause delay MIDI specifies maximum of 50 ft A

17 How has it changed over the years?
General MIDI (1991) Further specifications for MIDI-compatible instruments Must support 16 simultaneous channels Must support multiple simultaneous notes on each channel Defines the instrument mapped to each of the 128 possible patch numbers Also General MIDI Level 2 added a couple features Manufacturers have created their own specific supersets of MIDI Most just add support for their own patches Roland GS (1991) Yamaha XG (1994) A

18 MIDI Applications Primary application is based on audio and audio equipment Digital synthesizers and sequencers Digital Audio Workstations Effects units Lighting systems Video game music Early computer audio J

19 Advantages/Disadvantages
File sizes are much smaller than audio files Only contain instructions on how to play audio Multiple devices can be linked together MIDI sequences can be edited in ways that audio files cannot, such as changing pitch of a section Disadvantages: MIDI specification only describes how MIDI devices communicate Not what they do: slightly different sounds, different capabilities across devices Quality of sound is limited by playback device Most MIDI instruments have a different sound from their real instrument counterpart Can’t store vocals - still an audio file J

20 Conclusion MIDI is an excellent tool for communicating with or between musical instruments It has a large set of instructions that give plenty of versatility The communication protocol it uses is very simple MIDI is very widely-adopted On the other hand, vendor-specific supersets of MIDI can get confusing fast Sound quality cannot match actual recordings or real instruments J

21 Further reading The MIDI 1.0 Specification: Requires a free account to download Summary of MIDI Messages:

22 Questions?


Download ppt "The MIDI Standard A."

Similar presentations


Ads by Google