Commodore 128 System Manual page 315

Table of Contents

Advertisement

SOUND
Outputs sound effects and musical notes
SOUND v,f,d[,dir] [,m] [,»] [,w] [,p]
V =
f =
d =
dir =
m =
s =
w =
P =
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
voice (1 ..3)
frequency value (0..65535)
duration (0..32767
step direction (0(up) ,1 (down) or 2(oscillate))
default=0
minimum frequency (if sweep is used)
(0..65535) default=0
step value for sweep (0..65535) default=0
waveform (0=triangie,1 =sawtooth,2=pulse,
3=noise) default=2
pulse width (0..4095) default=2048
17-73

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

128d

Table of Contents