MINI STUDIO ZX Computing, March 1987 A Sound Sampler for any 48K or 128K Spectrum by Massimo Pilia. To enter the program: Type in listing 1 and save it with SAVE "MS" LINE 5. Then type in listing 2 and save this onto another tape with SAVE "L2". Run listing 2 and when the saving prompt appears, position your FIRST tape (with MS on it) just after listing 1 and start recording. Press a key. Rewind the tape and load listing 1. Once it has loaded and run itself you are ready to go through the following instructions. What Is Sound Sampling? Sampling is a way of digitally recording a small amount of sound, usually for use in music. A computer's memory is an ideal medium for this type of recording, since a sound is in memory, it can be subjected to any number of bizarre alterations. This program allows sound (up to about six seconds long) to be recorded, reversed, speeded up, slowed down and sequence- played in a specific order with other sounds. The basis of the program is the machine code that records and plays back the sound. This works by reading the cassette port at high speed, and feeding the sounds that are read into memory in the form of data bits. By reversing the process and reading the bits from memory and out of the cassette port and buzzer, the sound is reproduced. Changing the speed that the sound is played back at will also change the pitch of the sound. There are four modes of operation: SOUNDS - this is the mode where the sounds are sampled and cut up for use in the other modes. PLAY - sounds set up in SOUNDS mode can be played back at eight pitches covering an octave. BARS - up to eight bars, each containing up to eight sounds, can be entered in this mode. PROGS - bars created in BARS mode are strung together in up to 64 steps here. The SPACE key switches you between modes and the cursors in SOUNDS, BARS and PROGS are controlled using keys: 5=left, 6=down, 7=up and 8=right with 0 for edit. Sounds Mode In this mode the program is controlled with the following keys: 1 - Selects the number of beats per bar (up to eight). 2 - Selects the "blocks" per beat (see note below). I - Input (record a sound). O - Output (playback). L - Load. S - Save. K - Key (musical key in PLAY mode). When using I, O and S they operate on the sound underlined by the cursor, this is the moving line which underlines various functions and sounds and is controlled by the keys 5, 6, 7, 8, to move it in the direction of the arrows. The memory that sounds are sampled into is divided into 120 "blocks", each 256 bytes long. There are ten sound configurations (0-9) which are simply windows on this memory. Each of these configurations has four values as shown on the top left of the screen. The top right displays the mode you are in. The meaning of these values is: STA - this is the "block" where the sound starts in memory (0-119). LEN - the length of the sound (1-120). DI - the direction of the sound (forwards/backwards). DE - the delay used when playing back or recording the sound. This determines the speed and quality. Another value - BTS - is also shown but is just the number of beats the sound occupies. This is calculated by LEN/BLOCKS/BEAT. Recording 1. Set up the computer and tape recorder as shown in figure 1. On most tape recorders pressing PAUSE+PLAY/REC should allow you to sample from the microphone. 2. Configure a sound so as to use up the rest of remaining memory. EG. set up sound 0 as: N - STA - LEN - DI - DE 0 - 000 - 120 - FO - 01 by moving the cursor with keys 5-8 until it is beneath the value you wish to change, press 0 and then enter the value you require. The delay is set to 01 for maximum quality. If the delay was higher the sound could then be replayed at higher pitches (ie. lower delays) but would be of poorer quality. 3. Press I for Input and reply "y" to the "sure?" prompt. 4. Press a key to start sampling when you are ready. The sample is complete when the "PRESS A KEY" prompt disappears. 5. Press O to listen to your sample. It will sound best through headphones plugged into the ear socket at the back of the computer. 6. Now you must tighten up the sound; ie. chop off any excess sound before or after the part you want. Start by increasing the start value (STA) bit by bit; you will have to decrease the LEN value before each increase of STA as the TOTAL of STA+LEN is a maximum of 120. Listen to the sound each time until there is no superfluous sound before the portion you want. Now decrease the length (LEN) value until the sample is exactly the portion of sound you require. 7. Your sample is now complete. You may reverse it by moving the cursor to the DI column and pressing 0. You may also change the delay (speed). I shall explain the various ways of using a sample in a moment. Play Mode This mode uses the following keys: 1 - Record. 2 - Playback. In the Record sub-mode the sound currently underlined by the cursor in SOUNDS is turned into a musical (or not so musical) instrument played on keys 1-8 in the key specified by the K key from the SOUNDS mode. 0 toggles recording of tunes ON/OFF. 9 exits the sub-mode. In the Playback sub-mode a tune recorded in Record can be replayed by tapping out the rhythm on the 0 key. 9 exits. Bars Mode This mode uses the following keys: O - Run/Initialise (bars). E - Toggle Stop/Repeat C - Toggle beat counter ON/OFF Hold down any key on the bottom row to stop the sequence looping endlessly (this happens when repeat is ON). When the beat counter is ON, any bar entered that does not contain the right number of beats (ie. when the total BTS value of every sound in the bar is not the same as BEATS/BAR) will be rejected. This bar must then either be entered correctly or deleted by just pressing ENTER. In this mode eight bars (lists of sounds) can be edited and stored. These can be played back in order in this mode or in a more complicated sequence from PROGS mode. Entering bars: 1. Move the cursor under the bar to be edited and press 0. 2. Type in your bar. (Eg. 11134132). The numbers are the numbers of the sound samples that you set up in SOUNDS mode. 3. Enter any another bars you want to enter. 4. Press O and then enter "i" to Initialise. 5. Press O and then "r" for RUN to listen to your stroke of musical genius. The example bar in step 2 will play sounds 1,1,1,3,4,1,3,2 In that order. When counting the beats it counts sound 1 four times and 3 twice. Bars are split into eight parts. I prefer to leave the counter OFF but it is there for a purpose. Progs Mode This mode is controlled by keys O and E: O - Run/Initialise (sequence). E - Toggle STOP/REPEAT. Hold down any key on the bottom row to stop a sequence from playing. Bars can be strung together in up to 64 steps. This is for longer, more complicated sequences and for quicker editing. Entering steps: 1. Position the cursor under the value to be edited. 2. Press 0 to edit and enter the number of the bar you want. Enter 0 to signify the end of the sequence. 3. Enter any other steps you want to enter. 4. Press O and then "i" to initialise. Press O and then "r" to listen to the sequence. Whenever an alteration is made in either PROGS or BARS mode remember to re-initialise them. Using a Sample Once a sample has been created several things can be done with it: 1. The sample can be used as a musical instrument In PLAY mode. 2. The sound can be put into a simpler sequence on its own. If you have sampled some speech as: 0-000-016-FO-01 then you could set up sounds 1 and 2 as shorter versions of 0:- 1-000-002-FO-01 2-000-004-FO-01 In BARS mode enter bar 1 as: 211220. Initialise and run it for a N-N-N-Nineteen effect. 3. Echo can be simulated by "layering" the sound. Set up the sounds like this: N - STA - LEN - DI - DE 0 - 000 - 004 - FO - 01 1 - 002 - 004 - FO - 01 2 - 004 - 004 - FO - 01 3 - 006 - 004 - FO - 01 4 - 008 - 004 - FO - 01 5 - 010 - 004 - FO - 01 6 - 012 - 004 - FO - 01 7 - 014 - 004 - FO - 01 Enter bar 1 as 01234567. Initialise and run it. 4. The sound may also be used as part of a more complicated sequence using other sounds (ie. a drum beat). Sequencing a Tune Sequencing a tune poses a problem because when the sounds pitch is changed its length in time is also changed. This means that the rhythm goes out the window. As the program doesn't have a timer another method has to be used: Set up sounds 0-7 thus: N - STA - LEN - DI - DE 0 - 000 - 008 - FO - 00 1 - 008 - 008 - FO - 08 2 - 016 - 008 - FO - 16 3 - 024 - 008 - FO - 20 4 - 032 - 008 - FO - 28 5 - 040 - 008 - FO - 36 6 - 048 - 008 - FO - 44 7 - 056 - 008 - FO - 48 Sample the same sound (presumably a recorded sound) into each area. Now change all delays back to 00. These delay settings are in the key of C (at a guess) and represent the notes C,D,E,F,G,A,B and C. Add 4 to a delay for a flat and subtract 4 for a sharp. Example Rhythm If you managed to take all that in you are ready for your first drum rhythm using MINI-STUDIO. 1. Enter SOUNDS mode. 2. Set up sounds 1-3 like this: 1 - 000 - 003 - FO - 01 2 - 003 - 003 - FO - 01 3 - 006 - 003 - FO - 01 3. Input or load a bass drum sound into 1. 4. Input or load a snare drum sound into 2. 5. Input a blank (silence) into 3. 6. Enter BARS mode. 7. Turn the beat counter off (press C). 8. Enter the following bars: 13132313 13332333 13232322 13132133 33132133 11112111 33112111 13222223 9. Initialise. 10. Enter progs mode and enter these bar steps: 1213425362736873 11. Initialise and run this.