How to add sound to your applications. (sound cards)(includes product listing) (Compute's Getting Started with PC Sound) (Buyers Guide)
by Lamont Wood
You're tired of beeps and clicks. You want to add the dimension of sound (as they used to say in the Twilight Zone) to your PC work.
To add sound, you need a sound card. However, such cards basically are intended for use with off-the-shelf games or educational packages. The software that comes with them usually is intended for composing and editing sound and music files. Adding sound to home-spun software is another proposition altogether.
It can be done, though. How? That depends on whether you're using a DOS application or Microsoft Windows.
In the latter case, you're assumed to be using at least a partial implementation of Windows with Multimedia and have access to the system's Media Player applet. If so, adding sound can be as easy as writing a Recorder macro that will: load the Media Player with the file you want, reduce Media Player to an icon, return to the foreground application, and carry on while Media Player continues in the background. If you're using a software package with a macro language, you should be able to call up Media Player with a macro, or at least trigger a pre-written Recorder macro to do it.
Of course, the sound files have to be in the Windows WAV waveform format for digitized recorded sound, or the MID format for MIDI files. MPCs (Multimedia Personal Computers) often come with short MIDI files of generic traveling music that can brighten up things when you play them in the background.
If you want to do something fancier than using a Recorder macro, you're in luck, because the two major Windows end-user programming languages now offer multimedia controls. Write an application with either language and you could integrate sound closely with screen events.
For $695, you can buy a multimedia version of the $395 ToolBook 1.5 authoring tool (Asymetrix, 110 110th Avenue NE, Suite 717, Bellevue, Washington 98006;206-637-1500). You can copy the multimedia controls from ToolBook's sample applications and paste them into your own applications. Controls also are available for playing animation files and using CD drivers and laser videodiscs.
Microsoft recently began shipping its Professional Toolkit package (Microsoft, One Microsoft Way, Redmond, Washington 98052; 800-426-9400) to enhance its $199 Visual Basic language for Windows. Professional Toolkit costs $299. A package deal of Visual Basic and the Professional Toolkit is available for $495. The toolkit includes multimedia controls, pen computing controls, plus grid and graph routines.
In the DOS world, many programming languages will let you shell out to DOS, where your application can play a sound or music file by triggering the sound board's control software. For tighter integration, several sound card makers have introduced developers' kits that allow the cards to be controlled by popular PC programming languages.
For instance, for its $229.95 Sound Master II sound card, Covox offers a $99.95 developer's kit that includes software interfaces for both Borland and Microsoft C, plus FoxPro, dBASE, and Clipper.
Creative Labs has a $120 developer's kit for its $299.95 Sound Blaster Pro card. The kit includes software libraries for Microsoft QuickBasic, C, Turbo C, and Turbo Pascal.
There are other cards and software packages, but keep in mind that in the DOS environment--unlike in the Windows environment--other cards may use their own file formats for sound or music recordings.