ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

A WELL-LIT SOUND CHECK


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

A WELL-LIT SOUND CHECK

Lessons from the Trenches Understanding the PC's MIDI Interface
by Stuart Ball

Start ı How Does MIDI Work? ı How the Circuit Works ı Sources and PDF

Does the documentation for your soundcard or computer say it is MPU401 or MIDI compatible? Do you wonder what that means or how you use it? Do you wonder where the MIDI comes out and goes in on your soundcard? Do you need to know if the MIDI devices you connect to your computer actually send anything? If so, this article is for you.

For starters, letıs talk about MIDI. MIDI is an acronym that stands for Musical Instrument Digital Interface. Introduced in 1983, MIDI allows electronic instruments, such as keyboards and drums, to communicate with each other. If youıve ever seen a 5-pin circular connector on the back of a musical keyboard or synthesizer that looks like the old, round, large-style keyboard connector on a PC, that's MIDI.

MIDI allows a keyboard to send musical information to whatever is listening. MIDI also allows a computer to control a synthesizer or other instrument. When a computer is used in this way, it is acting as a MIDI sequencer. MIDI allows musicians to compose music for different instruments, store it on the computer, edit it, play it back, accompany it, and so on.

MIDI commands tell an electronic synthesizer when to play a particular note, how loud to play it, and how long to hold it. Unlike .WAV, MP3, or other digitized audio files, a MIDI file is not a digital representation of sounds, but rather a collection of note information. A MIDI file for a particular arrangement of music is smaller than a digitized audio file for the same song. This is because the sound information, such as what audio waveform plays when a note is pressed, is contained in the actual instrument that plays the note.

MIDI also contains other commands, such as commands to select a particular patch, or set of sounds. This way, the MIDI sequencer can switch a synthesizer from generating, for example, a piano sound to a guitar sound in the middle of a performance.

The fact that MIDI files contain no sound information can produce odd effects. You can send a MIDI file intended for a piano to a synthesizer that is programmed to reproduce guitar or trumpet sounds. It will play, but it will sound strange. General MIDI was introduced to alleviate this problem (see the "MIDI Protocol" sidebar).

MIDI uses a 5-pin DIN connector, as shown in Figure 1. MIDI devices have two identical connectors, MIDI IN and MIDI OUT. MIDI IN on one device is connected to MIDI OUT on the next device. In this way, multiple MIDI devices can be daisy chained together.

Figure 1ıThe 5-pin MIDI cable uses only two pins for receive and three for transmit. The remaining two pins are unused.

 

As you see, MIDI uses only two pins on the 5-pin connector. On the MIDI OUT connector, the MIDI device drives the pins with serial MIDI data. On the MIDI IN connector, the pins are connected to the LED of an optoisolator that receives the data. Because MIDI devices always use optoisolators, ground loops are never a problem in a MIDI system.

When your soundcard says it is MPU401 compatible, it is referring to a standard MIDI interface. Roland, a manufacturer of keyboards and other electronic instruments and a pioneer in the MIDI world, originally made a MIDI interface called the MPU401. That interface became the standard, and most other PC-to-MIDI interfaces have since emulated it.

I became interested in this issue a couple of years ago, because I needed to add MIDI to an old computer so my wife could use it as a dedicated MIDI sequencer. I called a number of places to find the MIDI interface card that I used the last time, but that card was unavailable. One person told me that there isnıt much demand for MIDI cards anymore, because most soundcards have MIDI interfaces embedded in them.

This turned out to be good news. The MIDI card I wanted cost about $60 the last time I bought one. I found a close-out, 16-bit soundcard with an MPU401-compatible interface for $10. All I had to do was get it to talk over standard MIDI connectors.

NEXT


Circuit Cellar provides up-to-date information for engineers. Visit www.circuitcellar.com for more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com or subscribe online. ıCircuit Cellar, the Magazine for Computer Applications. Posted with permission.
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ