PC DIGITAL AUDIO Release: 1.64 Date: 30 July 1991 Copyright (C) 1990, 1991 David T. Chappell All Rights Reserved The programs included are shareware. Feel free to make copies and pass them out to friends and BBSs as long as no fee is charged, the programs are not modified in any way, and this notice is not changed or removed. INTRODUCTION ============ In recent years, the computer world has been gaining interest in computer-generated sound. The Apple Macintosh and Commodore Amiga provide built-in sound control so they can play digitized recordings with little effort from the programmer. IBM, however, has not yet included advanced sound capabilities in its personal computers. Although more people are buying sound boards from IBM and third parties, until such hardware is standardized, speech software will encounter difficulty in gaining acceptance. In this regard, mathematics, engineering, and software come to the rescue and allow PCs to play good quality sound without extra hardware. Over the years, several attempts have been made to play digitized sound on PCs with the built-in speaker. Many have appeared in the public domain, but few are coherent. Commercial software has had greater success, but most of these programs produce rough speech. With the recent rise of interest in multimedia, some developers have produced good quality sound. My work rivals that of the best public domain and commercial successes. INCLUDED FILES ============== SOUND152.EXE Version 1.52 for DOS Fastest; only files smaller than 64K; best for slow computers. SOUND242.EXE Version 2.42 for DOS Allows files larger than 64K; good for moderate-speed computers. SOUNDTM.EXE Version TM 1.52 for DOS Uses timer interrupts; allows large files; best sound output. Requires 80286 or better processor. Use on fast computers. SOUND.EXE Version 3.43 for DOS Menu-driven version; loosely follows IBM SAA-CUA user interface. Combines SOUND242 & SOUNDTM & Sound Blaster; detects file type. SOUND2.EXE Version 1.11 for OS/2 OS/2 version; runs in either window or full-screen session; any size file is playable. Equivalent to version 2.42 for DOS. Sample Name Signed Stereo Volume Freq ------------ ------ ------ ------ ----- DESTINY.VOC N N 0 9009 YOHO.IFF Y N 0 13016 RHETT.SND N N 0 10250 USAGE ===== To run each program, type the filename (omitting the extension) at the command prompt. SOUND.EXE is menu-driven, but the other programs can be controlled either via command-line switches OR via prompted input. If you do not use the command-line parameters, the programs will prompt the user for input, as descriped below. Usage: SOUND152 [filename speed [/c] [/s] [/v]] /c multiple-channel format (i.e. stereo; default is mono) /s signed data format (default is unsigned) /v normal volume (default is maximum volume) File name: Enter the entire file name, including extension. Any digitized sound sample recorded on any computer should work. Speed factor: In most versions of the program, speed depends on a FOR loop. The delay factor for the loop must be entered manually. A larger number yields slower play. Faster samples need smaller numbers. On an 8 MHz PC, an 8 kHz sample needs about a 9, while the same sample on a 25 MHz 80386 needs about a 78. Your system configuration determines the correct factor. Frequency: The TM version needs to know the sample frequency in hertz to give the correct speed. Signed: Enter a "Y" or "N". Some samples are on a scale from 0 to 255, others are on a scale of -128 to 127. Since these programs require the 0-255 scale, other samples must be shifted for them to sound right. Samples from Amiga computers use signed bytes, while those from Macintosh, Atari ST, and IBM PC are in unsigned format. Stereo: Enter a "Y" or "N". The PC has only one speaker, so stereo play is not possible. To prevent problems with stereo samples, this option will play a single channel of a stereo sample. Volume: This controls the output volume. The input must be an integer. A positive number multiplies the output, while a negative number divides the output. A 0 enables a routine that automatically scales the data for maximum volume without distortion. Most samples sound better when scaled. SOUND BLASTER ============= SOUND.EXE provides limited support for the Sound Blaster card. If you have a Sound Blaster, make sure the environment variable SOUND is set to the path to your driver. Your AUTOEXEC.BAT file should contain a line similar to the following: SET SOUND=C:\SB. See your manual for more details. It will also work if CT-VOICE.DRV is in the current directory. LIMITATIONS =========== SOUND152 can not load files greater than 64K in size. The other versions do not have such a limitation. The DOS versions can not load a file larger than the system's available physical memory (RAM); OS/2 uses virtual memory. All versions except SOUNDTM produce a background pitch. A background pitch is present in SOUNDTM but of low volume. SOUNDTM relies on the system timer interrupt, so it runs on any system with the same results. Any other interrupt-driven software may conflict with SOUNDTM. Pressing keys, moving the mouse, etc. will put a buzz in the output. SOUNDTM will not give proper results if the DOS 4.0 DOSShell has been run or if it is run in a DOS box under OS/2 or Windows; however, it runs well under the DOS 5.0 DOSShell. The same applies to SOUND when Output is set to Better Speaker. Only files with the extention VOC can be played through the Sound Blaster. CONCLUSION ========== I am planning several updates in the near future. I plan to improve the existing programs and write some demos as well. More enhancements are planned for the OS/2 version, possibly including a PM version. If you use these sound programs and find them interesting, a donation in any amount ($5 suggested) will be greatly appreciated. If you send a donation, I shall send you the latest copy of the software (specify disk size). If you request it, I shall also include my technical paper on implementing these routines in your own software. Please make checks in U.S. dollars payable to David T. Chappell. Richard E. Zobell wrote the file-loading routine used in SOUND242, SOUNDTM, and SOUND. Thanks go to Carl Morrell for help with some technical aspects. Ray Duncan's book _Advanced_OS/2_Programming_ helped a lot with OS/2 development. If you have any questions, comments, suggestions, or donations, please contact: David T. Chappell Internet address: 242 Stonewall Road david@catt.ncsu.edu Salisbury, NC 28144 (704) 633-7535