Astro Lesson #19 : the.web.is.alive.with.the.sound.of.midis
Once it is downloaded - do you like our theme? ReTroGrrl didn't want to annoy you so she set it to
play just once!
Yes, it is possible to add the dimension of sound to your web page. Before you race out and do it
however, think about -
a) Why you want to do it?
b) Bandwidth considerations
c) And is it going to annoy the heck outta your viewers if you do?
If the answer to a) is - "Because I can" or "I love the Bay City Rollers and so should everyone else"
Then forget it.
If the answer to b) is "Whoa - my page already weighs in over 30k" don't even think about it. Remember, a 14.4k modem on a good day
can manage around 1.7k per second - meaning that a 30k file takes nearly 18 seconds to come in.
If the answer to c) is "Yes" - then also forget it.
"remember.the.gramophone.muriel? ...."
Aaaah, technology is a wunnerful thing. The main downside to adding sound is the file size and type restrictions - just as graphics need
to be carefully contained into jpeg and gif compressions, likewise audio files end up squeezed into
midi, au, aiff or wav files. There is a similar loss of quality involved in the process. Let's face it -
a few sounds, or a bar or two of music on a web page is really just a bit of fun - you can't get
the full woodwind section of The London Philharmonic Orchestra to sound good this way!
On the other hand, a number of programs that do their best to enhance these sound files are now available on the web. In fact, the underground
movement of midi composers are tending to specifically 'compose' for these programs - such as
crescendo.
Just remember though, most people will be listening
through their store bought systems - if a sound file doesn't cut it as is, then don't bother using it.
Of course, we can get fancy and use streaming audio - meaning that the listener can hear the
sounds as they are being downloaded - and not have to hang around until the whole arrives.
RealAudio is an
example of this technology - analog sound digitalised and compressed into a stream of digital bits.
You can download the RealAudio Player in order to pick up all sorts
of music, interviews, news and live hookups, but if you're simply looking to play a fav
TV theme in the background, this may be a little sophisticated to set up on a homepage. If you
are interested, it is a great addition to the web experience - the sound can be a little
scratchy however (due to the compression), and net congestion can cause the program to 'buffer' or stop and start
midstream. Creating and serving RealAudio from your own page requires the additional download of
the RealAudio Encoder and Server - making 3 separate products in all. Quicktime, Shockwave and others
also have similar software available.
embed.with.marconi (if you get this pun - well done!)
To have sounds play in the background, the file needs to be embedded into the HTML code.
Nothing in web land is meant to be easy, and as usual, the two main contenders - Netscape and
Big M - have not always been able to play nicely when it comes to inline sound elements. May the
Saint's be praised, the latest versions can cope as we will see shortly. Let's
look at Explorer first, shall we?
Explorer uses the BGSOUND tag (background sound) and allows the
webmaster to control how many times the sound is played - or looped. Unfortunately, page visitors
have no way of stopping a sound - so if "Stairway to Heaven" is going to play 95 times,
maybe that's not such a good idea. (Alhtough we found clicking the browser STOP button seems to work!) Here's how it goes ...
< bgsound src="stairway.midi" loop="3">
.wav or .midi files are permissable, and loop defaults to 1 unless otherwise specified -
"infinite" means just that.
Netscape gets a little more pernickety with the EMBED tag - allowing wav, aiff, au and midi files - and displays
a neat little console (utilising it's built-in Live Audio Player) that actually does allow the
user to control stopping or starting these sounds. As you would guess, this involves a bit
more work from your end of things ...
<embed src="stairway.midi" autostart="true" loop="true" width="144"
height="60">
In this case, loop=false means only one rendition will be heard, and loop=true will provide
endless hours of fun entertainment. If hidden=true is added, the generic console will not appear.
Any align tags will put the console just where you want it. Width and height specify the size of the console
- there are quite a few other variations but if you need to know more try the netscape site.
get.along.little.dawgies
We said that this bickering can be overcome with the latest browsers and this is how it's done. To make
a background sound play in any major browser ...
<embed src="stairway.midi" autostart="true" loop="true">
< bgsound src="stairway.midi" loop="3">
Oh - and one more thing - keep in mind that the sound will cease once
the page has been left - we got around this when we had music-while-you-surf
by placing the tags on the nav bar - that way the music was continuous.
Sneaky girl that Retrogrrl!
the.jailbait.jive
Don't forget, folks... almost everything in this ol' world belongs to
someone, somewhere.
A few sounds on a homepage aren't likely to get you into trouble, but if the site is commercial
in any way - look out!. Check out the copyright laws to avoid tears before bedtime and you'll
still get to be a happy camper.
down.down.deeper.and.down
Here's a little trick ... place these tags somewhere near the bottom of the html, but still within
the body tags - this lets the other stuff load (graphics etc) first. This is important as a page
can seem to be very slow and may discourage surfers from hanging around as a sound file downloads.
When graphics are loading, it is easy to gain some idea of where they are, and what they will
look like - sound is invisible and won't be evident until it is 'all there'.
hum.a.happy.html.tune
If you want to get real simple try a simple HTML link - like so ...
< a href="retrogrrlsings.mid"> Hear Me Sing! </a>
Can't get enough? Just punch 'midi' into any search engine and you'll be hooked!
Ah, so much to learn. So little time
Well, that WAS exciting, wasn't it children? Now run along and juggle these jibberings. Until
next time when we think of something else to waffle on about.
next.pod
copyright.wendy.phillips.1998-2000
|