the midi protocol - musical instrument digital interface

of 34/34
Audio Engineering

Post on 15-Jan-2015

513 views

Category:

Technology

2 download

Embed Size (px)

DESCRIPTION

This presentation walks you through the basics of the MIDI protocol. An abbreviation for Musical Instrument Digital Interface, MIDI is an industry standard communications protocol used for electronic musical instruments and other stage, sound, control equipment, to talk to each other.

TRANSCRIPT

  • 1. Audio Engineering

2. MIDI MIDI (Musical Instrument Digital Interface); is an industry-standard protocol that enables electronic musical instruments and other equipment to communicate, control and synchronize with each other and to exchange system data Devices such as computers, synthesizers, keyboard controllers, sound cards, samplers and drum machines MIDI does not transmit an audio signal or media! The sounds are generated by the synthesizer, which receives the MIDI data 3. History By the end of the 1970s, devices from different manufacturers were generally incompatible with each other. At the control level, they had their own specific laws for defining voltage to pitch conversions Dave Smith proposed a digital standard for musical instruments at the Audio Engineering Society show in New York The MIDI Specification 1.0 was established in August 1983 The MIDI specification has been rereleased many times since, listing new features In 1990, the International MIDI Association changed its name to the MIDI Manufacturers Association, MMA 4. Interfacing 5. MIDI Ports MIDI-In Port allows data to be received by a MIDI-compliant device MIDI-Out Port is used for transmitting data MIDI-Thru Port is used for linking a no. of MIDI devices with a single transmitter 6. MIDI Thru 7. New Interfacing methods 8. NetworksA MIDI network is a combination of hardware and software that provides interconnectivity between a group of MIDI devices, such as synthesizers, controllers, and sequencers 9. Protocol MIDI is a serial stream of data Runs at 31250 bits per second baud rate Describes event information Asynchronous transmission A 'standard' MIDI word consists of three bytes: The first is a Status byte, the second and third are Data bytes All status bytes have their MSB set to 1, whereas all data bytes have it set to 0 10. Messages MIDI messages commonly have at least one COMMANDSTATUS byte and may have zero or more DATA bytes Types of Messages: 1. Channel Messages 2. System Exclusive Messages 3. System Common Messages 4. System Real-Time Messages 11. Message NameByte 1Byte 2Byte 3ExampleChannel Messages1000 ccccThe MIDI key The velocity specifies specifies the number 83 3D 79 turns note 3D (decimal 61) on channel 3 off how quickly the noteof the key or note to with a velocity of 79 (decimal 121). release is affected. release.Note On1001 ccccThe MIDI key specifies the number of the key or note to turn on.The velocity specifies how quickly or 94 3D 79 turns note 3D (decimal 61) on channel 4 on forcefully the note is with a velocity of 79 (decimal 121). struck.Polyphonic Aftertouch1010 ccccThe MIDI number.The key pressure value.Control Change1011 ccccThe controller number The controller [0 - 119] [0 - 127]Program Change1100ccccThe new program -- n/a -(patch) number.C3 44 changes the program number for MIDI channel 3 to 44 (decimal 68).1101 ccccThe single greatest pressure value of all -- n/a -depressed keys.D3 44 changes the channel-pressure for MIDI channel 3 to 44 (decimal 68).Note OffChannel Pressure (Aftertouch) Pitch Change Bend)Wheel (Pitch 1110 cccckeyA0 3D 5A changes the pressure for note 3D (decimal 61) on channel 0 to a value of 5A (decimal 90).value B3 10 7F sets the value of controller number 10 (decimal 16) to 7F (decimal 127).Least significant 7Most significant 7-bits E1 70 37 sets the pitch-bend for channel 1 to a value bits of pitch-bend of pitch-bend value. of 03F8 (decimal 1016). value. 12. System Exclusive Messages System Exclusive Messages are generally longer MIDI messages that are used for a variety of purposes One of the primary purposes of the SysEx message is to send manufacturer-specific data to a MIDI synthesizer Each SysEx message begins with two data bytes F0 (1111 0000) and 0iiiiiii, where iiiiiii is a manufacturer's code and equipment only responds to messages with the correct manufacturer's code The SysEx message is terminated when the byte value F7 (1111 0111) is encountered 13. System Common Messages Message NameByte 1Byte 2Byte 3System ExclusiveF0 (1111 0000)The manufacture's identifier.uniqueReservedF1 (1111 0001)-- n/a ---- n/a --Song Position PointerF2 (1111 0010)Least significant 7-bits.Most significant 7-bits.Song SelectF3 (1111 0011)The song or sequence to be -- n/a -played.ReservedF4 (1111 0100)-- n/a ---- n/a --ReservedF5 (1111 0101)-- n/a ---- n/a --Tune RequestF6 (1111 0110)-- n/a ---- n/a --System Exclusive ENDF7 (1111 0111)-- n/a ---- n/a ---- n/a -- 14. System Real-Time Messages Message NameByte 1Byte 2Byte 3Timing ClockF8 (1111 1000)-- n/a ---- n/a --ReservedF9 (1111 1001)-- n/a ---- n/a --StartFA (1111 1010)-- n/a ---- n/a --ContinueFB (1111 1011)-- n/a ---- n/a --StopFC (1111 1100)-- n/a ---- n/a --ReservedFD (1111 1101)-- n/a ---- n/a --Active SensingFE (1111 1110)-- n/a ---- n/a --ResetFF (1111 1111)-- n/a ---- n/a -- 15. MIDI Controllers 16. Example 1. Note-On message: 0x90, 0x3C, 0x7F2. Aftertouch message(s): 0xD3, 0x463. Note-Off message: 0x80, 0x3C, 0x46 17. Composition & File formats MIDI composition and arrangement typically takes place using either MIDI sequencing/editing software on computers or using specialized hardware music workstations MIDI data files are much smaller than recorded audio waveforms The SMF specification was developed and is being maintained by, the MIDI Manufacturers Association (MMA) Karaoke files display lyrics synchronized with the music in "follow-the-bouncing-ball" fashion, turning any PC into a karaoke machine 18. Synthesizer A synthesizer is an electronic musical instrument that uses one or more sound generators to create waveforms which are then processed and combined in order to generate musical sounds MIDI synthesizers produce musical tones and percussion based on the input of MIDI software messages 19. Sequencer A music sequencer is an application or a device designed to record and play back musical notation A MIDI sequencer is the electronic version of the musician in the MIDI world A MIDI sequencer: a) records MIDI software message sequences b) replays MIDI software sequences with the appropriate timing c) provides some sort of editing capabilities The terms "Music Sequencer" and "Digital Audio Workstation" are often used interchangeably 20. SamplerA sampler is an electronic musical instrument which plays back recordings (or samples") that are loaded or recorded onto it to perform or compose music 21. Software samplers 22. MIDI Standards PatchFamily NamePatchFamily Name1-8Piano65 - 72Reed9 - 16Chromatic Percussion73 - 80Pipe17 - 24Organ81 - 88Synth Lead25 - 32Guitar89- 96Synth Pad33 - 40Bass97 - 104Synth Effects41 - 48Strings105 - 112Ethnic49- 56Ensemble113 - 120Percussive57 - 64Brass121 - 128Sound Effects 23. Musical Applications You can use a MIDI instrument with which youre comfortable to play the sounds belonging to any other MIDI device. Create rich musical textures by layering sounds from multiple MIDI devices, or assign different sounds to play in different pitch ranges. When you play a MIDI instrument, it produces data that can be captured by a MIDI sequencer. Sequencers arent just MIDI recorders, they let you fix mistakes, change the pitches of your notes, fix their timing, the way they play, the sounds they use, and more. 24. LED 1LED 2LED 3LED 4LED 5LED 6LED 7LED 8LCD SW1SW2SW3ATMega128 C TXSW4RXUART 1PC 25. LED 1LED 2LED 3LED 4LED 5LED 6LED 7LED 8LCD SW1SW2SW3Sends 0x90, 0x24, 0x7F to PC^B TXSW4RXUART 1PC 26. LED 1LED 2LED 3LED 4LED 5LED 6LED 7LED 8LCD SW1SW2SW3^Sends 0x91, 0x26, 0x7F to PCBS TXSW4RXUART 1PC 27. LED 1LED 2LED 3LED 4LED 5LED 6LED 7LED 8LCD SW1SW2SW3Sends 0x92, 0x31, 0x7F to PC^BSC TXSW4RXUART 1PC 28. LED 1LED 2LED 3LED 4LED 5LED 6LED 7LED 8LCD SW1SW2SW3Sends 0x93, 0x2E, 0x7F to PC^BSCH TXSW4RXUART 1PC 29. Non-musical Applications Show control Machine control Theatre lighting Console automation Special effects Sound design Recording system synchronization Audio processor control Computer animation Computer networking Video Jockeys 30. We have come a long way... 31. References 1. 2. 3. 4. 5.Webistes: Wikipedia (http://en.wikipedia.org/) How stuff works (http://www.howstuffworks.com/) MIDI Manufacturers Association (http://www.midi.org/) MIDI Reference from IO.com(http://www.io.com/) Tonalsoft (http://www.tonalsoft.com/) Books and eBooks: 1. eBook MIDI and the AVR AVRFreaks.com (http://www.avrfreaks.com/) 2. Audio Engineering: Know It All - Douglas Self 3. Audio Electronics, Second edition - John Linsley Hood 32. Thank You Bhaumik Bhatt