|
Multimedia Audio Tips - How to Install Audio on a Web Page - Part Two
Audio on Websites, A primer to help you with installing audio on your website
I
File Formats for Web Pages With Audio
Preparing multimedia audio - About MIDI Files
MIDI (Musical Interface Digital Format)
MIDI is not an audio format. It does not record sound in any way. What it does do is let you record and play instructions that your sound card plays back through a synthesizer within it. This format is used a lot in popular music to play drum machines and synthesizers. Your sound card most likely has a synthesizer built in to it. The MIDI file is very very small because it is only a set of actions to be performed such as a musical note played at a particular time. It is similar to a player piano in that the file tells the piano, or in this case the synth, to play a note.
The benefit to using MIDI files is that you can have a very lengthy music file yet still have a small file size. The draw back is that you don't have complete control over how the file will sound on every end users sound card. Also, you can't have any singing on the file, because the file is not an audio recording. The bottom line with MIDI is that you can use midi files without adding any substantial size to your web page. You can find royalty free midi files easily with a Google search. I found this site that looks like a great place to get free files: http://www.partnersinrhyme.com/midi/
Streaming Audio
Streaming audio allows the user to start listening to the audio file while it is still downloading. Apples QuickTime and RealAudio (http://www.realaudio.com/ ) are some of the first players to offer this, and are probably still the best known. Macromedia's Shockwave also streams audio files. This link will take you to where you can download the player if you don't already have it. http://sdc.shockwave.com/shockwave/download/download.cgi?
With streaming audio the sound is downloaded into a buffer before being sent to the soundcard. The file will start playing soon after downloading begins, and will keep playing smoothly as long as the file download happens faster than the file plays. You get choking sometime, especially if you start downloading/uploading another file to or from the internet while the file plays.
You can create a streaming audio file easily with an audio editor such as Sony's Sound Forge, Steinberg's Wave Lab, or Bias' Peak. You just save your original high quality audio file as a RealAudio file (.ra or .ram) format. Your web server must have the RealAudio extensions installed, and your hosting service might charge extra for this option. As time goes by, more and more are offering it for free.
You can find examples of streaming audio at a local music web site that specializes in music from Humboldt County.
http://www.humboldtmusic.com/
On the home page you can click on a link with HumboldtMusic.com Radio on it, and it will stream music from all local artists. Also you can scroll down to the bottom of the home page and choose individual bands/artists' music to play. Here is an example of an artist page with streaming media set for different connection speeds for dial up or high speed.
www.humboldtmusic.com/chadjohnson
www.humboldtmusic.com/smallfish
Placing Audio in a Web Page - The Code Tips
Including audio in your web page is simple. You just link to it as you would an image. An HTML example would be something like:
<A HREF=anysong.wav>
Otherwise your web page editing application like Macromedia Dreamweaver or Adobe GoLive provide easy linking methods. When the user clicks on one of these links you have created their web browser will usually open the file automatically and play it. Windows Explorer supports .wav, .aiff, .au, and .mid files.
If you are into HTML you can use the EMBED tag for much more control over playback. With EMBED you can control the appearance of the onscreen player or even hide it. If you like you can have the audio file play automatically when the page loads with:
For a hidden player:
<EMBED SRC=anysong.WAV HIDDEN=TRUE AUTOSTART=TRUE>
For a player that is 45X200:
<EMBED SRC=anysong.WAV HEIGHT=45 WIDTH=200>
(((((Note: We're Making sound file of the word Howdy to use as an example for different file formats - will upload soon))))))
You can do other things with the EMBED tag too like LOOP, that allows you to specify how many times a file repeats, or STARTTIME and ENDTIME that allow you to start and end a file at a specific point od the file. The problem is that every browser doesn't support all of these attributes. My advice is to keep it simple.
When considering adding sound to a web page you should ask yourself whether or not it is really needed. People don't always like music playing in the background when they are reading. Most web pages are still similar to magazines in their presentation of text and images. If you do want a backing track to your web page it might be a good idea to include a button to turn off the sound. You don't want to annoy people with music they don't like.
Until bandwidth gets to a point where a web page can play as smoothly and as dynamically as a television show we are going to encounter limitations. If you work within those limitations you can have a very exciting soundscape to go along with your exciting visuals.
Back to the top of the Audio for Web Page |
|