380 likes | 601 Views
MIDI. Introduction to the Musical Instrument Digital Interface. Happy birthday!. Well, it’s 23 years old this year Sigh. And I can remember the feature on Tomorrow’s World when I first heard about it…
E N D
MIDI Introduction to the Musical Instrument Digital Interface Dr Paul Vickers
Happy birthday! • Well, it’s 23 years old this year • Sigh. And I can remember the feature on Tomorrow’s World when I first heard about it… • Vince Clarke (Depeche Mode, Yazoo, Erasure) used to have 8 Casio CZ-101s and 1 BBC Model B Microcomputer connected by UMI-2B MIDIaudio stolen from Mad Jack’s page http://website.lineone.net/~mad.jack/ Dr Paul Vickers
Myself? • I had a BBC B and an Acorn Music 500 synth • It had no keyboard and was programmed using its own programming language Ample Music on this page stolen from Colin Fraser’s 500 page http://www.colinfraser.com/m5000/m5000.htm Dr Paul Vickers
Today? • Roland D-20 (1990) Boss DS-330 (1993), Oberheim MC-3000 (2000), numerous VST instruments Dr Paul Vickers
So what is it? • It’s a communications protocol • A music description language in binary form. • Each word describing an action of musical performance is assigned a specific binary code. • MIDI was designed for keyboards, so many of the actions are percussion oriented. • To sound a note in MIDI language you send a "Note On" message, and then assign that note a "velocity", which determines how loud it plays. • Other MIDI messages include selecting which instrument to play, mixing and panning sounds, and controlling various aspects of electronic musical instruments. Dr Paul Vickers
History • Early synths (1970s) were not designed with interconnectivity in mind. • Connected via two control ports, one for pitch and note on/off events, and the other to provide a timing reference. • The first consisted of two signals: a variable DC control voltage (CV), proportional to pitch; and a trigger pulse, or gate. • The second port consisted of a pulse train synchronized with an external clock Dr Paul Vickers
Drawbacks of CV • Only one note at a time could be controlled • Newer polyphonic instruments suffered • No agreement over external clock rate • Special conversion boxes were needed to over- or under-sample the clock • Connecting multiple instruments, especially from different manufacturers was complex and troublesome Dr Paul Vickers
Advent of MIDI • In 1983 Sequential Circuits, Roland Corporation, and Oberheim Electronics released MIDI 1.0 • MIDI spec. controlled by • MIDI Manufacturer's Association (MMA) • Japan MIDI Standards Committee Dr Paul Vickers
The specification • MIDI specifies • Hardware interface • Binary control language • MIDI file format Dr Paul Vickers
MIDI hardware • Bi-directional serial asynchronous link with data rate of 31,250 bits per second • 320s to transmit 10 bits (MIDI byte is 8 data bits plus a start bit and a stop bit = 10 bits) • In 1s can transmit >3000 bytes • Requires a 5-pin 180 DIN connector • Pins 1 & 3 not used • Pins 4 & 5 carry 5mA current loop • +5v = binary 0, 0v = binary 1 • Ports have opto-isolation to prevent interference Dr Paul Vickers
Electrical specification • Data converted byUART(universal asynchronousreceiver transmitter) • UART andmicroprocessorcommunicatevia interrupts andbuffers Dr Paul Vickers
Port requirements • A MIDI device must have • MIDI-IN and MIDI-OUT • Optionally MIDI-THRU • Thru port transmits a copy of data received on the IN port Dr Paul Vickers
Connections 1 - synth to computer From http://www.midipage.nl/uk_midi_aansl_1.html Dr Paul Vickers
Connections 2 - more complex • Daisy chain links shouldn’t exceed 3 devices due to transmission delays Dr Paul Vickers
Connections 3 – star network Dr Paul Vickers
MIDI bytes • Two types of information • Status • Data • Status messages generally indicate actions (e.g. pressing a key on the synth) • Data bytes supply the information for the status byte (e.g. velocity of key press) Dr Paul Vickers
MIDI message • A MIDI message has one status byte followed by 0..n data bytes • Status and data bytes are differentiated by bit 7 • Thus MIDI values go from 0..127 (27) Dr Paul Vickers
Channels • If > 1 device connected, which one should respond to the messages? • Messages are assigned to channels (16) • Devices set to respond to particular channels • Every message (except system messages) have a channel number which is stored in bits 0..3 of the status byte Dr Paul Vickers
7 status messages • 000 – Note off • 001 – Note on • 010 – Polyphonic key pressure • 011 – Control change • 100 – Program change • 101 – Channel pressure (aftertouch) • 110 – Pitch bend • Note on for channel 3 = 1 001 0010 Dr Paul Vickers
Example message • Note on uses 3 bytes • Status byte • Data byte for note number • Data byte for velocity • So, middle C (midi note no. 60) at medium volume (velocity 64) on channel 3 would be: • 10010010 (note on, channel 3) • 00111100 (data byte, value 60) • 01000000 (data byte, value 64) Dr Paul Vickers
Other messages • Other messages allow you • to select another timbre on the synthesiser (program change) • Add pitch bend • Add sustain • Change volume • Etc. Dr Paul Vickers
Not a sound format • As it’s only a control language, it’s not a sound format • MIDI merely allows devices to speak the same language • A MIDI file is a sequence of note-on note-off messages to instruct a tone generator to play music • The sound quality is totally depended on the quality of the synthesiser playing the file Dr Paul Vickers
MIDI files • Standard MIDI files (SMF) is a specification for storing MIDI data • 3 types: 0, 1, and 2 which just differ in the way the data are stored • MIDI files can be played by Windows Media Player (and others) and can be loaded and edited by MIDI sequencing software (word processors for MIDI!), e.g. Cubasis, Cubase, Logic, Cakewalk… • MIDI files don’t contain sound Dr Paul Vickers
Input & control • MIDI input normally comes from a MIDI-equipped instrument • Synthesiser/digital piano, etc. • Guitar with MIDI converter • Wind instrument converters (yes) • CV-MIDI boxes for old synths • Even voice-MIDI converters • Or from MIDI files • Or you create MIDI data using special sequencer programs Dr Paul Vickers
MIDI sequencing • Sequencers originally were hardware devices that allowed you to store sequences of control voltages to control CV synthesisers • Sequences were normally notes, but could be filter settings, gate controls, etc • Then MIDI hardware sequencers were developed • At the same time, people wrote software sequencers for Atari ST, Sinclair Spectrum, BBC Micro, Commodore Amiga Dr Paul Vickers
MIDI sequencers • Cubase and Cakewalk are two of the most well-known and long serving programs • Professional studios now use • ProTools (www.digidesign.com) • Cubase & Nuendo (www.steinberg.net) • Logic (www.emagic.de) • Reason (www.propellerhead.se) Dr Paul Vickers
Sequencers • A sequencer • Allows you to compose and store sequences of MIDI data to create songs • Organises the data in tracks (like on a multi-track tape recorder) • Has rich editing facilities (like a word processor) • Often prints music scores too • Current sequencers now let you mix audio with the MIDI data (see next week) Dr Paul Vickers
Limitations of MIDI • Not sufficient for music scoring • Assumes a 12-tone chromatic framework • What about just intonation? • Micro tuning? • Enharmonic distinctions (e.g. F sharp vs. G flat) • No way to represent performance dynamics • E.g. crescendo, diminuendo, etc. • Slow serial ports • 16 channel limit Dr Paul Vickers
Things to do with MIDI • Control one synth from another • Write and store music (sequencing) • Write your own MIDI programs • Sonify your own web pages (really!) • See www.beatnik.com (Thomas Dolby) • Combine MIDI with audio • Control effects boxes and light shows • Yes, you can do this. My reverb unit accepts MIDI controls so my synth can turn on the unit’s echo Dr Paul Vickers
Web sites • www.midi.org (MIDI manufacturers’ association) • www.midi.com • www.beatnik.com • Do some programming in CSound • Boulanger, R., Ed. (2000). The CSound Book: Perspectives in Software Synthesis, Sound Design, Signal Processing, and Programming. London: The MIT Press • http://www.csounds.com/ • http://music.dartmouth.edu/~dupras/wCsound/csoundpage.html Dr Paul Vickers
More reading • Braut, C. (1994). The Musician's Guide to MIDI Sybex. ISBN 0-7821-1285-4. • Roads, C., Ed. (1998). The Computer Music Tutorial. Cambridge, Massachusetts: MIT Press. ISBN 0-262-68082-3. • Kientzle, T. (1997). A Programmer's Guide to Sound. Reading, Massachusetts: Addison-Wesley. ISBN 0-201-41972-6. • Selfridge-Field, E., Ed. (1997). Beyond MIDI: The Handbook of Musical Codes. Cambridge, Massachusetts: MIT Press. ISBN 0-262-19394-9. Dr Paul Vickers