Short: ARexx driven 8SVX player (+source) Author: dck@hol.gr (D. Keletsekis) Uploader: dck hol gr (D Keletsekis) Type: mus/play Version: 1.0 Requires: WB 2+ Architecture: m68k-amigaos ========================================================== >>>>> GCSound - 8SVX sample player ========================================================== GCSound is a 8SVX sample player which can be controlled from Gui4Cli (v3.6+) or from an ARexx program. You just run it, without any arguments (at the moment) and it will load itself, create a public message port named "gcsound" (note the lower case) and sit around waiting for Gui4Cli or ARexx messages. Many samples can be loaded and played at will. If the sample size is over 64k, it will be played directly from the hard drive. You can have as many samples as you want loaded (note that they will consume *chip* memory - maximum 64k each) and play up to 4 of them simuiltaneously. These are the commands it will understand : * LOAD Will load the sample into memory. must be the full path and file name of the sample, and is a name you give to it with which you can refer to it in other commands. This could be the plain file name for example. If the sample is over 64k, only the first 64k will be loaded. The rest will be read from disk when needed. ex: Address "gcsound" 'Load DH0:samples/mysample mysample' * PLAY [ ] This command will start to play an already loaded sample. is the name you gave to the sample. You may also give the you want it played (note 0 means - play forever), the (1-64) and the speed (125 - 1000 or -1 for default speed). If you don't give these, the sample will be played forever, at it's default volume and speed. * UNLOAD Will unload a loaded sample, freeing it's memory. If it's playing, it will be aborted. If you do not give a sample name then *all* samples will be aborted and unloaded. * STOP Will stop the given sample, if it's playing. Again, if you do not give a sample name *all* samples currently playing will be stopped. * SOUND [ ] This is like the Load and Play commands combined. It will load the given (full path), play it and when finished, unload it. * VOLUME <1-64> With this you can change the volume of a loaded sample. This can also be done while the sample is being played. * SPEED <125-1000> Changes the speed of a loaded sample (while playing or not). * TIMES Changes the times that a loaded sample will be played. Currently, this only works for large samples (i.e. the ones being played directly from the hard drive) Note that 0 means forever. * QUIT Will abort all samples playing, unload everything and quit. * INFO This command will return 2 numbers : the volume and the speed of the given sample. From Gui4Cli, this can be accessed through the $$Call.ret or $$RexxRet internal variables depending on whether you used Call or SendRexx. If sent from an actual ARexx program, they will be stored in arexx's RESULT variable. ========================================================== Behaviour : GCSound uses a user count system so that it may be accessed by many outside programs. When you start up the program, it will check if it's already running (i.e. if the gcsound port exists) and if it is it will send it a message to increase the users counter. When you send it a quit command, it will decrease the users counter and will *not* quit until all other programs using it it have also told it to quit. This means that for each time you run the program you must also send a respective quit command. You may get it stranded sometimes by running it too many times.. - just send it quit commands until you get a "host environment not found" error.. Note : GCSound only plays mono samples at the moment. Stereo may be added later.. ========================================================== Author D. Keletsekis Email dck@hol.gr WWW http:users.hol.gr/~dck/gcmain.htm Status FreeWare Date October 98 ==========================================================