About MIDI

Midi stands for: Musical Instrument Digital Interface. It is an international standard for communication between a musical instrument and a computer. In this tutorial, we won't be hooking any musical instruments to the computer.....but did you know there is a music synthesizer built in to your sound card? In fact, this is key to the way midi (.mid) files work, and why they are so small in size.

Midi files actually don't contain any music or sound. They are simply instructions telling your sound card which built-in sounds to play in a particular sequence, pitch, and duration. Think of .mid files as sheet music, and the 'band' is in your sound card. Some computer sound cards have better 'bands' than others, so your midi music may not sound the same on someone else's computer. To carry on with this analogy, the sound card's band also has no singers. This means that all our midi music will be instrumental. These may be limitations, but the value to .mid files is their tiny size compared to .wav, or even mp3.

 

What are Mp3 & .Wav?

What is a .wav file?

When sound is recorded, it is represented electronicly as waves. In order to store this sound on your computer, these waves must be converted to a digital format. This is done by 'sampling' the waves many times per second. The data from this wave sampling is stored in your computer as a .wav file.

soundwave.gif

In the graphic to the left, the red lines represent samples being taken of a wave. It can be seen that more frequent sampling will give a more accurate representation of the wave. In fact CD quality sampling is done 44,100 times per second. Each one of those 'samples' is 2 bytes in size (16 bits). For stereo music, the left and right channels must both be sampled. If you do the math, (44100 x 2 x 2 x 60) you will find that one minute of music, sampled at CD quality will make a file about 10 MB in size! With the average song being 3 min. long, .wav files have a voracious appetite for hard drive space. Files this large are also difficult to transfer over the internet. If the rate of sampling is lowered, the file size can be reduced at the expense of lower quality sound. (In the graphic, you can see that the lower sample rate misses some of the variations in the wave.) MP3 was developed as a form of compression which will reduce the size of .wav files, with minimal loss of quality.

What is MP3?

MP3, or MPEG layer 3, has become a popular format for reducing the size of audio files. Most of the music available for download off the internet is found in this format. The reduction in file size is accomplished partly by compression, elimination of inaudible data, and the encoding of duplicate data.

Mp3 encoding programs analyze the music, and throw out any data that is above or below the range of the human ear. They also look for quiet sounds that are drowned out during loud passages, and discard them. Also, if there is duplicate data in both left and right channels, data from one channel can be discarded and reconstructed on playback. The result is an audio file that sounds the same, but is not identical to the original. MP3 can be encoded at different bitrates, measured in kilobits per second (kbps). Music encoded at either 128 or 160 kbps will generally be of good quality. The same one minute of music that was 10MB in size as a .wav file would be closer to 1MB converted to mp3. A similar length .mid file might be a miniscule 25k.

 

 

BackForward