SOUND
Outputs sound effects and musical notes
SOUND v,f,d[,dir] [,m] [,»] [,w] [,p]
V =
voice (1 ..3)
f =
frequency value (0..65535)
d =
duration (0..32767
dir =
step direction (0(up) ,1 (down) or 2(oscillate))
default=0
m =
minimum frequency (if sweep is used)
(0..65535) default=0
s =
step value for sweep (0..65535) default=0
w =
waveform (0=triangie,1 =sawtooth,2=pulse,
3=noise) default=2
P =
pulse width (0..4095) default=2048
The SOUND command is a fast and easy way to create sound
effects and musical tones. The three required parameters v, f and
d select the voice, frequency and duration of the sound. The
duration is in units called jiffies. Sixty jiffies equals 1 second.
The SOUND command can sweep through a series of
frequencies which allows sound effects to pass through a range
of notes. Specify the direction of the sweep with the DIR
parameter. Set the minimum frequency of the sweep with M and
the step value of the sweep with S. Select the appropriate
waveform with W and specify P as the width of the variable pulse
waveform if selected in W.
EXAMPLES:
SOUND 1,40960,60
Play a SOUND at frequency 40960 in voice 1 for 1 second.
SOUND 2,2000,5,0,2000,100
Output a sound by sweeping through frequencies starting at 2000
and incrementing upward in units of 100.
SOUND 3,5000,1,2,3000,500,1
17-73