Main Menu
home page
original compositions
final fantasy music
video game music
theme songs
audio recordings
midi for beginners
about me
midi & web-authoring links
award room
message board
- fixed!
guestbook
my mailbox

The Original MIDI Ring Back 2
Back
Next
Next 2
Next 5
Random
All Sites
Official Member of the
Original MIDI Ring

Need help on MIDI? MIDI Information Feel lost without a clue?


If you think I should add a topic, let me know!

You can click on one of the following topics or simply scroll down...

What is MIDI?
What is a MIDI channel?
What is a MIDI sequencer?
How does MIDI work?
What is the structure of MIDI?
What are the advantages of MIDI?
How can I start using MIDI to compose?
How do I put MIDI on my web page as background music?
Can I use your MIDI music for a web site or a game, etc.?

Play the Games I've Composed for:

Buy Aveyond 1: Rhen's Quest  (more info)
Buy Aveyond 2: Ean's Quest  (more info)
Buy Yummy Drink Factory  (more info)
Buy Grimm's Hatchery  (more info)

 

What is MIDI?
    MIDI, like Chinese, Spanish, and HTML, is a language. Many electronic keyboards, guitars, and computers use MIDI to communicate with each other and send musical information. Computers read MIDI from .mid or .midi files to play music. MIDI stands for Musical Instrument Digital Interface.

(back to top)

What is a MIDI channel?
    MIDI contains sixteen channels. Think of each channel as a separate musician in your electronic orchestra. Each musician plays his or her own instrument; likewise, each channel can be assigned a different instrument, often called a patch. Each musician reads his or her own part of the musical score; likewise, each channel receives its own MIDI data. There may be two or more musicians with the same type of instrument; likewise, the same patch can be assigned to more than one channel. The amount of electronic musicians that are used in a particular piece may vary anywhere from 1 to 16. All sixteen electronic musicians are equally adept at playing every instrument, but musician #10, channel 10, is usually used for percussion only.

(back to top)

What is a MIDI sequencer?
    A MIDI sequencer is a program that reads and sends the MIDI language. A MIDI sequencer can also save, load, and edit MIDI files in standard MIDI format. Notes can usually be entered via a computer keyboard or through a MIDI keyboard into a sequencer. Most sequencers are computer programs, but some are built in to keyboards. Without a sequencer to interpret MIDI, MIDI would be useless to us.

(back to top)

How does MIDI work?
    MIDI works like any other language. It uses letters (bits) to form words (bytes) to make sentences (groups of bytes). The most common types of MIDI sentences describe musical notes. For every note in a piece, one sentence will specify the channel, what note to play, and how loudly to play the note. At the end of the note's duration, there will be another MIDI sentence to tell the note to stop playing. Another common type of MIDI sentence will tell a channel to do something dynamically or effectually, such as to play quietly. These sentences describe controllers. By communicating different types of MIDI sentences formed by words (bytes) formed by letters (bits), a MIDI conversation will commence, and the receiver of the MIDI information will play music. Usually the receiver is a computer sound card or a keyboard.

(back to top)

What is the structure of MIDI?
    As aforementioned, MIDI is constructed by letters (bits) that make words (bytes) that form sentences (a group of bites). But how exactly are the sentences structured? First of all, at the beginning of every MIDI sentence, the first word, or byte #1, reveals what type of sentence is coming and to what channel the sentence applies. This is the command byte. The amount and types of bytes that follow depend on what kind of sentence they are in. The following is a table listing all eight types of MIDI sentences and their structures. Byte #1 also specifies a channel after all types of MIDI commands except system exclusives.

BYTE #1 PURPOSE BYTE #2 Specifies... BYTE #3 Specifies...
Note On Plays a note Pitch (1-128) Velocity (0-127)
Note Off Stops a note Pitch (1-128) Velocity (0)
Controller Various options Controller Type (1-128)  Value (0-127)
Patch Change Changes an instrument Patch (1-128) -
Pitch Bend Adds a pitch scoop Value (0-127) Value (0 - 16,384) *
Key Aftertouch Adds pressure to a note Pitch (1-128) Value (0-127) 
Channel Aftertouch Adds pressure to a channel Value (0-127) -
System Exclusive To transfer system data System code System code

    * Lost yet? Hopefully not. If you are up for even more detail, then I'll go ahead and tell you that MIDI is an eight bit binary language. What's that mean? Every "word" or byte contains eight bits.  Bits are either "0" or "1". All computer languages, in essence, start by this simple system of combining 0's and 1's. If the first bit of a byte is a 0, then it is a command byte. Otherwise, it starts with a 1. So, each byte has seven spaces left for bits. The total combinations of 0's and 1's is 2 to the seventh power, or 127. And THAT is why MIDI has so many options from 1-128. Some bytes, like pitch bends, combine to create more spaces, which increases the possibilities exponentially! Two bytes teaming up can have 14 spaces, or 16,384 possibilities! Many languages combine even more bytes for literally millions of combinations. (Actually, they're technically permutations because the order of the bits DOES matter.)

(back to top)

What are the advantages of MIDI?

(back to top)

How can I start using MIDI to compose?
Here is a simple checklist:
    
1. Does your computer support and play MIDI? Most likely yes.

    2. Find a MIDI sequencer. You do not need a MIDI keyboard to use one. If you have some money to spend, go to a computer or music store to buy a sequencer; they cost anywhere from $40-$300. Or, if you're poor like most musicians, you can download a demo sequencer first for free, but demos have limitations. The sequencers I use and recommend are Voyetra's sequencers and Cakewalk. You can click on either if you're interested in downloading one.

    3. Play with your new sequencer, try to figure it out, read the help files and/or manual, ask friends for help, or ask me, or whomever. In other words, learn as much as you can... and have fun!

    4. Then, if you got a demo, I'm sure the limitations (such as no saving or printing) are bothering you. If you like the program, relent and buy it or ask for it as a gift. If you don't like the sequencer, try another before you rush out and get one.

    5. Does MIDI sound cheesy on your system? Most likely your sound card uses FM Synthesis. I recommend buying a Soundblaster Live for top of the line sound quality. They cost about $100. Check out the card at Creative's Site. Make sure to get a card that uses Wavetable Synthesis as these cards use real instrument samples. Or, I have another solution. If you use Windows and you want better MIDI sound for free, go to the Yamaha XG Synth Site. Here you can download a program that acts like a wavetable soundcard. However, this software synth does expire!

    6. If you're really interested in MIDI composition, I recommend looking into getting a MIDI keyboard. Warning: They are costly. They range from $100-$3000. A really good one will cost at least $600. The reason they are useful is for entering sequences with live feeling. Make sure the keyboard is velocity sensitive. This way, MIDI files that you create will sound more real and less electronic. Entering velocity changes manually is tedious, and inaccurate compared to playing in a piece. I recommend Korg workstation keyboards.

(back to top)

How do I put a MIDI on my web page as background music?
    This process is called embedding a file. This code works for audio (.wav) files as well- just replace .mid with .wav. Always remember that every MIDI is someone's work; give credit where it's due! And don't use a MIDI without proper permission! The command is <EMBED SRC>. The main thing you need to include is the location and name of the MIDI file you want to use:

Basic code- <EMBED SRC="LocationAndNameOfFile.mid">
    
*note- Don't leave out the quotes, and always close with a >!

    These are some important options you have for the code...

1. AUTOSTART- You can have the song start when the page loads, or give the viewer control:
Play Immediately- <EMBED SRC="LocationAndNameOfFile.mid" AUTOSTART="true">
Visitor's choice- <EMBED SRC="LocationAndNameOfFile.mid" AUTOSTART="false">
    
*note- Keep in mind that some people get annoyed from music that starts automatically.

2. WIDTH / HEIGHT- You can control the size of the MIDI console that the visitor uses to control the MIDI playback:
No console- <EMBED SRC="LocationAndNameOfFile.mid" HIDDEN="true">
Specify size- <EMBED SRC="LocationAndNameOfFile.mid" WIDTH="140" HEIGHT="80">
    
*note- If you do not specify a size, the browser will use the default value. Recall that if you hide a MIDI, the viewer can't stop it! If you make it too small, some buttons might be cut out.

3. LOOP- Also, you may specify how many times the MIDI plays:
No repeat- <EMBED SRC="LocationAndNameOfFile.mid" LOOP="false">
Infinite- <EMBED SRC="LocationAndNameOfFile.mid" LOOP="true">
Twice (repeat once)- <EMBED SRC="LocationAndNameOfFile.mid" LOOP="2">
Etc...
    
*note- A wave file cannot be looped.

    Remember that you can mix and match the above options as much as you wish!  Also, it does not matter what order the options are!  I commonly use this code:
Example code- <EMBED SRC="http://www.midishack.net/example.mid" AUTOSTART="true" LOOP="false" WIDTH="140" HEIGHT="40">

    Every browser will react slightly differently to the codes. The EMBED code will not work for IE 3 or lower; however, IE 3 users can download  plug-ins to read the EMBED code. IE 3 and lower use BACKGROUND SRC instead of EMBED SRC, but Netscape ignores BACKGROUND SRC. Some people compromise by including both codes in their source. However, since IE 4+ supports both, it causes the MIDI to load twice, which sounds choppy. I use EMBED SRC because it is more accepted than BACKGROUND SRC. Here is an example of the other code:
IE code (ignored by Netscape!)- <BACKGROUND SRC="LocationAndNameOfFile.mid">
    
*note- All the options are the same as the EMBED code.

(back to top)

Can I use your MIDI music on my web site or for a game, etc?

Personal Websites: Yes, of course, given three conditions. First, let me know, and offer your URL so that I can keep track of where my music is being used. Second, please credit me where the music appears. Third, provide a link to my e-mail address or homepage so that I can be found by visitors.

Commercial Websites: The policy is usually no. However, it is possible to pay a one time music use fee. I will retain rights to my music. Contact me if you're interested.

Freeware Games: Yes, on three provisions. First, let me know so that I can keep track of where my music is being used. Second, the game must be and remain completely without fee or obligation. Third, please credit me and provide my e-mail address so I can be reached.

Non-Freeware Games: The policy is usually no. If you are willing to pay and provide royalties, contact me.

Other Uses: Contact me and we'll see what we can do.

(back to top)

...this tutorial was written exclusively by Aaron Walz; ©1998-2008
this page is composed by Aaron Walz using Notepad and Microsoft FrontPage; 2002-2008
Last Modified on 02/10/09