home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / gamesuite_1 / GameSuite / !Stasis / MicroHelp / Manual < prev    next >
Encoding:
Text File  |  1995-08-07  |  6.1 KB  |  159 lines

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