home *** CD-ROM | disk | FTP | other *** search
-
-
-
- QD Play
- Version 3.0
- By Dave Baggett
-
- Copyright (C) 1990, 1991, 1992 by David M. Baggett
-
- --------------------------------------------------------------------------------
- User Contract
-
- This program is FREE. You may distribute it at will, provided you
-
- 1) do not charge any money for it,
- 2) distribute it WITH the documentation, and
- 3) do not change the program or documentation in ANY WAY.
-
- --------------------------------------------------------------------------------
-
-
- Command Line Usage
- ------------------
-
- This utility will play 8-bit sound samples. To call it from a
- command shell (e.g. GULAM), type
-
- play <pathname> <Hz>
-
- where <pathname> is the name of the sample file, and <Hz> is the
- playback frequency in Hertz. For example, type
-
- play deadjim.snd 11000
-
- and you will hear Bones and Captain Kirk. Note that the program
- doesn't care how fast or slow you play the sample, so try
-
- play deadjim.snd 18000
-
- and
-
- play deadjim.snd 7500
-
- to see the effect of changing the playback speed.
-
-
- AUTO Folder usage
- -----------------
-
- Isn't it *nifty* how those Mac people can make their computers play
- digitized sounds when they boot up? Well, now you too can experience
- the tremendous joy of hearing your machine make some obnoxious noise
- when you turn it on. Here's how:
-
- Put play.prg in your AUTO folder. Use autosort to make play.prg
- the first thing to get called on bootup. You can do this by hand
- by saving a copy of your AUTO programs, deleting your AUTO folder,
- then copying the AUTO programs into a fresh AUTO folder in the
- order in which you want the AUTO programs to be called. (For all
- you programmer types: NO it's not a requirement that play.prg get
- called first, it's just more Mac-ish that way.)
-
- Then create a file called play.inf with a text editor containing
- lines that are just QD Play command lines. E.g.,:
-
- deadjim.snd 18000
- deadjim.110 11000 -v -l -hippo
- stereo.125 10000 -2 -d
-
- NOTE: There can be no blank lines in the file. QD Play picks a random
- line of the file; if that line is blank no sound will be played. Similarly,
- all options for a sound must go on a single line.
-
- There is no limit to the number of lines in play.inf.
-
-
- Specifying an Alternate D/A Device
- ----------------------------------
-
- The following options select the various supported playback devices:
-
- -hippo: use Hippo digitizer
- -replay: use ST Replay digitizer
- -ste: use STe sound, using MFP for timing
- -dma: use STe sound, using DMA for timing
-
- All these except -replay can be abbreviated by their first letters. The
- -replay switch can be minimally abbreviated to -re to distinguish it
- from the -r (reverse) option.
-
-
- Other Exciting Options
- ----------------------
-
- The -q option will prevent QD Play from printing its cheerful greeting
- message. For example,
-
- play d:\usr\sounds\attack.snd 11000 -q
-
- will play attack.snd without printing a blurb.
-
- Similarly, the -v option forces QD Play to print its message even
- when its run from the AUTO folder.
-
- The -r option will cause QD Play to play the sound in reverse.
-
- The -l option tells QD Play to loop the sample either 5 times or
- until a key is pressed. You can also specifiy a number of times to
- loop; e.g, -l15 will loop 15 times or until a key is pressed.
-
- CAVEAT: Do NOT try this with samples faster than about 16 kHz using the
- ST speaker for playback. Beyond 16 kHz the sample playing interrupts happen
- so often that they make the TOS keyboard handler flakey, which often results
- in TOTAL SYSTEM LOCKUP. (And lots of bombs and other cool stuff on the
- screen.)
-
- The -2 option makes QD Play interpret the sample data as stereo, where
- alternating bytes go to the left and right channels. Note that you can play
- stereo sounds on any device, but on mono devices the two channels will be
- mixed. This usually sounds bad if the stereo sample has panning effects.
-
- The -z option tells QD Play to interpret the sample data as
- signed magnitude instead of the standard (as far as I'm concerned
- at least) unsigned magnitude. Some sample editors use signed and
- others use unsigned -- it makes no difference in terms of sound
- quality, but it's really annoying if you don't have a sample player
- that supports both. If you play a sample and it sounds really noisy,
- try the -z option -- you may have a signed magnitude sample on your hands.
-
-
- Command Line Usage Examples
- ---------------------------
-
- Since QD Play's many options can be a bit daunting at first, here
- are some examples to get you started quickly:
-
- play chord.110 11000
-
- Plays chord.110 at 11000 hertz through the ST speaker, using
- the MFP for timing.
-
- play stereo.125 12500 -2 -d
-
- Plays stereo.125 at 12500 hertz through the STe 8-bit D/A using DMA,
- treating the data as stereo.
-
- play stereo.125 10000 -2 -d
-
- Same effect as above. If you don't pick one of the STe DMA device's
- four preset playback rates, QD Play will pick the closest one for you.
-
- play stereo.125 10000 -2 -s
-
- Unlike the example above, this command will actually play the
- stereo sound at 10000 hertz, not 12500, since the -s option tells QD Play
- to use the STe 8-bit D/A but to use the MFP for timing. Sound quality
- is not as good with this method, but unlike the -d option (DMA sound device
- timing) it offers playback at all sample rates.
-
- play signed.080 8000 -z -re
-
- Plays signed.080 at 8000 hertz through the ST Replay digitizer,
- treating the data as signed magnitude.
-
- play stereo.125 8000 -2
-
- Plays stereo.125 at 8000 hertz through the ST speaker. The data
- is interpreted as stereo, but the two channels are mixed to produce
- mono data suitable for the ST speaker (since the ST speaker can't
- play stereo sounds).
-
- play deadjim.110 11000 -q -l -hippo
-
- Loops deadjim.110 at 11000 hertz either 10 times or until a
- key is pressed. No greeting message is printed, and the Hippo/Navaron
- digitizer is used as the output device.
-
- play rooster.080 8000 -r -re
-
- Plays rooster.080 at 8000 hertz in reverse through the ST Replay
- digitizer. Note that the -replay option can't be abbreviated to -r
- because -r means "play the sample in reverse."
-
- play chord.110 22000 -l
-
- If run on an unaccelerated ST, locks up your machine. 22000 hertz is
- too fast for a looped sample on an unmodified ST. Keep looped samples
- down below 16 kHz to be safe.
-
-
- Miscellaneous Info About Samples and the ST
- -------------------------------------------
-
- A sanity-preserving convention I've come up with after dealing with
- literally thousands of samples is to store the sample rate in the filename
- extension. E.g.,
-
- filename.110 -> 11.0 kHz -> 11000 Hz
- filaname.123 -> 12.3 kHz -> 12300 Hz
- filename.062 -> 6.2 kHz -> 6200 Hz
-
- It helps a lot, since sample speed is not normally encoded in the samples
- themselves. (Sample editing programs usually have their own sample format,
- but the most compatbile format is still the raw data.)
-
- Most stereo samples for the STe will be in signed magnitude format,
- since is what the device expects. This means you'll have to use the
- -z option to play STe samples created with most other programs. It
- also means that most STe sound players won't play sounds that are
- in the standard unsigned format.
-
- Most Mac samples are recored at either 11000 Hz or 22000 Hz. These
- two sample rates are very popular because they're approximately one quarter
- and one half the standard rate used on compact discs.
-
- Most ST samples are recored at one of the following speeds:
-
- 0 - 4.9 kHz
- 1 - 7.68 kHz
- 2 - 9.6 kHz
- 3 - 14.99 kHz
- 4 - 19.8 kHz
- 5 - 30.7 kHz
-
- Samples converted from SparcStations will be 8kHz samples.
-
-
- History
- -------
-
- In version 1.0, playback speed was limited to 18kHz. In version
- 1.1, the limit is about 21kHz. Most 22kHz samples sound OK when
- played at 21kHz.
-
- A bug in the sample loading routine has been corrected. I was
- passing a bad argument to calloc. Who knows why it worked before,
- but it's fixed now.
-
- Also, calling play.ttp with only one argument caused a bus error.
- That's been fixed.
-
- Low sample playback speeds are now handled correctly. Playback
- speeds as low as 600Hz work now.
-
- As of version 1.25, there was a 25 sample limit. That limit has
- been raised to 250 in version 1.3.
-
- Version 1.4 saw the addition of the -r option to play samples
- in reverse.
-
- Versions 1.5 and 1.6 were only distributed to people who registered
- Digital Keyclick. (If you haven't, please do!)
-
- Version 1.7 saw the addition of the -replay option to play samples
- through an ST Replay digitizer.
-
- Version 2.0 was the first to include support for STe's enhanced
- sound capabilities. Other options were added, too, including
- looping and signed magnitude sample support.
-
- I totally redid the play.inf parsing for version 3.0, so that
- all the command line options now work from the AUTO folder. The loop
- specifier is also new to version 3.0. Stereo mixing is fixed for
- mono devices as well.
-
- Dave Baggett
- 5640 Vantage Point Road
- Columbia, MD 21044 USA
- Internet: dmb@tis.com or dmb@wam.umd.edu
-
- v1.0 April 6, 1990
- v1.1 April 29, 1990
- v1.25 May 17, 1990
- v1.3 July 11, 1990
- v1.4 August 5, 1990
- v1.7 July 23, 1991
- v2.0 March 15, 1992
- v3.0 June 11, 1992
-