pre-release 0.2 Edited By Dr Phibes
STOS Manual 5: MUSIC AND SOUND
Voices And Tones
PLAY [voice,]pitch,duration]
Plays a pure note.pitch sets the tone ranging from 0(low) to 96(high).
Each one of these pitches is associated with one of the notes(A,B,C,D,E,F,G).
If you select a pitch of 0, no note will be produced, and PLAY will simply
wait for a time specified by duration. duration holds the length of time
the note is to be played in 50ths of a second. A duration of 0 indicates
that the sound will not be generated.
The optional voice designates which of the three voices the note is
to be played on and can range from 1-3. If it is not specified then the
note will be played on all three voices at once.
| OCTAVE |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
| C |
1 |
13 |
25 |
37 |
49 |
61 |
73 |
85 |
| C# |
2 |
14 |
26 |
38 |
50 |
62 |
74 |
86 |
| D |
3 |
15 |
27 |
39 |
51 |
63 |
75 |
87 |
| D# |
4 |
16 |
28 |
40 |
52 |
64 |
76 |
88 |
| E |
5 |
17 |
29 |
41 |
53 |
65 |
77 |
89 |
| F |
6 |
18 |
30 |
42 |
54 |
66 |
78 |
90 |
| F# |
7 |
19 |
31 |
43 |
55 |
67 |
79 |
91 |
| G |
8 |
20 |
32 |
44 |
56 |
68 |
80 |
92 |
| G# |
9 |
21 |
33 |
45 |
57 |
69 |
81 |
93 |
| A |
10 |
22 |
34 |
46 |
58 |
70 |
82 |
94 |
| A# |
11 |
23 |
35 |
47 |
59 |
71 |
83 |
96 |
| B |
12 |
24 |
36 |
48 |
60 |
72 |
84 |
97 |
VOLUME [v,]intensity
v indicates the sound channel to be used and as with play if it is not
specified then all three voices are affected and set to the volume intensity
which can range from 0(silent) to 15(very loud). There is also a special
setting of 16 for the envelope generator. See ENVEL command.
CLICK ON/OFF
When producing a sound, a keyboard entry will cause a click which will
switch the sound off. To prevent this happening us CLICK OFF. To reinstate
the normal keyboard click status use
CLICK ON
Note that the keyboard clicks do not affect music created with the MUSIC
statement.
The Music Command
MUSIC n
Play tune number n from bank 3 and can range from 1 to the number of tunes
installed in the bank, up to a maximum of 32.
MUSIC OFF
Turns off a tune currently being played.
MUSIC FREEZE
Temporarily turns a tune off.
MUSIC ON
Restart a tune. If the tune was turned off using MUSIC FREEZE then the
tune will continue from the point it stopped at, if it was stopped with
the MUSIC OFF command it will restart from the beginning of the tune.
TEMPO s
Allows you to vary the tempo of a tune played with the MUSIC command where
s refers to the new speed and can range from 1(slow) to 100(fast). TRANSPOSE
df Alters the pitch of a piece of music by adding the value of df to each
note before playing it. df can range from -90 to +90. Negative numbers
lower the tone and positive numbers increase it. a df of 1 corresponds
to a single semi-tone.
p=PVOICE(v)
Returns the current position in a tune. v refers to the voice to be tested
and p is set to a number representing the address of the note being played
and not to the note itself. If the function returns a value of 0 then voice
v is not currently producing a note.
VOICE ON/OFF[v]
Lets you turn off/on 1 or more voices of a tune played by the MUSIC command.v
can range from 1-3 and if omitted results in all three voices being affected.
The Music Definer
Included on the disc is a powerful music composing accessory found under
the file name MUSIC.ACB. When loaded up and run the screen consists of
three windows which correspond to the three voices. Each of these windows
can hold a separate component of the music. You can move between the windows
using the mouse or the left/right cursor keys. The graphical representation
of the composed music is only there as a convenient aid for those who can
read music and all entries to the music being composed are input through
the three voice windows in the following manner. Musical notes are entered
in the appropriate window by typing them in directly from the keyboard.
The notes are split into three distinct parts. The first section consists
of the name of the note, and can be 1 of the following: C, C#, D, D#, E,
F, F#, G, G#, A, A#, B listed in order of ascending pitch. The second part
of the note is the octave, which can range from 0(low) to 7(high). Finally
each tone has a duration specified in units of a single note, This is set
by the instructions below.
duration of note meaning
WN Whole note
HN Half note
QN Quarter note
EN Eighth note
SN Sixteenth note
TN Thirtysecondth note
You can also add an additional half note to each of these durations except
the SN, by using the " . " character. Each of these sections are combined
into a single string such as F #3 TN. You enter these notes and press [RETURN].
You can also use the function keys to move the cursor as follows:
f2 Displays the next page of music
f1 Displays the previous page
f3 Jumps to the start of the music
f4 Jumps to the end
The Music Instructions
In addition to simple notes, the MUSIC DEFINER also supports a range of
other instructions which can be executed at any point in your music. Here
is a list of the various options.
VOLUME v
Sets the volume of the current voice to v and can vary from 0 (silent)
to 15 (loud). If this instruction is not used, a default volume of 15 is
set.
ENVEL e
Allows a selection to be made from a number of different waveforms to be
used for MUSIC. As a default eight of these envelopes are already defined,
these definitions can be altered using the built in envelope generator.
Each piece of music MUST contain one of these instructions at the beginning
or the tune will not be played.
TREMOLO t
Adds a pleasant waver to the tune. t is the number of the tremolo to be
used, and as with envelope, eight of these are already defined and can
be modified with the tremolo definer utility.
STOP TREMOLO
Deactivates the current tremolo if one is being used.
NOISE n
Generates a hiss of pitch n at the same time as the notes are being played
by the current voice. The frequency of this sound ranges between 0 and
31. See the STOS basic NOISE command for more information.
STOP NOISE
Turns off a noise created with NOISE.
NOISE ONLY
Plays each note as a noise rather than a pure tone.
MUSIC
If the voice has been defined as noise only, this command returns the voice
back to a normal pure tone.
REPEAT n,p
Repeats a section of music starting from the instruction number p to the
end of the current voice. n refers to the number of times the music will
be repeated. If a value of 0 is used the music will repeat indefinitely
and should be used before the music to be repeated. If it is placed inside
a loop the music will never end, as the repeat will be reinitialised every
time through the loop.
NTREMOLO t
Uses the noise generator rather than a pure tone to create tremolo t.
NTREMOLO OFF
Turns the ntremolo function off.
Envelopes And Tremolos
The envelope and tremolo editors are effectively one and the same. They
can be accessed at any time using the FIX ENVELOPE or FIX TREMOLO options
from the tools menu. Since the two routines are otherwise identical, we'll
concentrate on the ENVELOPE editor. The top of the screen contains a graphical
representation of the current envelope. Below this are three windows. You
can move between these using the cursor keys. The nature of the envelope
is determined by up to eight different phases. These phases are specified
using the information you have entered into the windows. The SPEED window
sets the speed of the phase and range from 1(slow) to 100(fast). This number
indicates the delay between each step of the waveform. A speed of 100 signifies
that the steps will be performed every 50th of a second. In addition you
can also input the commands LOOP or END. END simply terminates the envelope
at the current point. LOOP repeats the entire envelope, which now overlays
a continuous rhythm on any music you subsequently play. The STEP window
inputs the change in the volume to be produced in each stage. Positive
numbers increase the volume, while negative numbers decrease it. Finally
there is the NUMBER setting which determines the number of times each phase
will be executed.This can range from 0 to 255. At the start of the session
you are presented with waveform number 1, you can move to the next envelope
by pressing f2 and to the previous one with f1.
The Pull Down Menus
STOS
Acknowledgements
QUIT:
Exit to STOS basic editor
QUIT & GRAB
Exit to STOS basic and load the current music into bank 3 BANK
LOAD MUSIC BANK
Load a memory bank containing a sample of music from the disc. Note that
this command does not affect the music currently being edited. This allows
you to merge two sections of music together.
SAVE MUSIC BANK
Save the music on to the disc. The name of the file must end with the extension
.MBK
GRAB
Grab some music from the current STOS basic program.
ERASE MUSIC BANK
Deletes any music currently stored by the definer.
MUSIC-NEW MUSIC
Deletes the music currently being edited, and asks for the name of the
new tune you wish to create. Does NOT affect bank 3.
MUSIC-RENAME MUSIC
Changes the name of the current piece of music.
MUSIC-PUT MUSIC
Copies the currently edited tune into one of the 32 different slots in
bank 3. Bank 3 is used by STOS basic to hold your music and is limited
to a maximum of 32k. Since the definer only saves the data which has been
previously installed in the bank, you must always remember to use the PUT
instruction prior to saving your music to disc.OTHERWISE THE TUNE WILL
BE LOST !
MUSIC-GET MUSIC
This option loads a sequence of music stored in bank 3 into the music editor.
If you change this music, don't forget to place it into the memory bank
with PUT, otherwise all your amendments will be lost. Get Music automatically
appends any envelopes or tremolos used by your composition into the existing
set. You are, however, restricted to a maximum of 25 envelopes and tremolos.
MUSIC-ERASE MUSIC
Allows you to delete one of the sections of music from the bank.
MUSIC-PLAY MUSIC
Enables you to play a piece of music you have stored in the memory bank.
If you wish to play the music you are currently editing, you need to load
it into the bank first using PUT MUSIC. PUT AND PLAY Permits you to put
the current music into bank 3 and then play it using just one operation.
MUSIC-PRINT MUSIC
Outputs a listing of the music you are editing to a printer. All three
voices are printed out.
BLOCK-START BLOCK
Sets the start of a block at the current cursor position All text below
this line is subsequently displayed in inverse.
BLOCK-END BLOCK
Sets the end of the block. The section of the music making up this block
is inverted. This block can now be manipulated with COPY BLOCK and TRANSPOSE
BLOCK.
BLOCK-CANCEL BLOCK
Aborts current block and redisplays the section of music in normal type.
BLOCK-COPY BLOCK
Places a copy of the currently defined block at the cursor position. This
feature can be used to copy music from one voice to another.
BLOCK-ERASE BLOCK
Erases the part of the music selected using the START and END BLOCK commands.
BLOCK-TRANSPOSE BLOCK
Allows you to add or subtract a specific number of semitones from the music
in the current block. The editor expects you to input a number from -90
to +90. As with TRANSPOSE from basic, negative values lower the pitch and
positive values increase it.
TOOLS-FIX ENVELOPE
Enter ENVELOPE editor.
TOOLS-FIX TREMOLO
Edit tremolos.
TOOLS-ERASE ENV/TRM
Delete all envelopes and tremolos from memory.
Predefined Sound Effects
BOOM: Generates a noise sounding like an explosion.
SHOOT: Create a noise like a gun firing.
BELL: Simple bell sound
Defining Your Own Effects
NOISE v,p
Produces a sound like rushing wind. The frequency of the noise is set by
the pitch p where p is a number from 1(high) to 31(low). v specifies the
voice which the noise is to be played on. If it is not included, noise
is output by all three voices simultaneously. Note that any noise generated
with this command can be played continually while a program is running
- just like the MUSIC command.
ENVEL type,speed
Activates one of the ST's 16 envelopes. type specifies the envelope to
be used and can take any value from 1 to 15. speed ranges from 1(fast)
to 66535(slow) and determines the length of the sound. Before you can use
this feature, you must first set the volume to 16 with VOLUME.