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

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.                                   Beep
  14.  
  15.                         Copyright (C) 1991, 1992
  16.                             By David Baggett
  17.  
  18.  
  19. --------------------------------------------------------------------------------
  20.                              User Contract
  21.  
  22. This program is FREE.  You may distribute it at will, provided you
  23.  
  24.         1) do not charge any money for it,
  25.         2) distribute it WITH the documentation, and
  26.         3) do not change the program or documentation in ANY WAY.
  27.  
  28. --------------------------------------------------------------------------------
  29.  
  30.  
  31. Introduction  
  32. ------------
  33.  
  34.    In 1989 Dan Wilga released a Public Domain program called "newbell"
  35. that replaced the boring "ding" sound the ST makes with a digitized
  36. sound.  Unfortunately, newbell only allowed certain playback speeds, all of 
  37. which were incompatible with sounds sampled on the Mac.
  38.  
  39.    Here's a new program that does the same thing, but allows sample playback
  40. speed to be specified in Hertz.  It also lets you use stereo and signed
  41. samples, and supports the STe's enchanced DMA sound capabilities.
  42.  
  43.  
  44. General Usage
  45. -------------
  46.  
  47.    Put beep.prg in your AUTO folder and create beep.inf with a standard
  48. ASCII text editor.  In beep.inf, put the name of the sample you want to
  49. replace the system beep with and the playback speed in Hertz for the sample.
  50. For example,
  51.  
  52. c:\sounds\lowchime.snd        8000
  53.  
  54. will replace the system beep with a chime sample, played at 8000 Hertz.
  55.  
  56.  
  57. Enabling and Disabling Beep
  58. ---------------------------
  59.  
  60.    When beep.prg is invoked with no parameters, it reads the beep.inf
  61. file and loads all the sounds.  This typically occurs at bootup in the
  62. AUTO folder.  However, you can run beep.prg from a command shell (or
  63. from the desktop if you rename a copy beep.ttp) as well.  To turn
  64. Beep off, type
  65.  
  66.         beep off
  67.  
  68. from a command shell, or run beep.ttp from the desktop with parameter
  69. "off".
  70.  
  71.    Similary, type
  72.  
  73.         beep on
  74.  
  75. to turn Beep back on.
  76.  
  77.  
  78. Specifying an Alternate D/A Device
  79. ----------------------------------
  80.  
  81.    Beep can be configured to play its samples through other D/A devices.
  82. Currently, the Hippo/Navarone and ST Replay digitizers are supported.  The
  83. STe's (and TT's, and Falcon's) 8-bit D/A is also supported, with either the
  84. DMA or the MFP for timing.  (If you use the DMA for timing, you can only play
  85. at certain sample rates, so sounds may sound too fast or slow.  On the other
  86. hand, if you use the MFP for timing you can play stereo samples at any rate
  87. but the sound quality isn't quite as good.)
  88.  
  89. Other digitizers will be supported if people send me info on them.
  90.  
  91.    To use an alternate D/A device, put one of the following keywords 
  92. in curly brackets somewhere in your beep.inf file:
  93.  
  94.     hippo    replay    dma    mfp
  95.  
  96. For example, a beep.inf containing
  97.  
  98. {dma}
  99. d:\usr\sounds\zoinks.snd        8000
  100.  
  101. will cause Beep to play the "zoinks" sound through the DMA sound device, using
  102. the DMA for timing.  (This won't work on machines that don't have DMA sound
  103. capabilities, of course.)
  104.  
  105.    Note that the normal ST system beep will still be masked, even if
  106. you don't use the speaker as the D/A device.  
  107.  
  108.  
  109. Different Kinds of Samples
  110. --------------------------
  111.  
  112.    Unless you tell it otherwise, Beep assumes your sounds are unsigned 8-bit
  113. mono samples.  You can use stereo and/or unsigned samples with Beep too, by
  114. putting one of the following keywords in brackets after the filename:
  115.  
  116.     stereo    signed
  117.  
  118. For example, a beep.inf containing
  119.  
  120. d:\usr\sounds\type2.snd    {stereo}    8000
  121.  
  122. will make Beep interpret beep2.snd as stero data instead of mono.  (Stereo
  123. sounds will play on mono devices; the channels are just mixed together.)
  124.  
  125. Similarly the directive
  126.  
  127. d:\usr\sounds\beep2.snd    {signed}    8000
  128.  
  129. tells Beep that beep2.snd has signed 8-bit samples instead of unsigned
  130. samples.  Some digitizing software saves sounds in this format instead of
  131. the usual unsigned format.  If you're not sure what you've got, a general
  132. rule of thumb is that if a sound sounds very noisy you should try it as
  133. signed.
  134.  
  135.  
  136. Technical Information
  137. ---------------------
  138.  
  139.    Beep steals Bios trap #13 and looks for Bconout(2, 7) calls.  When it sees 
  140. one, it plays the sound.
  141.  
  142.    The program uses about 30K when resident, not including the space
  143. taken up by the sample data.  (Down from 38K in version 1.0)
  144.  
  145.    In earlier versions, Beep used bit 6 of the CONTERM global to enable 
  146. and disable itself.  Unfortunately, this conflicted with at least one 
  147. person's hard disk driver.  (Don't ask me why.)
  148.  
  149.    This version uses the bit 6 of memory location 768, chosen arbitrarily 
  150. from the list of user interrupt vectors.  If for some reason Beep will not 
  151. run with a particular application resident, try moving the on/off flag 
  152. somewhere else in memory.  To do this, put the desired flag address in angle
  153. brackets at the beginning or end of your beep.inf file; e.g.,
  154.  
  155. <1020>
  156. d:\usr\sounds\zoinks.snd        8000
  157.  
  158. will cause Beep to use 1020 (decimal) as the memory location for the beep 
  159. on/off flag.  To then enable and disable Beep, pass the address as a third 
  160. parameter to the beep [on | off] call; e.g.,
  161.  
  162.         beep off 1020
  163.  
  164. will mask bit 6 of the byte at location 1020 decimal, thereby disabling Beep.
  165.  
  166.    Memory locations 512 through 1020 are good candidates for flag locations
  167. since they are currently not claimed by Atari.
  168.  
  169.    Whenever Beep is on it masks the normal system beep by clearing the 
  170. appropriate bit in CONTERM.
  171.  
  172.    Beep is well-behaved and should work with all versions of TOS.  It does 
  173. not use any undocumented techniques or memory locations,except of course for 
  174. the beep on/off flag, which can be moved elsewhere in memory if necessary.
  175.  
  176.  
  177. Caveats
  178. -------
  179.  
  180.    It's best to play samples at fairly low rates (e.g., 8000 or 11000 Hertz)
  181. so that you don't completely bog down the system.  Using samples at rates
  182. above 11000 will often prevent the mouse from tracking correctly while the
  183. sound is playing, and may cause weird things to happen to very CPU-intensive 
  184. applications.  (To see this effect, select the "About..." box in TOS 1.4 and
  185. click outside the dialog box with Beep on.)
  186.  
  187.    The program will not know it has already been installed if you
  188. run it twice (or ten times) in a row.  Doing so will use up more and
  189. more memory.
  190.  
  191.