ROVIN’ AND RAVIN’ WITH MIKE

Copyright © 2002, 2001 by Michael Segers, All rights reserved

Brought to you by Peanut.org  

Sounding Off On a Web Page

 

     During my tenure as raver for Peanut.org, I’ve written often about the Internet and about creating your own web pages for the Internet, including text and pictures.  I haven’t said much about sound, and there is a reason for that.  Most of the news about sound on the Internet regards that nasty little piracy site that I won’t even name.  In fact, I wrote a whole article about it, "The Great Online Musical Melon Piracy," without naming it.  (I wonder how that ranked in the search engines.)

     But, if you are going to create your own web pages, you may eventually want to add a little sound to them.  Note the words a little.  Like graphics, sounds are separate files that can take a long time to load.  Always, with graphics and sounds alike, you have to consider whether the time that it takes to load the file and the extra amount of data being transferred from your web site is worth the benefits of the sound or image.  

     In "More Pictures on a Web Page" we considered the resolution of a picture on a web page: the clearer the picture, the more time it takes to load.  Thanks to an ingenious and free piece of software, the  dBpowerAMP Music Converter, you can adjust the size of audio files, so that they will load quickly.  And, the word quickly reminds me:  quickly download the dBpowerAMP Music Converter before its creators start charging what it is worth.  Spend some time reading the documentation on their website while you are there.  Not only are they talented software developers, but also they have the knack for communicating complicated ideas in simple words, sentences, and illustrations.

     Just as there are different kinds of graphics files, so are there different kinds of sound files, but for this article, I’m going to limit myself to talking about “wav” files; these are the easiest sound files to deal with, produced with Microsoft’s Sound Recorder, which is fairly standard for computers running Windows.  (Of course, you also have to have a sound card—and you probably do—and a microphone.)if you look at an article I recently wrote about the digeridoo, in the second paragraph, you’ll see these words:

I produced a clean, even drone. 

Click on the word drone, and you will hear (after a delay for the file to load) a performance by a not quite virtuoso didgeridoo-er (me).  If you click on the word view and then on source, to see the HTML (HyperText Markup Language) in which web pages are written, you will see this:

I produced a clean, even <a ref="didj.wav">drone.</a>

The code <a ref="xxxxx">yyyyy</a> is the code for any hyperlink.  So, when you click on the word drone, you are loading a new file from my directory, just as you did if you clicked on the word didgeridoo above.  The code for that word, by the way, is:

<a ref="digididj.htm">didgeridoo</a>

 

You can create similar hyperlinks anywhere in a text that you want, but remember that, if the person visiting your website is using a modem, those sound files will slow things down considerably.  It takes longer to load that brief sound file, for instance, than it does to listen to it.  

 

     Another way you can add a sound file to your page is as a background sound that will start to play without clicking on a hyperlink.  I have created an example of a page with a background sound (using the same didj sound file), which you can reach by clicking here.

     What is happening there is that the sound file loads as the page does.  You can add a background sound to your pages in the “head” section at the beginning of the page.  If you view the source code for the example page, you will these words near the top:

<head>

<bgsound src="didj.wav" loop="2">

</head>

     The “head” section of code contains basic information about the page, and among the basic information for this page is that there is a background sound, “didj.wav” played two times (loop=“2”).

 

You can also add sound by embedding sound files.  Add this code to your page:

 

<p align="center" style="margin-top: 0; margin-bottom: 0">
<embed src="didj.wav" loop="false" width="127" height="20"/> 
</p>

It will give you a control panel like this (below).  Click on the right arrow to play the sound.

 

OK, I played a trick on you.  Instead of using "didj.wav" again (weren't you getting tired of that sound?) I used "marlene.mp3," Marlene Dietrich singing, which I used in my rave about her.

     By the way, if you’ve never looked at source code before, notice that it is made up of elements that always have a beginning and an ending, which is indicated by the slash (/).  Hyperlinks begin with a and end with /a, while the  section we just looked at begins with head and ends with /head.  Of course, you can write such code yourself (using the Notepad  text editor), but most people use a wysisyg (pronounced whizzy-wig) or “What you see is what you get” program such as FrontPage. 

     And with that, I seem to be digging out my old foreign language teacher’s sombrero, to teach you the mysterious language of the Internet.  I’ll spare you….  But, the next time you are rovin’ around the Internet, and you are blasted by an unexpected sound, look at the source code to see what is going on, and, of course, keep your feet dry, your heart full of noble thoughts, and your ears open to whatever you may hear.

Find more articles about creating your own website.

Rove to the Rovin' and Ravin' home page.

Google
Search WWW Search www.peanut.org