home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / sound / digistuf / play / play.doc next >
Text File  |  1992-08-20  |  10KB  |  279 lines

  1.  
  2.  
  3.  
  4.                                  QD Play
  5.                    Version 3.0
  6.                  By Dave Baggett
  7.  
  8.             Copyright (C) 1990, 1991, 1992 by David M. Baggett                   
  9.  
  10. --------------------------------------------------------------------------------
  11.                   User Contract
  12.  
  13. This program is FREE.  You may distribute it at will, provided you
  14.     
  15.     1) do not charge any money for it,
  16.     2) distribute it WITH the documentation, and
  17.     3) do not change the program or documentation in ANY WAY.
  18.  
  19. --------------------------------------------------------------------------------
  20.  
  21.   
  22. Command Line Usage
  23. ------------------
  24.  
  25.    This utility will play 8-bit sound samples.  To call it from a 
  26. command shell (e.g. GULAM), type
  27.  
  28.     play <pathname> <Hz>
  29.  
  30. where <pathname> is the name of the sample file, and <Hz> is the 
  31. playback frequency in Hertz.  For example, type
  32.  
  33.     play deadjim.snd 11000
  34.  
  35. and you will hear Bones and Captain Kirk.  Note that the program 
  36. doesn't care how fast or slow you play the sample, so try
  37.  
  38.     play deadjim.snd 18000
  39.  
  40. and
  41.  
  42.     play deadjim.snd 7500
  43.  
  44. to see the effect of changing the playback speed.
  45.  
  46.  
  47. AUTO Folder usage
  48. -----------------
  49.  
  50.    Isn't it *nifty* how those Mac people can make their computers play
  51. digitized sounds when they boot up?  Well, now you too can experience
  52. the tremendous joy of hearing your machine make some obnoxious noise
  53. when you turn it on.  Here's how:
  54.  
  55.    Put play.prg in your AUTO folder.  Use autosort to make play.prg
  56. the first thing to get called on bootup.  You can do this by hand
  57. by saving a copy of your AUTO programs, deleting your AUTO folder, 
  58. then copying the AUTO programs into a fresh AUTO folder in the 
  59. order in which you want the AUTO programs to be called.  (For all
  60. you programmer types: NO it's not a requirement that play.prg get
  61. called first, it's just more Mac-ish that way.)
  62.  
  63.    Then create a file called play.inf with a text editor containing 
  64. lines that are just QD Play command lines.  E.g.,:
  65.  
  66.     deadjim.snd 18000
  67.     deadjim.110 11000 -v -l -hippo
  68.     stereo.125 10000 -2 -d
  69.  
  70. NOTE: There can be no blank lines in the file.  QD Play picks a random
  71. line of the file; if that line is blank no sound will be played.  Similarly,
  72. all options for a sound must go on a single line.
  73.  
  74.    There is no limit to the number of lines in play.inf.
  75.  
  76.  
  77. Specifying an Alternate D/A Device
  78. ----------------------------------
  79.  
  80.    The following options select the various supported playback devices:
  81.    
  82.     -hippo:  use Hippo digitizer
  83.     -replay: use ST Replay digitizer
  84.     -ste:    use STe sound, using MFP for timing
  85.     -dma:    use STe sound, using DMA for timing
  86.     
  87. All these except -replay can be abbreviated by their first letters.  The
  88. -replay switch can be minimally abbreviated to -re to distinguish it
  89. from the -r (reverse) option.
  90.  
  91.  
  92. Other Exciting Options
  93. ----------------------
  94.  
  95.    The -q option will prevent QD Play from printing its cheerful greeting
  96. message.  For example,
  97.  
  98.     play d:\usr\sounds\attack.snd 11000 -q
  99.  
  100. will play attack.snd without printing a blurb. 
  101.  
  102.    Similarly, the -v option forces QD Play to print its message even
  103. when its run from the AUTO folder.
  104.  
  105.    The -r option will cause QD Play to play the sound in reverse.
  106.    
  107.    The -l option tells QD Play to loop the sample either 5 times or
  108. until a key is pressed.  You can also specifiy a number of times to
  109. loop; e.g, -l15 will loop 15 times or until a key is pressed.
  110.  
  111. CAVEAT:  Do NOT try this with samples faster than about 16 kHz using the
  112. ST speaker for playback.  Beyond 16 kHz the sample playing interrupts happen
  113. so often that they make the TOS keyboard handler flakey, which often results
  114. in TOTAL SYSTEM LOCKUP.  (And lots of bombs and other cool stuff on the
  115. screen.)
  116.  
  117.    The -2 option makes QD Play interpret the sample data as stereo, where
  118. alternating bytes go to the left and right channels.  Note that you can play
  119. stereo sounds on any device, but on mono devices the two channels will be
  120. mixed.  This usually sounds bad if the stereo sample has panning effects.
  121.  
  122.    The -z option tells QD Play to interpret the sample data as
  123. signed magnitude instead of the standard (as far as I'm concerned
  124. at least) unsigned magnitude.  Some sample editors use signed and
  125. others use unsigned -- it makes no difference in terms of sound
  126. quality, but it's really annoying if you don't have a sample player
  127. that supports both.  If you play a sample and it sounds really noisy,
  128. try the -z option -- you may have a signed magnitude sample on your hands.
  129.  
  130.    
  131. Command Line Usage Examples
  132. ---------------------------
  133.  
  134.    Since QD Play's many options can be a bit daunting at first, here
  135. are some examples to get you started quickly:
  136.  
  137. play chord.110 11000
  138.     
  139.     Plays chord.110 at 11000 hertz through the ST speaker, using
  140.    the MFP for timing.    
  141.  
  142. play stereo.125 12500 -2 -d
  143.     
  144.     Plays stereo.125 at 12500 hertz through the STe 8-bit D/A using DMA,
  145.    treating the data as stereo.    
  146.  
  147. play stereo.125 10000 -2 -d
  148.  
  149.     Same effect as above.  If you don't pick one of the STe DMA device's
  150.    four preset playback rates, QD Play will pick the closest one for you.
  151.    
  152. play stereo.125 10000 -2 -s
  153.  
  154.     Unlike the example above, this command will actually play the
  155.    stereo sound at 10000 hertz, not 12500, since the -s option tells QD Play
  156.    to use the STe 8-bit D/A but to use the MFP for timing.  Sound quality
  157.    is not as good with this method, but unlike the -d option (DMA sound device
  158.    timing) it offers playback at all sample rates. 
  159.  
  160. play signed.080 8000 -z -re
  161.  
  162.     Plays signed.080 at 8000 hertz through the ST Replay digitizer,
  163.    treating the data as signed magnitude.
  164.  
  165. play stereo.125 8000 -2
  166.  
  167.     Plays stereo.125 at 8000 hertz through the ST speaker.  The data
  168.    is interpreted as stereo, but the two channels are mixed to produce
  169.    mono data suitable for the ST speaker (since the ST speaker can't
  170.    play stereo sounds).
  171.  
  172. play deadjim.110 11000 -q -l -hippo
  173.  
  174.     Loops deadjim.110 at 11000 hertz either 10 times or until a
  175.    key is pressed.  No greeting message is printed, and the Hippo/Navaron
  176.    digitizer is used as the output device. 
  177.  
  178. play rooster.080 8000 -r -re
  179.  
  180.     Plays rooster.080 at 8000 hertz in reverse through the ST Replay
  181.    digitizer.  Note that the -replay option can't be abbreviated to -r
  182.    because -r means "play the sample in reverse." 
  183.  
  184. play chord.110 22000 -l
  185.  
  186.     If run on an unaccelerated ST, locks up your machine.  22000 hertz is
  187.    too fast for a looped sample on an unmodified ST.  Keep looped samples
  188.    down below 16 kHz to be safe.
  189.  
  190.  
  191. Miscellaneous Info About Samples and the ST
  192. -------------------------------------------
  193.  
  194.    A sanity-preserving convention I've come up with after dealing with
  195. literally thousands of samples is to store the sample rate in the filename
  196. extension.  E.g.,
  197.  
  198.     filename.110 -> 11.0 kHz -> 11000 Hz
  199.     filaname.123 -> 12.3 kHz -> 12300 Hz
  200.     filename.062 ->  6.2 kHz ->  6200 Hz
  201.     
  202. It helps a lot, since sample speed is not normally encoded in the samples
  203. themselves.  (Sample editing programs usually have their own sample format,
  204. but the most compatbile format is still the raw data.)
  205.  
  206.    Most stereo samples for the STe will be in signed magnitude format,
  207. since is what the device expects.  This means you'll have to use the
  208. -z option to play STe samples created with most other programs.  It
  209. also means that most STe sound players won't play sounds that are
  210. in the standard unsigned format.
  211.  
  212.    Most Mac samples are recored at either 11000 Hz or 22000 Hz.  These
  213. two sample rates are very popular because they're approximately one quarter
  214. and one half the standard rate used on compact discs.
  215.    
  216.    Most ST samples are recored at one of the following speeds:
  217.  
  218.           0 -  4.9  kHz
  219.           1 -  7.68 kHz
  220.           2 -  9.6  kHz
  221.           3 - 14.99 kHz
  222.           4 - 19.8  kHz
  223.           5 - 30.7  kHz
  224.  
  225.    Samples converted from SparcStations will be 8kHz samples.
  226.    
  227.  
  228. History
  229. ------- 
  230.  
  231.    In version 1.0, playback speed was limited to 18kHz.  In version
  232. 1.1, the limit is about 21kHz.  Most 22kHz samples sound OK when
  233. played at 21kHz.
  234.  
  235.    A bug in the sample loading routine has been corrected.  I was
  236. passing a bad argument to calloc.  Who knows why it worked before,
  237. but it's fixed now. 
  238.  
  239.    Also, calling play.ttp with only one argument caused a bus error.
  240. That's been fixed.  
  241.  
  242.    Low sample playback speeds are now handled correctly.  Playback
  243. speeds as low as 600Hz work now. 
  244.  
  245.    As of version 1.25, there was a 25 sample limit.  That limit has
  246. been raised to 250 in version 1.3.     
  247.  
  248.    Version 1.4 saw the addition of the -r option to play samples
  249. in reverse.
  250.    
  251.    Versions 1.5 and 1.6 were only distributed to people who registered
  252. Digital Keyclick.  (If you haven't, please do!)
  253.  
  254.    Version 1.7 saw the addition of the -replay option to play samples
  255. through an ST Replay digitizer.
  256.  
  257.    Version 2.0 was the first to include support for STe's enhanced
  258. sound capabilities.  Other options were added, too, including
  259. looping and signed magnitude sample support.
  260.  
  261.    I totally redid the play.inf parsing for version 3.0, so that 
  262. all the command line options now work from the AUTO folder.  The loop
  263. specifier is also new to version 3.0.  Stereo mixing is fixed for
  264. mono devices as well.
  265.  
  266. Dave Baggett
  267. 5640 Vantage Point Road
  268. Columbia, MD 21044  USA
  269. Internet: dmb@tis.com or dmb@wam.umd.edu
  270.  
  271. v1.0    April 6, 1990
  272. v1.1    April 29, 1990
  273. v1.25    May 17, 1990
  274. v1.3    July 11, 1990
  275. v1.4    August 5, 1990
  276. v1.7    July 23, 1991
  277. v2.0    March 15, 1992
  278. v3.0    June 11, 1992
  279.