RANDPLAY - Sample Replay Program Copyright 1992 Martin H. Smith All Rights Reserved Replay Sound Tables Copyright 2-Bit Systems Introduction The 3 programs in this archive are sample playback, compression and conversion utilities. The playback program is more flexible than others of similar function and thanks to the REPLAY sound tables it sounds better and can cope with higher replay frequencies. The basic task of RANDPLAY is to choose a sample from a list and play it at boot time. There are no silly limits on the number of samples in the list. Installation and Boot Usage Copy RANDPLAY.PRG to the AUTO folder of the boot disk. Copy it again to the bin directory of your shell (often C:\BIN) and rename this copy to RANDPLAY.TTP. Copy the other .TTP files to the BIN directory. Now create a list of samples. Create the file RANDPLAY.INF in the root directory of the boot drive and place lines similar to the following in it, depending on where your samples are and what speed you want them played at. # RANDPLAY.INF file last edited MHS 23/1/92. PLAY.PRG Beater! f:\replay\mysample\aliens.spl 10000 f:\replay\mysample\compl22.spl 22000 f:\replay\mysample\cylinder.spl 9800 f:\replay\mysample\daleks.spl 16000 f:\replay\mysample\darksta2.sam 9200 Lines starting with '#' are comments. If you have samples saved in .AVR or BYTEPACK format the numeric parameter is not required as their speed is stored in the file. Now reboot. There should be a sign on message from RANDPLAY and then a randomly chosen sample will be loaded and played. During replay hit the SPACE bar to start playing again or the UNDO key to stop playback. Command Line Playback When the program is passed command lines from a CLI there are several other features available. Command lines are one of the forms: RANDPLAY -t RANDPLAY sample_file [speed] RANDPLAY inf_file With the -t option the program attempts to open all the files listed in the given .INF file or the default one if a name was not specified. This helps avoid annoying problems with mistyped filenames which only come up once in 50 boots or so. When this happens GEM then helpfully clears the screen of the error message (what an operating system). RANDPLAY my.inf picks a random sample from the ones listed in my.inf RANDPLAY x.avr plays the sample x.avr (the AVR format includes the replay speed in the sample header) RANDPLAY x.spl 20000 plays back the sample x.spl at 20Khz. For raw sound data you have to give a speed. What happens is that if the file extension is .INF it gets treated as a text file giving a list of samples and playback speeds. Otherwise if a speed was given it is loaded raw else it must have an AVR header or be a packed file (see below). All the playback commands can be preceded with a -c option to play back through a REPLAY sampler cartridge instead of the monitor. This is the cartridge I use for all my sampling and is highly recommended. Desktop Picture Selection RANDPLAY can be used in conjunction with a popular desk accessory that displays a high resolution DEGAS picture as the desktop background. The accessory requires a file called DESKTOP.P?3 in the root directory. To use the picture randomiser create a DESKTOPS subdirectory of the AUTO folder and copy all the pictures you wish to select from into it. Then every few reboots a random one will be chosen and copied to the root directory. If the DESKTOPS subdirectory is not present the feature is silently disabled. Running RANDPLAY with an argument of -desk will force a desktop change if you get bored with the one you have. Using BYTEPACK.TTP This is used to compress samples by 50 percent by combining the most significant halves of two samples into one byte. It can give quite good quality results on some signals but can also sound utterly disastrous on others. It is recommended that you don't use it on your only copy of a prized sample ! It can be useful for saving disk space on lower speed speech samples. Samples packed in this manner can be played back by RANDPLAY but you will not be able to load them into sample editors or play them with other programs. You give it a command such as BYTEPACK x.spl 20000 which produces the packed file x.bps. The RANDPLAY program detects these format files so you just then say RANDPLAY x.bps Using SPL2AVR.TTP Used to convert raw sample data to AVR format samples. Basically adds a header. Usage is SPL2AVR [-mac] input_file output_file speed Where the output file defaults to input file with a .AVR extension. For example SPL2AVR x.spl 20000 The -mac option converts from mac style unsigned samples to signed 8 bit. I hope to add Sparc format conversion later but these are stored in a logarithmic encoding which will be a bit trickier. License These programs are NOT Shareware. I wrote them for my own use and the total development time was small. The programs are provided to you free of charge for non commercial use and come with no warranty of any kind. Every care has been taken in the production of the software but you must decide whether they meet your needs and if so accept any risks of using them. The software may be freely reproduced and circulated as long as no fee is charged for such reproduction. These programs may not be included on a magazine cover disk without the permission of the author. SPECIAL NOTE FOR PD LIBRARIES: You must distribute the entire archive complete and unmodified INCLUDING THE BLOODY DOCUMENTATION. I'm sick of having my work mangled by you idiots. Problems with the software may be reported to me at the address below. Credits A very big hi to Maggie again The Escape Committee - keep tunnelling lads Andy Webber Moira Nikki & Nikki Jas Brooke JEF Contact Pigeon post: Martin Smith, 47 Leeds Road, Allerton Bywater, Castleford, W. Yorks, WF10 2ES, UK. Email (preferred): msmith@lssec.bt.co.uk