Guitar Australia

Please login or register.

Login with username, password and session length
Advanced search  


How do you make musicians complain?
Pay them.

Pages: [1]   Go Down

Author Topic: Introduction to MIDI  (Read 2129 times)


  • contributor
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 50
    • View Profile
Introduction to MIDI
« on: January 29, 2015, 05:18:35 PM »

Introduction to MIDI

MIDI is an acronym for Musical Instrument Digital Interface. It's an international standard for connecting all manner of musical equipment together and if you have any type of electronic gear, you've no doubt seen the MIDI connections on it somewhere.
If you are wishing to begin working with MIDI, but don't know where to start, hopefully this basic introduction will help you. If you already have a MIDI setup, you probably won't find much in this guide that you don't already know. Although you may come across some uses that you didn’t think of.

The Need For MIDI:
In the early nineteen eighties, there were many disparate electronic musical devices roaming the musical landscape. These devices included analogue synthesizers, drum machines, sequencers and various other keyboards.
It was possible to link certain pieces of gear from the same supplier(usually a requirement) together, if one wished to perform using synchronised machinery. This might include a solo performance using a keyboard and a drum machine. The drum machine might be triggered by a device known as a sequencer (discussed later) and all three units might be connected and set up in such a way that a performance would begin with the touch of a keyboard key. Signals would be sent to the drum machine, from the sequencer that

The above setup would be powerful and versatile, with one catch. You probably could not introduce a piece of equipment from a different manufacturer as more than likely, the communication protocols and physical connections would be incompatible. MIDI eliminates these problems by defining standards that all manufacturers can build to.

A MIDI Setup:
A MIDI device has input, output and sometimes 'thru' connections. The connections on a device are nearly always 'female', with the connecting lead consisting of 'male' connections at both ends.
The output jack (labelled 'out') of a MIDI device sends MIDI information out of the device. Can you guess what the 'in' jack is for? ;-)
Avoid confusion here and take careful note of the following. MIDI data is just that. It is data describing a musical performance. MIDI data does not create any audio signal of it’s own, like a .wav or .mp3 file would. You use the MIDI data (stored in a .mid file or played ‘live’ by a MIDI controller device) to drive a sound source. This could be a sound card with a built in synthesizer module or an external synthesizer. I’m going to assume that you will be using a computer to play, edit and organise your MIDI files. Often, your computer will have the ability to play MIDI files without the need to connect anything, this is because your soundcard has a tone generator/synthesizer that can be triggered by MIDI information.
If you wish to connect external MIDI devices to your computer, you’ll need to purchase a MIDI interface. This device, in it’s basic format, will usually have a MIDI IN and MIDI OUT jack, along with a USB connection. The USB will also power the unit. Also, if you have a USB Audio Interface, chances are, it’ll have MIDI connections enabling it to act as a MIDI interface.
The above describes what is technically known as a MIDI ‘port’.

What can you plug into the INPUT of a MIDI port?
A device that produces MIDI information! This includes the following:
- A keyboard with a MIDI OUT socket.
- Any other instrument with a MIDI OUT socket.
- A hardware sequencer or another computer with a MIDI OUT socket.

The above devices generate MIDI data based on how you played them. On the keyboard when you press a key, the note number, how fast/hard you hit the key and how long you held the key for, are recorded as data.

MIDI has 16 Channels:
Think of a MIDI channel as you would a single track in a multi-track recording. You select an instrument or ‘patch’ and that channel will transmit data on that channel and tell whatever device that’s being used to provide the audio, which instrument to use. You can only have one instrument per channel. But later, we’ll see how you could increase this amount.

Recording MIDI Data:
Using a method as described above, you would plug your MIDI input device (usually this will be a keyboard) into your computer. You select the instrument you want on the channel you want and hit record. Whatever you play will now be recorded as a MIDI file. Channel 10 is the default for drums. All this means is that most sound modules have a drum instrument setup on their channel 10. On every external sound module, you can setup which sounds are on which channel however you wish.

Editing MIDI Data:
This is where the real power of MIDI comes into play, I feel. Once you have your performance recorded as MIDI information, you can alter and edit it with ease. You can copy, cut and paste it, but you can also alter the key (transpose), change the instrument (try doing that with an audio recording!) and even tidy up the timing(quantisation) and dynamics(velocity) of the performance. Quantising is based on the idea that for any given tempo and time signature, there will be specific times when a note of any given length should fall. For instance, for a temp of 120 beats per minute, a quarter note will fall every half a second. When you recorded the performance, you may not have been this accurate! Your notes might fall slightly before or after the actual perfect timing. Now you might want this, and in most cases, you’ll want these imperfections in your performance, as they add feeling and groove to your work. But it’s nice to know that you can pull those notes back to the exact right positions (quantise them). And you can do a little or a lot of quantising, specified as a percentage. You can also ’offset’ where a note falls between where it’s exact correct position would be, and where the next note would be. This creates a ’swing’ effect and can be useful to spice up a dull sounding rhythm part for example. Think of a shuffle feel and you’ve got it.
The volume of each note is described using ‘velocity’ data. Double clicking on a channel from within 99% of modern music software will bring up a screen with just the data pertaining to that channel. Once again, this is analogous to an audio track in a conventional multi-track session. Most likely, down the bottom, directly under each note, there’ll be a little bar denoting the velocity of that note. All together, these bars make up a graph. You can select a drawing tool and manually alter the velocities for individual notes, or even draw across the graph to create volume sweeps. Another method would be to select multiple notes, then type in velocity values from a dialog box.

So you can see that MIDI affords powerful manipulation of your music. I find MIDI to be excellent for trying out ideas, as you can simply listen to the same part with any instrument you like!

What Is This Data?
Technically, the information being sent and received is binary data, in 'byte' sized chunks. The actual data being sent will be specific to the task at hand, and I'll outline some of these as the guide progresses, but first...
Music can be broken up, or abstracted in various ways in order to describe it. Obviously, common musical notation is a prime example. The note to be played on a violin can be represented by a dot, on or between the five lines of a musical staff. Additionally, the dot may be solid or un-filled, with various attachments to an optional 'tail' defining the duration the note should be played for. MIDI instruments output this type of data in a serial stream of bytes. This data includes which note (a number) was played, how hard (known as 'velocity') and for how long it was played. Sometimes, information about how the note ended is sent too. This is called 'aftertouch' information. The technical name for all of this type of data is 'performance' data. if you want to have a look at this data, you can select ‘MIDI Listing’ from the appropriate menus on the program you are using. Beware, this listing will look confusing at first!

You can also embed which instrument you were using into the MIDI file. This brings us to the MIDI file itself. If you studied the file under a microscope, you’d see that it was really a big list of byte data. At the start of the file, you’d usually find a set of data describing which instruments the files author has chosen for each channel.

Sound Modules:
This is where things get interesting and tricky. A sound module is the device that when sent MIDI data, will produce an audio signal from it’s outputs. By sound module, I mean any device that can do this. Sound cards included along side standalone synth modules.

There are two main methods that are used within sound modules. The first method (probably what your soundcard does) is to play samples of real instruments. A real piano, or trumpet etc will be recorded and made into a short digital file. This file will be stored in a ROM module, and when a MIDI message requesting that particular instrument is received, the sound source will play back this file. In order to achieve multiple notes, often many notes are recorded from the real instrument. Cheaper sound source devices will rely on fewer actual samples and just play back the same sample at different speeds, thus altering the pitch. This sounds OK for small pitch ranges of only a few notes, but the speeding up can become obvious for larger variations of more than about four notes. The downside of recording more real notes is the extra memory required to store the extra samples.
Using a sound card is a great, simple way to get into MIDI, but there are limitations. Unless you have a fairly good soundcard, it will be difficult to adjust the default sounds for each channel. Also, the sounds from most sound cards are not extremely realistic. This is where a sampler might come in handy. I’m talking about a software sampler, but the same applies to a hardware device. A sampler can create ‘sound fonts’ of instruments. You feed it source information and place these sounds into a bank of sounds that will be triggered by a MIDI file or device. This way, you can achieve higher quality than you may find from your soundcard. Sampling is a big topic though, and a great source of information on it can be found here:

The second method used by sound source devices is to use a synthesizer. The incoming MIDI information is used to control the synthesizer, as though someone was just playing it normally. In many modern synthesizers, the above sampling method is used for a lot of their sounds, but MIDI can be used to control analogue synthesizers if they are equipped with a MIDI port. Drum machines and software synthesizers also fit this category. With a software synthesizer, you setup the sounds you’d like with the synthesizer program, then assign this setup to a MIDI channel from in your music editing software (Cakewalk, Sonar etc).

MIDI Connection:
Your computer will be running software that contains a MIDI sequencer. Think of this as the conductor. From the sequencer, you send MIDI signals either to the soundcard, or to external sound sources or both. You can also ‘chain’ MIDI sound sources together by connecting the MIDI THRU from one unit into the MIDI IN of the next. MIDI OUT can also be used in this application, as it more than likely is just mirroring the input signal (which is exactly what MIDI THRU does). This is how to get more than 16 channels of instruments.
When you use external sound source devices, you’ll probably need to setup ‘performances’ on them. This simply means that you assign the instruments you want for each channel. Bare in mind that a MIDI file will usually contain ‘Program Change’ messages. These will override your ‘performance’ settings on your sound source device, but you can instruct the sound source device to ignore these messages.

General MIDI:
Also known as GM, this is an arrangement of instruments in a standard way. MIDI instruments are selected based on a number from 0 to 127 (128 variations). If you produce a MIDI file using these GM assignments, others can play back your file and all the instruments will be correct on whichever sound source device they use. This is opposed to producing your own ‘performance’ arrangement.

Other Uses For MIDI:
Just as MIDI can be used to describe a musical performance, it can also be used to describe settings for a piece of equipment. For example, a guitar FX unit I own stores all the settings as MIDI data. I can plug a MIDI cable into the FX unit and send them to my computer to make a backup of the internal settings.

Another fairly recent (past 15 years or so) employment for MIDI has been in the software controller area. Here, a device with faders, control knobs and transport controls (stop, record etc) can be used to control your music creation software. Often it’s much nicer to mix and work with a real controls than it is to use a mouse. These devices are known as ‘control surfaces’.

I hope I covered the basics of MIDI and how to get started with it, but if there’s some gaping hole I’ve left in your understanding, please ask about it in this thread. Maybe I or someone else can help you, and others will also be able to see the same answer.
Pages: [1]   Go Up