You are here

Creating A Website, Part 4

Feature | Tips & Tricks By Mike Simmons
Published October 1999

Creating A Website, Part 4

Having explained the factors that come into play in designing the structure, content and appearance of a web site, Mike Simmons turns to the part that will be most important to many SOS readers: putting sounds on your site. This is the fourth article in a six‑part series.

So far in this series, we've considered the basic structure of a web site, and the ways in which pictures and text can be linked together and presented in an effective and attractive manner. The component that we have not looked at, and is likely to be of considerable interest to readers of this magazine, is that of sound. If our web site is going to interest the casual visitor in our music, it seems logical that we should give them the opportunity of hearing that music.

In its most basic form — surprising as it may seem — this is, in fact, very easily done and requires no more than a simple piece of HTML:

<A HREF="filename.wav">you can hear some music here</A>

This will enable those of your visitors with a compatible browser to hear your WAV‑format sound file at the click of a mouse. Even better, it's possible to set up a sound file as background music which will be played while the visitor explores your site. Sadly, however, the commands to do this are not part of standard HTML — and the two main browsers do not agree on what they are! For visitors using Internet Explorer, you need the tag <BGSOUND SRC="filename.wav" LOOP=INFINITE>, while the tag pair <EMBED SRC="filename.wav" AUTOSTART=TRUE LOOP=TRUE></EMBED> will create the same effect for those using Netscape Navigator.

However, if you have a feeling that this is all just a bit too good to be true, then you're absolutely right. The problem, once again, is all down to file size. When we talked about including pictures on your site, I stressed that the bigger the file is, the longer it will take for it to download. Well, it's just the same with sound — but if pictures are big, then uncompressed audio files (such as WAVs and AIFFs) are simply enormous, taking up approximately 90K per second of sound in mono! Even with quite a short file, you're likely to lose quite a few visitors who simply give up on the sheer tedium of waiting for the thing to download.

So what can be done? You'll have noticed back then that I said that uncompressed sound files are enormous, and it is this qualifier that is significant. Though there was a time when using WAV files (along with the older AU files) was the only way in which we could get sound onto our sites, some rather more attractive alternatives are now available. In almost every case they depend on your visitor having the right plug‑in installed in their browser (see box) but, assuming they do, you can showcase your music to the world.

To Stream Or Not To Stream

The RealPlayer, by means of which visitors to your site can hear streamed RealAudio sound files. You may download a free copy from RealPlayer, by means of which visitors to your site can hear streamed RealAudio sound files. You may download a free copy from

Essentially, there are two ways of putting music on to your web site. One is to produce files that can be downloaded and played back by the user at a later date: the other is to provide files which will play while they are actually downloading, in a system known as streaming. The advantage of this kind of arrangement is twofold. Firstly, the end user is less likely to become bored by the wait and give up, and secondly, they're much more likely to click on something 'just to see what it sounds like' if they're able to hear the music straight away, rather than having to wait. I use a streaming system on my site and I sell music on the strength of what people hear. I doubt if my sales would be half what they are if all I offered was a group of WAV files.

However, using streaming has certain implications which it's important to be aware of. Although it's now hard to buy anything other than a 56K modem (the K, in this case, measuring kilobits per second, a bit being an eighth of a byte), many people still use 14.4K models, and 28.8K modems are still widespread — and these figures measure the theoretical maximum data transfer rate, while actual performance is likely to be significantly slower, thanks to overloaded servers and connections.

So what does all this mean? Well, CD‑quality digital audio consists of two channels of 16‑bit, 44.1kHz sound. This means that a CD player has to access the data which is converted into this sound at a rate of 2 x 16 x 44100 bits per second — something like 1411 kilobits per second. You don't need to be a rocket scientist to realise that it would be impossible to deliver that amount of data through any modem, be it 14.4K or 56K!

The secret of streaming lies in the use of data compression, whereby data that we can do without is discarded, and that which we need is stored in as compact a fashion as possible. The greater the level of compression, the smaller the file will become, but the more degraded the quality of the sound is likely to be (in the same way as heavily data‑compressed JPEG files are smaller than lightly compressed ones, but look worse). The computer world is currently witnessing a tussle between a number of major players who are striving to come up with the best possible system of compression — ie. one that produces the best compromise between file size and audio quality — and to get it adopted as an industry standard. At the moment there is no such standard, which means that any musician wanting to put music on their site has to ask themselves a number of crucial questions. What speed modem are visitors to their site likely to have? What plug‑ins or players are they most likely to already have in their browser? What compression system is currently performing the most effective balancing act between speed and quality? And, finally, are you prepared to pay to license an encoding system?

Whenever you put something onto your site which requires more functionality than that provided by the basic browser, it is very good practice to include a link to a site where the relevant plug‑in can be downloaded.

The process I use is that provided by RealAudio. I don't know if, at this moment of writing, it's the best system available, but there are certainly an awful lot of people out there who've already got the RealAudio player installed on their machines. It involves me in a bit of preparation, but the software is free (see box on page 100) and the end results are well worth the effort. High‑quality sound files (high for the web, anyway) play within a few seconds of a visitor's mouse click and, because the files load as they're playing, I can provide much longer sound clips than would otherwise be practicable. Typically, the sound files on my site all last about two minutes but, because of the compression system used, they each only occupy about 300K on the ISP's server. This is still a fair size, of course — but nothing like the 10Mb that they'd be as WAV files!

Really Free

Figure 1.Figure 1.

In order to place RealAudio files on your web site, you're going to need a number of pieces of software above and beyond whatever you've been using to create HTML. At the very least you'll need RealProducer to encode your files and RealPlayer to listen to them — but I'd also suggest that you need some sort of sound‑editing program within which you can edit your songs or snippets and save them in either the WAV, AIFF or AU formats before encoding. Though RealProducer will record data directly from your computer's line inputs, it doesn't provide you with the same editing facilities that are likely to be available on a generic editing program. It's perhaps worth mentioning that the encoder is a little less tolerant of overloud waveforms than it might be, so it pays to be cautious when normalising your files.

Both RealPlayer and RealProducer come in two forms — as plain versions and 'Plus' variations. As you might expect, that 'Plus' indicates added facilities and added cost, the plain version being free. All the features I'll describe in this article are in the plain version, however.

It might be worth taking a small diversion here and explaining some of the intricacies involved in the RealAudio system, because RealProducer presents a number of options which are likely to confuse the unwary. For the RealAudio system to work at its very best, the RealAudio files need to be hosted on a server with RealServer G2 software. The likelihood is that your ISP will not have this installed. There is, however, a workaround.

Boot up RealProducer and you'll be offered a choice of 'Recording Assistants'. One of these will help you convert an existing file, while the other will enable you to capture a live sound source; as I've already indicated, I'd suggest you go for the former. You then need to steer the program to the file you wish to encode, after which you're presented with a number of options concerning the description of your work (see Figure 1, top). Some of these will be displayed by the RealPlayer while it is playing your music, and some of them may be used to aid search engines on the web.

The next choice you're confronted with is between SureStream or Single Rate encoding — SureStream will only work in conjunction with the RealServer G2 software, so unless your ISP offers this, you must choose the latter. Next you need to decide on how fast a modem will be needed to stream your files. You'll notice that the Recording Assistant talks in terms of selecting 'one or more' target audiences (Figure 2, above) but this is another option only available with SureStream encoding. You need to pick one, and your best bet is probably to go for the 28K modem option.

Picking 28K will inevitably give you the worst sound quality of the bunch but, as we've already discussed, it will reach more people than any other option currently available. There's nothing stopping you producing two (or more) files for the same piece of music — 28K, 56K and ISDN, for example — but if you ignore 28K, there will be an awful lot of people who won't be able to hear what you sound like. Different kinds of sound files benefit from slightly different forms of compression, and the next choice you're presented with is to decide what kind of compression your file needs. As you can see from Figure 3, above right, this is made painfully easy for you. Almost certainly you'll select 'Music'. I wouldn't dream of using 'Stereo Music' unless you have a target audience of ISDN users!

Once you've told the program where you want the file saved on your system you are given a final chance to amend the information you entered earlier. Once you click 'finish' you'll be on the main encoding window (Figure 4, on page 102). You'll notice that there is a (greyed out) option to make your file RealPlayer 5 compatible. RealPlayer 5 was the previous system, which has only recently been superseded. As you can see from the illustration, we can't make our file RealPlayer 5‑compatible because we're not using SureStream, so visitors who haven't upgraded to RealPlayer 5 won't be able to stream our sound files.

This is the time to press that 'Start' button and encode your file, after which you have the option of adding the details of your clip to RealAudio's database of RealAudio sound clips. Whether or not you do this is up to you, but I'd say that free publicity is almost always going to be worth more than you pay for it!

Once you've encoded your file you'll almost certainly want to listen to it. Click the play button and RealPlayer will boot up, ready loaded with your file. Of course it doesn't sound as good as it did before you encoded it. You're unlikely to be fooled into thinking that you're listening to a CD — but is it good enough to give someone a fair idea of what your music sounds like? In my case I'd say yes. Certainly the people who buy from my site seem to think it gives them a good enough sense of my music to place an order. Various transients seem to creep in from time to time, there's not the full frequency range that we might like but, given that most people will be listening to it through computer speakers, I'd say that the RealAudio system is very well up to the job.

Getting On Site

Figure 2.Figure 2.

Once you've produced your RealAudio file (these files usually have an RM filename extender), you might expect that all you'd need would be a piece of HTML such as

<A HREF="filename.rm">here's my RealAudio file</A>

No such luck, however! This is a mistake that many people make — particularly those who don't bother to read the 'Read Me' files. This piece of HTML works fine while the site is sitting on your own hard drive but, once it's been beamed up to your server what you actually need is this:

<A HREF="filename.rpm">here's my RealAudio file</A>

In other words, even though your actual file is called filename.rm, you need to use a RPM file extender to refer to it. RealAudio actually creates a file with that extender, which is called a 'meta file', and simply points at your RM file. Earlier versions of the RealAudio system required you to create the meta file yourself; though the new edition does the job for you, there may still be times when you need to do it yourself. If that proves to be the case, all you need to do is boot up your text editor and key in the path to the RM file on your server — in my case it might be something like — and then save the resulting text file as filename.rpm. I want to stress that the meta file consists of nothing but the path — it contains no HTML at all. What happens is that the link from your site calls up the meta file, and then that file points to the sound file, and so starts it to stream. If you do need to create your own meta files, it might be worth contacting your ISP before getting too involved in the process. The one I use (Demon) will automatically generate an RPM file the moment an RM file is placed on its server, which certainly saves me from a fair bit of angst!

If you turn back to RealProducer, you'll notice that on the final encoding page there is also a button marked 'Create Web Page'. If you click on this, you'll find another assistant that will help write the HTML and write that meta file for you. The help it provides is pretty self‑explanatory, but you may well like to experiment with the embedded player option. This gives you the option of including a selection of the player controls, or the entire player, as part of your page, rather than as a separate item (see Figures 5 and 5a, opposite). Once you've made your selection, the software will then write the HTML for the entire page for you. Inevitably, as you can see from the illustration, there's a pretty strong RealAudio presence to pages created in this way — but there's nothing stopping you from going back and carefully editing them afterwards.

Your alternative is to write the HTML yourself using the <A HREF="filename.rpm"> link described above — but a word of warning is in order here. The software provides a 'Publish to Web' option, which will help you beam your finished page onto your server. If you use this system it will automatically update the meta file for you so that, having worked on your hard drive, it will also work on the server. If you decide to write your own HTML then you will inevitably be bypassing the 'Publish to Web' option and, as a consequence, you must write your own meta file rather than use the one that has been generated for you. Why? Because the one that was generated will still be pointing at your hard drive, rather than at the server!

If you do decide to write your own HTML, it's still well worth taking a leaf out of RealAudio's book and creating a link back to the RealAudio site so that visitors to your pages can quickly pick up the RealAudio player. Many of them will already have this installed, but it makes sense to make things as easy as possible for those who don't. With this sort of link, it's worth bearing in mind that links can be set up to open a brand new page. If you do the latter, with a link like this:

You can download the RealAudio Player from <a href= "" target="_blank">here</a>'ve got a much better chance of people returning to your site after they've picked up the player.

Sound... And Vision?

Figure 3.Figure 3.

When you were downloading your RealProducer, you're bound to have noticed that it will also process video files. Does it work? A cautious yes. If you've got a fast enough modem or, even better, an ISDN line, you'll get some pretty impressive results, but I think it would be a little optimistic to put a video of your last gig onto your site and expect many people to be able to see it without experiencing glitches. Having said that, the new version of RealAudio seems a lot more capable than RealAudio 5. Once again, it all comes down to the limitations inherent in any modem — if you're tempted, why not give it a try?

Next month, we'll be looking at MIDI and MP3. However, there may still be something bothering you. At the beginning of this article I indicated that there was one way of producing background music for those using Internet Explorer and something quite different for those using Netscape Navigator. How, you might be wondering, can you meet the needs of both? Here's the code:


What's happening here? Navigator will ignore the <BGSOUND> tag because it doesn't recognise it, and will simply respond to <EMBED>. Internet Explorer, however, understands both, and if we don't include <NOEMBED> it will therefore attempt to play the music twice. Maybe we need to look at some of the differences between browsers next time too!

If you have any queries relating to this series you are welcome to contact Mike directly at

Cor Baby, That's Really Free

Figure 4.Figure 4.

The RealPlayer is available from, and the RealProducer from Both are available in Mac and PC versions. Other platforms are supported by earlier versions of the player and encoder at

Browser Plug‑ins

Figure 5.Figure 5.

There was a time when simply getting pictures onto a web site was considered to be pretty impressive. However, the last few years have seen the leading browsers striving to outdo each other in the facilities that they provide. This has partly been achieved by upgrades in the coding of the browsers themselves, partly by the use of 'helper' applications, and partly by the development of plug‑in technology. Upon opening the browser Preference or Option pages, the user is able to designate particular so‑called helper applications which should be called up when the browser is confronted by a particular file type — the QuickTime movie player, for example, might be called up whenever the browser is confronted by a QuickTime movie. Plug‑ins, on the other hand, are small programs which, when installed, extend the browser's functionality — in just the same way as plug‑in effects add to the capabilities of a program like Cubase VST. Navigator and Internet Explorer will work perfectly well without the Shockwave plug‑in, for example, but if you want to visit a 'Shocked' site you need to download the Shockwave plug‑in and install it on your system. Whenever you put something onto your site which requires more functionality than that provided by the basic browser, it is very good practice to include a link to a site where the relevant plug‑in can be downloaded.

Figure 5aFigure 5a