EXA M P LE S:
PLAY " V1O4T0U5X0CDEFGAB"
PLAY " V 305T6U 7X 1#B $A W .CH D Q EIF"
SO UND
Create sound effects and musical notes
SOUND v,f,d[,dir][,m ][,s][,w ][,p]
where:
v
voice (1-3)
f
frequency
d
duration (0-32767)
dir step direction (0(up), l(down) or 2(oscillate)) default = 0
m minimum frequency (if sweep is used) (0-65535) default = 0
s
step value
for sweep (0-32767) default = 0
w
waveform
(0 = triangle, 1 = sawtooth, 2 = variable, 3 =
p
pulse width (0-4095) default = 2048
The SOUND
command is a fast and easy way to create sound effects
musical tones. The
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.
EXA M PLES:
SOUND 1,40960,60
SOUND 2,20000,50,0,2000,100
SO UND AN D MUSIC ON THE COMMODORE 128
value (0-65535)
three required parameters v ,f and d select
Play a SOUND at frequency 40960 in voice 1
for 1 second.
Output a sound by sweeping through frequen
cies starting at 2000 and incrementing upward
in units of 100. Each frequency is played for
50 jiffies.
Play the notes C ,D ,E ,F,G ,A and
B in voice 1, octave 4, tune enve
lope 0 (piano), at volume 5, with
the filter off.
Play the notes B-sharp, A-flat,
a whole dotted-C note, a half
D-note, a quarter E-note and an
eighth F-note.
the voice, frequency
339
noise) default = 2
and
Need help?
Do you have a question about the 128 and is the answer not in the manual?