advertisement
|
CURRENT NEWSSTAND ISSUERead the full Table of Contents for the issue on sale now! Click here Subscribe for only $1.84 an issue! Please tell us about yourself so we can better serve you. Click here to take our user survey. |
| |
![]() |
Life in the Fast Lane This collection of St.CroixÕs columns was assembled during the two years following his death of cancer in May 2006. Included are many of his most-read columns, as well as personal notes, drawings and photographs. Click for more books |
![]() Listen to these latest podcasts and more: |
|
eDeals Newsletter for Discounts on GearGet First Dibs on Hot Gear Discounts, Manufacturer Close-Outs and Job Opportunities when you sign up to receive eDeals E-newsletter, sent twice a month. Check out an issue get advertising info or subscribe |
|
Your music isn't much use to anyone if it just sits on your desktop. It's time to deliver it to that huge online audience you know is out there. This piece will cover the nuts and bolts of premastering your tracks so they'll sparkle no matter which online delivery format you choose. We'll guide you through the process of choosing a format and putting the new audio files onto your Web site. Don't have a site yet? Read this month's “Working Musician” for pointers on commercial services that will host your encoded audio files; see “Construction Site” for tips about building a site.
WEB AUDIO PREPRODUCTION
The two primary ways to present audio online are as downloadable files or as streaming files. The basics of how these two methods work, along with the benefits and drawbacks of each, are covered in the sidebar “Web Audio Basics.” For now, suffice it to say that streaming files are similar to radio broadcasts: the listener hears the sound as it downloads; then it's gone. Downloadable files must be transferred to the listener's hard drive before they can be played.
If you have a Web site and are (or have access to) a competent Webmaster, downloadable and streaming delivery are options. If you have limited HTML prowess, downloadable formats are your best choice. In that case, you will be distributing your music files through e-mail or newsgroups, or perhaps providing them to others to make available.
COMPRESS FOR SUCCESS
The average CD takes more than a day to download over a standard modem, so online music must be subjected to heavy data compression to be accessible to the widest range of listeners. Standard lossless data-compression tools, such as WinZip and StuffIt (www.winzip.com and www.stuffit.com, respectively), yield at best about a 20 percent size reduction on audio files. Even specialized audio-data compressors such as DaxAif (www.dakx.com) manage only 50 percent. The greater — than — 90 percent reduction rates yielded by formats such as MP3 are achieved with a lossy compression technique called perceptual coding; the end result is close, but not identical, to the original.
Perceptual coding analyzes the source material using a psychoacoustic model and removes parts of the signal that the ears and brain do not perceive. A simplified example of that is the masking effect. For instance, a listener might not perceive a quiet guitar part at the moment a loud cymbal crash occurs, so the guitar frequencies can be removed from the file at that point. In essence, the encoder breaks down the file into small chunks called frames and determines on a frame-by-frame basis how to allocate bits across the frequency spectrum to describe a sound.
All audio-encoding schemes feature various levels of compression quality. One common variable is the bit rate, which is roughly analogous to the sampling rate in noncompressed audio. In both cases, reducing the rate produces a smaller — and lower-quality — file. Whereas lowering the sampling rate simply removes high frequencies, lowering the bit rate alters the character of the sound throughout its frequency range.
What exactly is lost in perceptual coding is tricky to pin down — listeners describe encoded sound as squishy, metallic, smeared, or lacking in clarity and spaciousness. There's clearly some loss of extreme frequencies and of dynamic range. To get a sense of the difference, play around with an encoder and listen to its highest compression rates so you'll know what types of artifacts to listen for. (The table “Encoder/Format Comparison” contains additional information.)
Music destined for the Web should be prepared in three steps: first, create a clean premaster file in uncompressed, 16-bit, 44.1 kHz stereo WAV or AIFF format. Second, create a tweaked master with appropriate EQ, sampling-rate, mono-stereo, and dynamics adjustments to compensate for the sonic degradation caused by the encoder. Finally, create the encoded file for distribution. This approach is especially helpful if you will be encoding the same music into a variety of formats, because it provides a common starting point for your processing.
The premaster file should be tightly cropped and as noise-free as possible. Use your editing software to remove any DC offset, a vertical shift in the waveform typically caused by poor grounding during recording. A file with DC offset will be centered on a value other than 0V, which leads to distortion when it's processed.
If you're preparing an excerpt rather than a full track, add an appropriate fade-in and fade-out or cut the file on the beat. It's often effective to start the excerpt on the downbeat of a measure and then fade out over the course of one or two measures. Sometimes extending the fade for an additional beat (adding the downbeat of the following measure) adds a feeling of closure.
TWEAK AND YE SHALL FIND
As noted earlier, encoding audio for the Web reduces its sonic quality, in some cases only a little, but with high compression, a lot. Here are some tips for tweaking your premaster file to help your music survive the encoding process with maximum fidelity.
EQ. Consider lightening the encoder's load by rolling off very low and high frequencies with a shelving filter. For example, if you're fairly sure the typical playback system will be inexpensive multimedia speakers competing with a whining computer fan, remove frequencies below 60 Hz and above 12 kHz. An MP3 at the standard 128 kbps bit rate doesn't contain much information above 15 kHz, so it's safe to remove frequencies above that. For streaming files, you can start the high-frequency rolloff as low as 6 kHz, depending on the target bit rate.
You may want to boost some frequencies to compensate for encoder losses. For example, try boosting at 2.5 kHz to enhance presence and at 200 Hz to aid the bass. Trial and error is the key here, but if certain frequency bands are important to particular tunes, then your EQ settings should reflect that.
Stereo enhancement. Although encoders frequently reduce spaciousness, applying stereo-enhancement effects to compensate can lead to the presence of swishy artifacts. It may be more effective to add reverb or stereo echo; again, trial and error will tell. In fact, mixing your stereo file to mono may prove to be the best compromise, because doing so will reduce the file size by as much as half or allow the encoder to create a smoother sound at the same file size or bit rate. (Some encoders automatically discard information that's common to the left and right channels.)
Padding. If you're planning to encode a streaming file, you may want to add a second or two of digital silence to the beginning of the premaster (see Fig. 1). That helps to compensate for the dropouts that listeners may experience while a streaming player loads a file. Some streaming servers also truncate the end of a file, so you might want to pad that as well.
Dynamic compression. Limiting dynamic range by using a little compression can improve the quality of your encoded file. Try a 2:1 compression ratio with a threshold of -6 dB to -10 dB to start; you may need to go as high as 4:1.
Sampling rate. If the encoder outputs a file at a reduced sampling rate, such as 22.05 kHz, you will often get better results by feeding it a file that's already at that rate. The sampling-rate conversion algorithm in your audio editor may be superior to the encoder's.
Normalization. As a last step, normalize your tweaked masters to provide consistency in playback levels from file to file and to improve encoding results. Leave a little headroom to avoid introducing distortion at the encoding stage. In Sonic Foundry Sound Forge, we use Peak Level normalization at 95 percent (see Fig. 2).
FORMAT FRENZY
There are many Web-audio formats, but because you want to reach the greatest number of listeners with the least hassle, we'll concentrate here on the most popular ones: MP3, RealAudio, Windows Media Audio (WMA), and QuickTime. All four formats support streaming and downloading. At the moment, RealAudio is the most popular streaming format and MP3 is the top format for playing downloadable files.
MP3. If there's a no-brainer format in the bunch, it's stereo MP3 at 128 kbps. The sound quality is good, and the compression rates are high. The format is broadly supported with tools and playback software on virtually all computer platforms, not to mention an array of dedicated external playback units such as the SonicBlue Rio.
MP3 technology is not open-source. The German agency Fraunhofer IIS (www.fraunhofer.de)owns the technology, and it's licensed through the French manufacturer Thomson (www.thomson-multimedia.com). If you don't charge for music distributed in MP3 format, that isn't a problem. But if you do charge, be prepared to fork over some royalties. The details are at www.mp3licensing.com.
Most MP3 encoders use one of three algorithms: Fraunhofer, LAME, or BladEnc. Many people believe that the Fraunhofer codec (compression algorithm) gives the best results; others swear by the open-source LAME encoder, which is used in a surprising number of freeware and commercial products. (Thomson recently unveiled a new version of MP3 called MP3Pro. Files in MP3Pro format are about half the size of equivalent-sounding MP3 files, but the licensing fee charged to encoder manufacturers is 50 percent higher, so the format may be slow to roll out. MP3Pro files will play on older players, but there will be no quality boost. See www.codingtechnologies.com for details.)
Your audio-editing software may have a built-in MP3 encoder, which is convenient. Here's a description of the encoding process using MusicMatch Jukebox (www.musicmatch.com; other programs have similar options). Select the Convert command from the File menu to open the encoding dialog. When creating a constant bit-rate MP3, you must specify the rate. Think of 96 kbps as a “budget” rate with easily discernible artifacts; 128 kbps is a standard, high-quality rate with just a few audible changes from CD quality; and 160 kbps (and higher) can be considered to be a “premium” rate with very high quality but a larger file size. (A Fraunhofer representative says that at 192 kbps, few listeners can differentiate between the MP3 and the original WAV.) If file size is at an absolute premium, you can encode at 8 kbps. We shrank a song that was 4 MB at 128 kbps to 270 KB at 8 kbps, and it sounded awful.
To maximize the trade-off between size and quality, try selecting variable bit-rate (VBR) encoding. With VBR, the bit rate is adjusted on the fly to meet the needs of the source material. The theory is that some material isn't as demanding as other material. In MusicMatch Jukebox, you can choose a rate from 1 to 100 percent to express how much material to leave at a constant rate. The 1 percent setting renders a file that is less than half the size of the file encoded at 100 percent.
Another way to save space is to select joint stereo if your encoder supports it. That scheme saves space by combining information that's common to both channels. Try it to see if the space savings are worth the sonic results; sometimes stereo imaging suffers.
Don't forget to tag your MP3 file with track information and your Web site's URL (see Fig. 3). The most widely supported standard is ID3v1, but ID3v2 offers more space for information, more preset music-genre tags, and even the ability to hold a small graphic. It's less confusing to input the tag information before you encode the MP3; however, many MP3 players (Winamp, for example) let you edit the tags after encoding the file.
RealAudio. RealAudio is RealNetworks' streaming-audio format. Although the company's tools and players focus more on multimedia streaming, RealAudio remains one of the strongest choices for audio streaming because of the large installed base of RealAudio-enabled players (200 million according to RealNetworks) and a good selection of flexible encoding tools.
Before digging into producing RealAudio files, investigate your options for serving them to your fans. If you have control of your Web server, you will be able to use the RealSystem Server software to deliver the streams. The free version supports 25 simultaneous streams. If your site is hosted, chances are good that RealServer is already installed; you'll have to negotiate terms for use, however, and encode your files to match the host's setup. If RealServer is not available, don't worry. Another distribution option, HTTP streaming, doesn't require a dedicated RealAudio server.
Like most streaming companies, RealNetworks has a free encoder — RealProducer Basic for Windows, Mac, Unix, and Solaris platforms. For more options, you can shell out $149.95 for RealSystem Producer Plus. Many audio editors now include RealAudio encoders as well.
RealProducer Basic has both Wizard and DIY modes. The Wizard walks you through the selection process for choosing the file or audio device from which to encode, the destination, and the type of codec. The main encoding screen lets you enter information to identify your music in the listener's player. That is a good place to include your Web site's URL.
When choosing a codec, carefully consider the number of simultaneous streams you want to support and the total bandwidth available on your server (and the bandwidth therefore available to each audio stream); then, select the codec to match. Also consider the type of connection your listeners are likely to have. A 28.8 kbps modem can support a 20 kbps RealAudio stream in stereo (see Fig. 4). Faster connections will support higher bit rates. The RealSystem 8 Production Guide (available at www.realnetworks.com/devzone) provides the information you need to choose your codec wisely.
If you're streaming files with the RealSystem Server, you don't need to choose just one bit rate. RealProducer's Sure-Stream option creates a single file containing audio encoded at as many as eight rates. The listener's connection speed determines which version is streamed. (The freebie RealProducer Basic encoder lets you choose only two of the eight rates. If you want to use more, you'll have to purchase the Plus version.) If you use HTTP streaming, you won't be able to detect the listener's connection speed automatically, so it's wise to make two or more versions available and allow the listener to choose.
Windows Media Audio. The main competition to RealAudio is Windows Media Audio (WMA). When something becomes popular, like Web-distributed music, Microsoft usually muddies the waters by jumping in and releasing a competing, proprietary standard that it touts as better. But if file size is your main consideration, Windows Media Audio 8 deserves a look: a WMA file at 96 kbps is said to be comparable to MP3 at 128 kbps. In our tests, we found the 96 kbps quality to be high — a good choice for online distribution.
WMA is getting increasingly wide support because the Windows Media Player is included with Windows. In fact, WMA support will be an integral part of the upcoming Windows XP. A Macintosh version of the player is also available.
If you want to create downloadable WMA files, version 7.1 of the player is all you need. Unfortunately, that player isn't available on all key platforms — missing are versions for Windows 95 and NT. (Version 7.0 is available for Mac.) You can also encode WMA files with Windows Media Encoder 7.1 or Windows Media 8 Encoding Utility. The latter offers more flexibility, including batch processing; both are free downloads. Several audio editors support WMA export as well. For streaming, download Windows Media Services 4.1 from Microsoft's site. It's supported on NT Server 4.0 and built into Windows 2000 Server.
The free Windows Media Encoder isn't as user-friendly as some encoders; in fact, many of the options are downright confusing. We therefore recommend using its New Session Wizard. Select “Audio”; choose the input and output files; and finally, choose the codec. The 96 kbps codec provides excellent compression — about 95 percent — with few artifacts.
Microsoft has done some work toward maintaining content security. After all, if you want to receive compensation at some point, it will be difficult with all those digital copies floating around. You can use Windows Media Rights Manager to lock digital copies of your music. A license, specific to an individual's computer, unlocks the file and makes it playable. That isn't a technology you can likely implement on your own; you'll have to go through one of the third-party companies listed on Microsoft's site. That said, be warned that hackers have broken most audio encryption and watermarking schemes to date.
QuickTime. The new QuickTime 5 is the latest iteration of Apple's popular multimedia authoring format; QuickTime Player supports MP3 streaming directly at last. (Version 4 required listeners to copy and paste the MP3's URL into the player.) Needless to say, QuickTime is supported well on the Macintosh, but the player and plug-in are also easy to install on Windows.
Like products from Real Networks, QuickTime is primarily aimed at video (the file extension is MOV), but audio-only movies are a viable distribution method for your music. QuickTime is really a container format; it supports a large number of codecs, including MP3 and numerous video codecs. However, its ace in the hole is the QDesign Music codec, which offers good quality at high compression rates. To encode QuickTime files, you need the $29.95 QuickTime Pro or an audio editor such as TC Works' Spark that features built-in QuickTime encoding. If you want your QuickTime files to stream, check the Prepare for Internet Streaming and Fast Start-Compressed Header options when you decode files.
You can snag a free program called MakeRefMovie from the QuickTime Tools section of Apple's developer site (go to http://developer.apple.com/quicktime). That 156 KB gem enables you to create a reference movie (actually just a minuscule pointer file) that automatically selects the appropriate QuickTime file based on the listener's connection speed. You simply upload the reference movie along with QuickTime files optimized for different connection speeds, and then you link to the reference movie on your Web page.
LINK AND GROW RICH
Once you've squashed your audio files, upload them to your Web server and create a Web page containing links to them. You'll probably need an FTP program to do the upload; plenty of freeware and shareware candidates are available. As an alternative, your Web host may provide a Web-based interface for uploading files.
Here is the complete but simple HTML code for a Web page that links to a downloadable MP3 file:
<html>
<body>
<a href=“mysong.mp3”> Click to download my
song.</a>
</body>
</html>
Unfortunately, the action triggered by clicking on the link depends on how the listener's browser is configured to handle the file type. The file may be downloaded; played by a plug-in, opening pop-up transport controls; spawn a dialog box asking how the visitor wants to handle it; or even spew meaningless text in a new window. To ensure that the file downloads, you can provide instructions for Macintosh users to Option-click and Windows users to right-click on the link and then choose the Save to Disk option from the resulting dialog box.
EMBED TOGETHER
If you want to be a little slicker, explore the HTML Embed command. That command lets you assign a sound to a Web page or to a link in a Web page. The parameters for the command determine the size and behavior of the playback controller.
The following example embeds a QuickTime audio-only movie file, displaying a transport control that is 120 pixels wide by 16 pixels tall:
<embed src=“feelings.mov”
autoplay=“false”
width=“120” height=“16”>
Setting autoplay to “true” would have caused the sound to start playing as soon as it was loaded. In the next example, additional parameters specify volume, back-and-forth looping, and a page that opens if the visitor doesn't have the required plug-in:
<embed src=“creepingvapor.mov” autoplay =
“true” volume=“100” width=“160”
height=“16”
loop=“palindrome” pluginspage=
“http://www.apple.com/quicktime/download/”>
For creative and well-documented QuickTime-embedding examples, visit www.mousejam.com (see Fig. 5). For examples geared to other audio formats, enter “embed html” into your favorite search engine. (See “Desktop Musician: Web Audio Action” on p. 96 for more details.)
STREAMING ALL OVER
Making files stream involves a little trick: you link to a text file that points to the audio file, not directly to the audio file itself. You can create this pointer file (or metafile) in a text editor such as Notepad or SimpleText. It should contain just the URL of your target audio file. For example, if you title your encoded RealAudio file mysong.rm and stored in your site's Audio directory, the contents of the metafile would be:
http://www.mywebsite.com/audio/mysong.rm
You would then save the metafile as mysong.ram and put the following link on your page:
<a href=“mysong.ram”>Click here to play my song.</a>
When your visitors click on the link, the RealAudio player will launch and play mysong.rm. You can put pointers to more than one song in a metafile, which will cause the songs to play sequentially. Just add a return between each URL in the metafile.
To have the stream played by the RealAudio plug-in instead of the player, substitute the RPM extension for the RAM extension in the metafile and the link; then, use an embed tag to call the metafile:
<embed src=
“http://www.mywebsite.com/mysong.rpm”
width=375 height=100 controls=all>
Up to this point, we've been describing HTTP streaming; the syntax is slightly different for RealServer streaming. HTTP streaming has several drawbacks. For example, you can't seek through the song with the playback-position slider, live broadcast isn't supported, and dropouts are more common. But the price sure is right.
You don't even have to get your hands dirty with HTML. RealProducer Basic can automatically create a Web page to link to your newly created RealAudio file; just select Create Web Page from the Tools menu and fill in the blanks. You can even publish the page you created from right inside RealProducer. Click on Publish Web Page, also in the Tools menu, and fill in the FTP coordinates and passwords for your Web site. Within less than a minute, the music we encoded was linked to a Web page and ready to go.
MP3 STREAMING
The metafile trick works with MP3s, too. In that case, you just use the extension M3U. (For a tutorial, see the link in the “Streaming MP3s for Free” sidebar.) You also have a number of commercial choices for Webcasting music in MP3 format. The simplest is Shoutcast, which lets you use your local Shoutcast-compatible MP3 player — including Sonique and Winamp for Windows, Audion for the Mac, and XMMS for Linux — along with additional drivers to link into the Shoutcast network and provide your streaming music to the world.
It's free and easy to install. Instructions and the software components are available at www.shoutcast.com. You can even attach a microphone to your computer and mix voice-overs into the broadcast. When you're up and running, you can get listed on the Shoutcast directory so listeners can find you.
Another option for streaming is Icecast, a free, open-source streaming technology. Packages are available for Windows and Linux. The source code is also available for programmers.
Live365.com has almost 40,000 stations running as of this writing, and you could become one of them, spinning your tracks. It supplies the tools, bandwidth, and 365 MB of storage space. All you do is go to the site, register, download and install the software, and you're ready. Playback quality varies depending on the broadcaster's connection speed. Broadcasts can be received by Live365's Player365, RealPlayer8, Winamp, Sonique, MusicMatch, or Windows Media Player. Listen.com provides a similar service.
GO, STREAM, GO!
There are many ways to get heard online. This is just the beginning of a new era of music distribution. If music is your passion, there's never been a better time to share it. So build a Web site, encode some files, and give your musical gifts to the world.
Eric Bell is a writer, programmer, and musician; Karen Bell is a technical writer and artist. They live in Canada, where the streams are clear.
Encoder/Format Comparison
| MP3 | QuickTime | RealAudio | Windows
Media Audio (WMA) |
|
|---|---|---|---|---|
| URL | www.mpeg.org | www.quicktime.com | www.realnetworks.com /devzone |
www.windowsmedia.com |
| Encoder Pricing | varies from free to expensive |
$29.95 for QuickTime
Pro; often included in audio editors |
RealSystem Producer
Basic (free); RealSystem Producer Plus ($149.95); often included in audio editors |
free; often included in audio editors |
| Player
Installation Difficulty |
varies | easy; preinstalled on Macs |
varies from easy to frustratingly difficult |
built into new
Windows; easy if added on |
| Pros | more free tools
available than any other format; wide support on portable players |
server source code availability for four major platforms bodes well for future viability |
flexible, free
tools for encoding and streaming; good, expensive tools for commercial distribution |
high-quality sound with lower file size; heavyweight corporate support |
| Cons | sell your music, pay Fraunhofer; poorer sound than other formats' at low bit rates |
smallest installed base of players |
proprietary player
nags users to upgrade to paid version |
confusing encoder interface |
| Cool Features | ability to embed a graphic in the ID3 tag |
supports looping multiple tracks, video, flexible embedding, and much more |
RealPlayer
clients slated for Sony's PlayStation 2 and Nokia's Media Station |
supports encryption |
SELF-PLAYING MP3s
As the Napster (www.napster.com) debacle showed, MP3 files are impossible to control once they're out there. An interesting shareware program for Windows called MP3 to Exe (www.mp3toexe.com) addresses that issue by letting you convert an MP3 file to a standalone player program. When the listener downloads and double-clicks on the file, it opens a window with transport controls, meters, and a clickable link to your Web site (see Fig. A). You can also specify an expiration date after which the song will no longer play, so there's an added modicum of security to this distribution method.
Want to use this article? Click here for options!
© 2010 Penton Media, Inc.
Acceptable Use Policy blog comments powered by Disqus















