Music and Sounds

There are many ways to put sound and music on a website. Some are easy; all have their problems or limitations.

.Wav Files: these are the files your own computer plays (unless you've turned them off) every time you open, close, or do something with a file. These sounds are little recordings of real sounds. In fact, if you're a John Wayne fan (just for example), you can easily obtain .wav files of all his famous movie lines, and use them as your computer's system sounds.
These files can be loaded into a webpage for playback when you visit a site; the drawback is that they can be very large, meaning the page will take much longer to load... very frustrating for visitors! So although it is easily possible to record the entire 3 minute cut of the Barenaked Ladies' latest hit song as a .wav file, its size would probably be 50 megabytes, and the webpage it was on would take half a day to load! For this reason, .wav files, if they are used at all on web pages, are always very short. You can embed them the same way that MIDI files are embedded ... see below.

.Mid Files, or 'midis', are instrumental versions of songs, or sound effects. They are computer generated, so their size is very small, making them perfect for loading into web pages. The drawbacks? Well, since they are computer music, they aren't often faithful to the original music, and of course, have no lyrics. Also, they have to be composed and recorded by somebody. There are many sites on the Web that offer free midi music of just about every song you've ever heard; unfortunately, you have to do a lot of searching to find a particular song, and if it's by a Canadian band, or just newly released, it may not yet be available.

Click here to see a pop-up window containing the code to put music into a page, that works on most browsers. (Be sure to close it when you're done). Some notes:
  • If you specify a width and height for the player, other than zero, the user will be able to stop and start the music. But at least half the people viewing your page will see something stupid-looking, since there are a variety of players out there. The old Windows player looked good; the new one doesn't. My suggestion: leave out the controls (sizes '0'), and only put music on a page where people won't be for very long, in case it gets annoying.
  • Substitute your own .mid file name. Or use a .wav sound effect. (a small one!) If you use a WAV, change the loop=true to loop=false, so the same 5 second effect won't play over and over in some browsers.


.MP3 Files are the latest way to download actual music tracks, from band sites or record label websites. New releases or special versions can be found in this format on the Web, and the music is just about CD quality. One song may be as big as 5 Mb, so downloads of songs will take a while, but you can collect music on your hard drive; programs exist for cataloging your selections, and converting music from CD's to MP3 format. But you'll need a program to play your downloads. See our 'Better Music From Your Computer' page for more about mp3's.

Shockwave or Flash Files are audio and video animations (one or the other, or both), that are made using a special program, and require a plug-in of the same name to play on your computer. Their big advantages are that they do both audio and video, and they can use actual sounds or music (like .wav files). But the program that makes them is fairly expensive, and free samples are hard to find.

Real Audio: The Real Audio/Video player will let you see some special TV channels on your screen, listen to radio rebroadcasts (everything on CBC, for example), or watch videos. File sizes are of course very large, but the information is 'streamed'; that is, it is sent and played continuously as soon as you load the web page. (The file types described above must all be sent to your computer first before they can start to play).
You must have the RealPlayer program installed first. There is a free version; sound and music generally sound OK on it, but TV or videos will be very choppy. The version you pay for produces higher quality sound and video.
I use the free version to listen to CBC radio while I'm working on the computer, or to listen to missed episodes of 'Quirks and Quarks' (highly recommended!).
Visit the RealPlayer site for more information.

Using sounds on a webpage now becomes a matter of choosing which file type to use. We have decided to avoid the use of any file type that requires a special plugin or player, since most of our visitors won't be able to hear anything if we use it. All of our music is in midi format; while this means it can only be instrumental, it loads quickly, and most computers have a midi player.


BACK