|
Building Sounds for your Applications with SoundTracker
Getting Started: The SoundsWith Andrew J.D. Bowman Entering the world of the professional sound editor is like trying to go from Windows to Linux when you've never touched a Unix system before. You know how to listen to CDs and MP3s, maybe even how to burn your own CDs, but all of this talk about "tracks" and "loops" and other electronic music and sound generation terminology can be enough to make you consider changing careers to basket weaving. A "verbal" introduction to this technology is just not enough for most beginners. Rather than writing "about" SoundTracker and sound generation, what we've built here is a proper introductory lesson to get you started. After going through this, you should be able to use SoundTracker under Linux to generate sounds for your latest applications before you release them. Most folks don't start completely from scratch. Doing so is a far more involved and advanced issue; so let's not muddy the waters here for those just getting started. The first task, then, is to collect "sound samples," which are as you might guess are files that each contain a recording of a sound. This sound can be as brief as a single note from a musical instrument, or longer, such as someone speaking a word, or even a portion of a song (which, according to US copyright law, may be licensed up to as little as two notes, so be careful. If you're not in the US then consult your own country's laws on this issue.). Fortunately, sound samples are everywhere on the Internet. You can buy them from commercial sites, such as www.sonicfoundry.com, and download them for free from legitimate download sites like www.pocketfuel.com/. Keep in mind that even free sample sounds are often copyrighted; but when purchased, their license allows the user to combine them into an original work without violating the copyright of the individual component samples. Sample format is important to understand as well. In the case of SoundTracker, there are references to Modules, Samples, Instruments, and a Wave. Waves can be the most complex items here, and are typically in WAV format. A WAV is a large file containing numbers that represent the cumulative sound wave of a song, though it's often also used to contain samples as well. Note that an MP3 file is a WAV file subjected to a particular type of data compression. When SoundTracker refers to a "Sample," it's typically referring to a WAV. When SoundTracker wants a Module, it's talking about the MOD format, which contains both the instructions for playing the particular song or sound (remember, we can be talking about a flute or a voice or the sounds of boots stepping in gravel), and the actual base "recordings" required for building the piece. Then there's the Instruments, which are in XI format in SoundTracker's case. XI files are a remnant of the FastTracker program, an older DOS Tracker program, and contain both instrument sounds and complex drum beats. So you can follow along, we have included a set of sound samples for you to work with for this project.
Getting Started: The SoftwareWith Andrew J.D. Bowman SoundTracker (http://www.soundtracker.org/) is a music tracker and composition program. Trackers let you organize sound samples into individual "tracks," which are like individual members of an orchestra, except that your orchestra consists of little chunks of music rather than specific instruments. The tracker program then lets you trigger each of the tracks to play its sounds at specific timed intervals. You could use a tracker to compose a holiday song, for example, and then replace all of the different instrument sounds used with the meowing of individual cats. If you're using SuSE Linux 7.3, then you can utilize the RPM formatted package on the siteit's worth checking for new items from time to time as well. Otherwise, download the source code, uncompress and unpack it, and change to the new directory the package unpacked into. Once you're in there, read the INSTALL file and check to make sure you have all of the prerequisites covered. If you're lazy and don't feel like it then you'll find out soon enough, anyway. When you're ready to install the program, make sure you're in the SoundTracker source directory, and type: ./configure If this process fails it generally shares information with you about what it couldn't find, so hopefully you won't have to pull out too much hair to get the autoconfiguration to work properly. Once you've fully completed the configuration process without errors, type "make" and press Enter. This build program now takes over and compiles SoundTracker for your particular system setup. Now you should be able to type soundtracker and run the software! What you'll see is shown in Figure 1.
Onto the ProjectWith Andrew J.D. Bowman Before we can start, you need to uncompress, unpack, and save your sound file download. It's probably best to save it to its own directory so you don't have to deal with anything else while building your app's startup sound. Once you've done this, make sure the File tab is what you're using in SoundTracker, and browse to the directory containing your soundsyou only have to click once on a directory to move into it, including the .. entry. Next, look to the line of text boxes over the tabs. Look for the item labeled Instr. Make sure this item is set to 1, and that its text box is empty. Now, click the File tab, make sure the Load Sample radio button is selected, and click TickTick.wav. The Load stereo sample dialog opens (Figure 2). Click Mix and now TickTick.wav is listed as Instr 1, and as Sample 0. Advance the Instr counter to 2 and click CricketShaker.wav. Once again, select Mix in the dialog, and then advance the Instr counter to 3. Proceed from here, selecting RiverShaker.wav as 3, DrumTom03.wav as 4, DrumTom01.wav as 5, Stix01.wav as 6, Stix02.wav as 7, and CymbalCrash07.wav as 8. You'll notice that some of these items are stereo and some are mono. That's okay. At this point, click the Tracker tab, and make sure the Editing checkbox is selected (it isn't by default). Now that we have our instruments loaded, we can try to actually make a song. It's probably worth using File|Save As at this point to preserve your work so far. Use the extension ".xm". Now take a look at Figure 3, which is a graph that lays out the spacing between the various instruments and when they need to play. Your challenge here is to duplicate this musical interlude! Keep this graph visible while you return to SoundTracker and click on the Tracker tab, which brings up the dialog box shown in Figure 4. Click the Editing checkbox if it's not checked, and then make sure that you're set to Instrument number 1. Think of each of the items here as a beat. Place your cursor on the first column, first pair of triple dashes, and press the S key. You should hear the sound of the TickTick.wav, and now a C#5 has taken the place of the dashes (C sharp, fifth octave, click on the Instrument Editor tab and hover your mouse over the keyboard sometime to see where this is). Repeat the S key press until you have eight C#5's listed, each with three spaces between them (S-two-three-four-S-two-three-four) as the chart indicates. Then, press Play Song to see what you have so far. It won't sound like much at this point of course but it's good to get in the habit. You'll need to press Stop most likely so the player doesn't go on silently for a while and then loop back to the beginning. Now, press the Tab key to go to the second column, change to the second Instrument, make sure the Editing checkbox is checked, and make use of that S key to duplicate what the chart for Figure 3 shows for the second item. Continue this pattern for each of the tracks, one per instrument, playing after you add each section. In the end, you should find yourself with a file that sounds just like ours. Figure 5 shows what the Tracker window looked like on my screen once I finished building this song. Utilize the File|Save As function again to save out the file, and then you'll want to convert it to a WAV. To do that, use the File|Save Module As WAV item, and make sure to rename the file with a .wav extension.
Wrapping UpWith Andrew J.D. Bowman Well, there you have it. A roadmap to doing build-it-yourself sound blurbs for your applications, games, and whatever projects you may need to rustle up. Of course, this is just the beginning. There's much more out there to play and experiment with out in the world of electronic music. Take a look at http://www.united-trackers.org/ if you want to delve into this area further. Anyone coming to Linux from the Windows Tracking world unfortunately will not find the wide range of tools available in Linux that they once had in Windows, but with the growth of programs like SoundTracker hopefully this is changing. Linux certainly has the power, strength, and flexibility to make an excellent multimedia development platform. Hobbyists and professionals alike must certainly be noticing the Linux takeover in the animation realm. Perhaps sound processing is soon to follow. Dee-Ann LeBlanc has written over 10 computer books, over fifty articles, taught classes, and more, mostly involving the Linux operating system and its programs. You can follow her work and share your input through her new mailing list at http://www.dee-annleblanc.com/mailman/listinfo/general, or find out more in general at http://www.Dee-AnnLeBlanc.com/. Andrew J.D. Bowman is an analog and digital video engineer and digital audio composer who's written a number of DVD and A/V titles for www.expert-guides.com.
|