home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / program / gamesuite / !Stasis / StasisHelp / Manual next >
Encoding:
Text File  |  1995-01-29  |  5.9 KB  |  169 lines

  1. Stasis 1.10 Manual
  2. ==================
  3.  
  4.   Stasis is a module occupying about 11K which provides an easy to use sound
  5. system for games programmers.  Stasis plays samples, which it can load and
  6. save in various ways.  Sound commands are issued in the normal way.  There
  7. are facilities to retune samples to a different pitch if necessary. 
  8. Primitive pitch/volume slides are included.
  9.  
  10. Loading the Module
  11. ==================
  12.  
  13.   There are many ways - double clicking the application, *Run the
  14. application, *RMLoad Stasis:Stasis once the filer has seen the application,
  15. or whatever you can engineer for yourself.
  16.  
  17. Using Stasis
  18. ============
  19.  
  20.   The simplest (and probably the best) way to use Stasis is to load samples
  21. using the *StasisLoad command, choose which channel plays which sample with
  22. *StasisLink, and the play them with SOUND command (from BASIC) or Sound SWIs.
  23.  
  24. Loading Your Sounds
  25. ===================
  26.  
  27.   Stasis can load samples in either its native format (which will be extended
  28. in the future) or Tracker format (provided so that samples can be exchanged
  29. with other packages).  The command is *StasisLoad <slot> <filename>.  Stasis
  30. currently provides 64 slots, each of which can contain one sample.  The
  31. <slot> parameter is a decimal number 0-63.  Stasis now supports alien file
  32. format modules.  If StasisDvox is loaded then Stasis will be able to load
  33. DataVox format samples.
  34.  
  35. Checking that You’ve Loaded Your Samples
  36. ========================================
  37.  
  38.   The command *StasisCat will list details of the first 16 sample slots. 
  39. *StasisCat 0 63 lists them all.
  40.  
  41. Playing your Samples
  42. ====================
  43.  
  44.   To get a sound from the module, you need to tell it which sample to play on
  45. which channel.  The command is *StasisLink <channel> <slot>.  The channel is
  46. the conventional 1-8 as used by the RISC OS sound system.  The slot should be
  47. the same number that you told *StasisLoad when you loaded your sample.  Note
  48. that you don’t need to attach channels (using *ChannelVoice etc) as Stasis
  49. claims the channel when you issue a *StasisLink command.
  50.  
  51.   If you need things to happen a bit more quickly, use the Stasis_Link SWI. 
  52. R0,R1 hold the parameters channel,slot.  The SWI doesn’t attach the voice -
  53. make sure you use a *StasisLink command or the Stasis_Attach SWI at least
  54. once for each channel to do this.
  55.  
  56.   Once a sample is linked to a channel, it can be played using conventional
  57. sound commands.  The duration of the sound (the fourth number in a SOUND
  58. command) is ignored, and should be zero for future compatibility.
  59.  
  60.   There’s also the Stasis_Sound SWI which has the advantage that it can be
  61. called from an interrupt routine.
  62.  
  63. Examples
  64. ========
  65.  
  66.   If a Stasis sample is double clicked on the Desktop, it will be loaded into
  67. slot 1 and you should hear it.
  68.  
  69.   You can also try the following, using slot 2 as an example, from the
  70. command line (press F12):
  71.  
  72. *StasisLoad 2 <filename>
  73. *StasisLink 1 2
  74.  
  75.   and then press ctrl-G. Providing the file exists and the sound system is
  76. working, you should hear a sound.  If not, try the commands *Audio On,
  77. *Speaker On or *Volume 127 to see if that helps.
  78.  
  79. In BASIC, you could try:
  80.  
  81. *StasisLoad 1 <filename>
  82. *StasisLink 1 1
  83.  
  84. and whenever you need to make a sound
  85.  
  86. SOUND 1,-15,40,0  - for a pitch of 40.
  87.  
  88.   Entering the command *StasisCat should show whether you have loaded any
  89. samples.
  90.  
  91. Slides
  92. ======
  93.  
  94. Stasis supports both volume and pitch slides.  The command is of the form
  95.  
  96. *StasisSlide <channel> <type> <target> <time>
  97.  
  98. For example:
  99.  
  100. *StasisSlide 1 0 0 100
  101.  
  102. will slide channel 1’s volume down to zero in 100 centiseconds, and the
  103. command
  104.  
  105. *StasisSlide 1 1 &3555 200
  106.  
  107. will slide the pitch to &3555 in 200 centiseconds.
  108.  
  109.  
  110. Further Commands
  111. ================
  112.  
  113.   The above instructions should be all that you need to use sound in games
  114. etc.  If you are writing a program to produce samples then you may need to
  115. use the command *StasisSample.  *StasisSample <slot> <start address> <sample
  116. length> tells Stasis to use the block of memory at the specified address as
  117. data.  Whilst the slot is a decimal number, the other parameters are in hex. 
  118. A further two parameters may be added to specify a repeat offset (from the
  119. start of the sample) and repeat length.  This is how looped samples work - a
  120. section is repeated again and again.  See the technical file in this
  121. directory for more details.
  122.  
  123. Saving Samples
  124. ==============
  125.  
  126.   Samples must be saved individually, and may be saved in either of two
  127. formats.  The command StasisSave <slot> <filename> will save a sample in
  128. Stasis format.  The advantages are :
  129.  
  130.   • The sample responds to double clicking on the desktop.
  131.   • The finetune value is saved.
  132.   • The file is a bit shorter.
  133.  
  134. The command StasisSave <type> <slot> <filename> saves the sample in Tracker
  135. or other formats, depending on which alien format modules are loaded.  The
  136. advantages are :
  137.  
  138.   • The sample can then be altered with other software packages.
  139.  
  140.   All alien formats can be reloaded by Stasis whilst the alien format module
  141. is present.
  142.  
  143. Generally Messing About
  144. =======================
  145.  
  146.   Two more commands can be used to retune the sound system.  Firstly
  147. *StasisFineTune, which will retune a certain sample in a slot to a different
  148. pitch.  The finetune information is saved if the sample is saved in Stasis
  149. format.  The command *StasisTune sets the master tuning of the module, which
  150. affects all samples and is never saved.  The normal value for both is &4000. 
  151. Tuning values are hexadecimal.
  152.  
  153.   A sample can be renamed with *StasisName <slot> <name> where the name is up
  154. to 20 letters long.
  155.  
  156. Condtions of Use
  157. ================
  158.  
  159.   This version of Stasis may be freely used and distributed for commercial or
  160. non-commercial applications.  If you can distribute the whole application
  161. with your software then so much the better, but otherwise just include
  162. whatever you need.  You must not remove my copyright notice from the module.
  163.  
  164.   This software is supplied as is, and no liability will be accepted for loss
  165. or damage of any kind arising from its use or misuse.
  166.  
  167. Andy Southgate, 5th Nov 1993, 20th Jan 1995.
  168.  
  169.