Logo

Musical Instrument Digital Interface (MIDI)

Show lesson content
Musical Instrument Digital Interface (MIDI)
In this video I will look at MIDI. MIDI is a communication protocol that provides an interface between different musical instruments. This video will look at the basics of how MIDI works.

Musical Instrument Digital Interface (MIDI)
MIDI or Musical Instrument Digital Interface is a protocol for musical instruments to communicate with each other. The MIDI standard was first published in 1993 and continues to be updated and supported today.

Rather than trying to explain how it works, let’s consider an example of how MIDI can be used. Firstly, I have a keyboard that supports MIDI. The MIDI connection allows the keyboard to be plugged into a computer.

The computer can now record the keys that are pressed on the keyboard. This includes a value that represents how much force or how rapidly a key was pressed. There is a limit to what can be achieved on a keyboard, so you may want to add additional instruments like a drum machine. You want to be able to control the drum machine like the keyboard using the computer; however, you want them also to be in sync with each other. In order to do this, a MIDI connection is run from the keyboard to the drum machine.

You can also add additional devices, for example an FX device could be added to the drum machine. The MIDI cables connect each device in a daisy-chain like fashion. This allows each device to be controlled. MIDI also allows the devices to be run in sync with each other.

The advantage of this is not only control, but also the output from these devices can be recorded to the computer. The computer can then save this output to a MIDI file. Since MIDI only saves information such as which instrument was played, how long each key was pressed and how loud the music was, MIDI files are very small. For example, approximately seven minutes of a Beethoven symphony can be recorded onto a 60 Kilobyte file. However, if this was converted to a high-quality audio file, it would be approximately 80 Megabytes in size.

A MIDI file can be copied between different computers and played on those computers. For example, this is an example of a MIDI file being played.

As you can hear, there are sounds for piano and drums. The MIDI file essentially only contains the notes that are played, which allows the file to be quite small. However, there are limitations to this. Let’s have a look.

MIDI Format
A MIDI file essentially contains all the notes that are played, the instruments that are played, the length of the notes and their loudness. Think of the MIDI file like a sheet of music. A sheet of music is essentially a printed document that represents music by the use of symbols. The musician can read these symbols and know when to play the required notes. MIDI is essentially the same concept as it contains all the notes and when they are to be played.

In order to play a MIDI file, you need a device that is able to play them. In this case, I will use a computer to play the MIDI file. The computer will read the MIDI file and output it to some speakers. Essentially the computer is reading the notes in the MIDI file and changing them to a sound. The problem with this approach is that the sound is limited by the reproduction ability of the output device.

In the old days of DOS, this was more of a problem. This was because sound hardware was not as good as it is today. In the old days, MIDI could potentially sound very different depending on what hardware it was played on. Nowadays, basic MIDI files sound pretty much the same regardless of which device you play them on.

The MIDI files can be standardized to use certain instruments. These common instruments are supported across most devices and computers. Since these instruments are standardized, there is a limit to the results you can produce, since you are limited to the standard instruments. If you use a non-standard instrument, the instrument will not sound the same if played on a different device that does not have that instrument. When this occurs, the device will generally substitute one instrument for another. If the instrument is similar, it may not be that noticeable, but if it is too different, the playback of the song won’t sound right.

There are some other limitations to MIDI. Let’s take a look.

MIDI
To use MIDI to control instruments, you would first need to set up your computer to use MIDI. I will look at what you need in order to do that later in the video. Before doing this, you will need some MIDI enabled devices. The MIDI standard supports up to 16 instruments. This includes your basic piano-like keyboards, drum machines, guitars, FX devices and foot pedals, just to name a few. Even though MIDI was designed for music, it also has been used for controlling lighting. Essentially, using MIDI, you can easily turn switches on and off. You could also set a slider to a particular value. When you think about it, this easily translates to switching lights on or off and/or setting the brightness for a light.

MIDI supports 128 patches per instrument. A patch is essentially a sound or a note. It is made up by using oscillators or audio samples. For example, you could create a drum sound by recording a real drum and playing back that sound. You could also recreate a drum sound synthetically which is the same process used by a synthesizer. The point is that each patch plays a different sound. When the sound is played, the length and pitch of the sound can all be controlled through MIDI.

MIDI will support basic music requirements; however, in some cases the standard may not support additional features of the device. When this occurs, the vendor can add custom commands to MIDI. In order for these to work, the MIDI software you are using would need to support these custom commands.

Now that we have had a look at how MIDI works, let’s now have a look at how you would connect it.

MIDI Connections
Instruments that support MIDI need to be connected together in order to operate. For the CompTIA exam you only need a very basic understanding of MIDI. It is unlikely they will ask a question on how to connect devices, but if you come across some, you should know how to do it.

If you have a look at a MIDI device, it may have some ports like these. Depending on the instrument, there may be more or fewer ports. Modern instruments generally have a USB port, which makes things easy, as it will be plug and play. Like any other USB device, you just need to plug it in. Some modern instruments may also support networking or Bluetooth.

The old standard of MIDI uses a five-pin din plug. In this example there are three din plugs on this instrument. However, your instrument may have no din plugs, one or more. The ‘IN’ port receives data. For example, if the computer is controlling the instrument, then the control data will be sent to the instrument via this port. This port can also receive MIDI information from other devices.

The next port is the MIDI ‘OUT’ port. This port sends out data that the instrument creates. This is the often-confusing part about MIDI. Since you can connect up to 16 devices together, the data may need to be sent onto another device in order to be processed. In order to allow this process to occur, another port called the ‘THRU’ port may be present. This port essentially copies all the data from the IN port and OUT ports. When using multiple instruments, you will generally connect the THRU port from one instrument to the IN port of the next instrument.

Once you have connected your devices, the next step is to make sure that each device has a different device ID assigned to it. If you have two instruments with the same ID, they will both be receiving and processing the same commands.

For the general IT technician, you probably won’t come across MIDI other than the occasional MIDI file. However, you never know; you may need to fix a computer that is in a music studio. Having a basic understanding of MIDI may come in handy.

End Screen
That concludes this video from ITFreeTraining on MIDI. I hope you have found this video informative, and I hope to see you in other videos from us. Until the next video from us, I would like to thank you for watching.

References
“The Official CompTIA A+ Core Study Guide (Exam 220-1001)” Chapter 5 Paragraph 209 – 213
“CompTIA A+ Certification exam guide. Tenth edition” Page 420
“MIDI” https://en.wikipedia.org/wiki/MIDI
“Basics of MIDI” https://www.youtube.com/watch?v=5ZXuXqHdHks
“MIDI without USB – classic MIDI connections explained” https://www.youtube.com/watch?v=qx-HFeczqpg
“(.mid) Standard MIDI File Format” http://faydoc.tripod.com/formats/mid.htm
“Music: Ented, Nokturn a-moll – Jesienny”
“MIDI sample.mid” https://commons.wikimedia.org/wiki/File:MIDI_sample.mid
“Picture: Folder” https://unsplash.com/photos/pONH9yZ-wXg
“Picture: Music notes” https://pixabay.com/illustrations/music-note-frame-black-music-note-4246389/
“Thumbnail: Disco light” https://www.pexels.com/photo/disco-light-1150988/

Credits
Trainer: Austin Mason http://ITFreeTraining.com
Voice Talent: HP Lewis http://hplewis.com
Quality Assurance: Brett Batson http://www.pbb-proofreading.uk

Lesson tags: comptiaaplus
Back to: CompTIA A+ > Installing, Configuring, and Troubleshooting Display and Multimedia Devices

Welcome to the ITFreeTraining free course on CompTIA 220-1001 and 220-1002 exams otherwise known as A+. This free training course will take you through all the exam objectives for the A+ exam and help you get ready to take the exam.

Modules

Installing and Configuring PC Components

Lessons

Installing, Configuring, and Troubleshooting Display and Multimedia Devices

Lessons

Installing, Configuring, and Troubleshooting Storage Devices

Lessons

Other Lessons

Memory Timings

Download PowerPointShow lesson contentMemory TimingsIn this video from ITFreeTraining I will look at memory timings. When you purchase a memory module, it will most likely have a whole heap of