home *** CD-ROM | disk | FTP | other *** search
- Stasis 1.10 Manual
- ==================
-
- Stasis is a module occupying about 11K which provides an easy to use sound
- system for games programmers. Stasis plays samples, which it can load and
- save in various ways. Sound commands are issued in the normal way. There
- are facilities to retune samples to a different pitch if necessary.
- Primitive pitch/volume slides are included.
-
- Loading the Module
- ==================
-
- There are many ways - double clicking the application, *Run the
- application, *RMLoad Stasis:Stasis once the filer has seen the application,
- or whatever you can engineer for yourself.
-
- Using Stasis
- ============
-
- The simplest (and probably the best) way to use Stasis is to load samples
- using the *StasisLoad command, choose which channel plays which sample with
- *StasisLink, and the play them with SOUND command (from BASIC) or Sound SWIs.
-
- Loading Your Sounds
- ===================
-
- Stasis can load samples in either its native format (which will be extended
- in the future) or Tracker format (provided so that samples can be exchanged
- with other packages). The command is *StasisLoad <slot> <filename>. Stasis
- currently provides 64 slots, each of which can contain one sample. The
- <slot> parameter is a decimal number 0-63. Stasis now supports alien file
- format modules. If StasisDvox is loaded then Stasis will be able to load
- DataVox format samples.
-
- Checking that You’ve Loaded Your Samples
- ========================================
-
- The command *StasisCat will list details of the first 16 sample slots.
- *StasisCat 0 63 lists them all.
-
- Playing your Samples
- ====================
-
- To get a sound from the module, you need to tell it which sample to play on
- which channel. The command is *StasisLink <channel> <slot>. The channel is
- the conventional 1-8 as used by the RISC OS sound system. The slot should be
- the same number that you told *StasisLoad when you loaded your sample. Note
- that you don’t need to attach channels (using *ChannelVoice etc) as Stasis
- claims the channel when you issue a *StasisLink command.
-
- If you need things to happen a bit more quickly, use the Stasis_Link SWI.
- R0,R1 hold the parameters channel,slot. The SWI doesn’t attach the voice -
- make sure you use a *StasisLink command or the Stasis_Attach SWI at least
- once for each channel to do this.
-
- Once a sample is linked to a channel, it can be played using conventional
- sound commands. The duration of the sound (the fourth number in a SOUND
- command) is ignored, and should be zero for future compatibility.
-
- There’s also the Stasis_Sound SWI which has the advantage that it can be
- called from an interrupt routine.
-
- Examples
- ========
-
- If a Stasis sample is double clicked on the Desktop, it will be loaded into
- slot 1 and you should hear it.
-
- You can also try the following, using slot 2 as an example, from the
- command line (press F12):
-
- *StasisLoad 2 <filename>
- *StasisLink 1 2
-
- and then press ctrl-G. Providing the file exists and the sound system is
- working, you should hear a sound. If not, try the commands *Audio On,
- *Speaker On or *Volume 127 to see if that helps.
-
- In BASIC, you could try:
-
- *StasisLoad 1 <filename>
- *StasisLink 1 1
-
- and whenever you need to make a sound
-
- SOUND 1,-15,40,0 - for a pitch of 40.
-
- Entering the command *StasisCat should show whether you have loaded any
- samples.
-
- Slides
- ======
-
- Stasis supports both volume and pitch slides. The command is of the form
-
- *StasisSlide <channel> <type> <target> <time>
-
- For example:
-
- *StasisSlide 1 0 0 100
-
- will slide channel 1’s volume down to zero in 100 centiseconds, and the
- command
-
- *StasisSlide 1 1 &3555 200
-
- will slide the pitch to &3555 in 200 centiseconds.
-
-
- Further Commands
- ================
-
- The above instructions should be all that you need to use sound in games
- etc. If you are writing a program to produce samples then you may need to
- use the command *StasisSample. *StasisSample <slot> <start address> <sample
- length> tells Stasis to use the block of memory at the specified address as
- data. Whilst the slot is a decimal number, the other parameters are in hex.
- A further two parameters may be added to specify a repeat offset (from the
- start of the sample) and repeat length. This is how looped samples work - a
- section is repeated again and again. See the technical file in this
- directory for more details.
-
- Saving Samples
- ==============
-
- Samples must be saved individually, and may be saved in either of two
- formats. The command StasisSave <slot> <filename> will save a sample in
- Stasis format. The advantages are :
-
- • The sample responds to double clicking on the desktop.
- • The finetune value is saved.
- • The file is a bit shorter.
-
- The command StasisSave <type> <slot> <filename> saves the sample in Tracker
- or other formats, depending on which alien format modules are loaded. The
- advantages are :
-
- • The sample can then be altered with other software packages.
-
- All alien formats can be reloaded by Stasis whilst the alien format module
- is present.
-
- Generally Messing About
- =======================
-
- Two more commands can be used to retune the sound system. Firstly
- *StasisFineTune, which will retune a certain sample in a slot to a different
- pitch. The finetune information is saved if the sample is saved in Stasis
- format. The command *StasisTune sets the master tuning of the module, which
- affects all samples and is never saved. The normal value for both is &4000.
- Tuning values are hexadecimal.
-
- A sample can be renamed with *StasisName <slot> <name> where the name is up
- to 20 letters long.
-
- Condtions of Use
- ================
-
- This version of Stasis may be freely used and distributed for commercial or
- non-commercial applications. If you can distribute the whole application
- with your software then so much the better, but otherwise just include
- whatever you need. You must not remove my copyright notice from the module.
-
- This software is supplied as is, and no liability will be accepted for loss
- or damage of any kind arising from its use or misuse.
-
- Andy Southgate, 5th Nov 1993, 20th Jan 1995.
-
-