VIC-20 C64 C16 Plus/4 C128 X16 M65
Selects various properties like waveform, tone, filters, etc. of a voice. The command is also used for turning a voice on or off. The command implements a uniform interface to the VIC, TED, SID and VERA chips, however differences between the sound capabilities of these chips must be considered as explained in more details below.
VOICE <voice_no> <subcmd> [<subcmd> ...]
Where <voice_no> is a number identifying the voice register. This must be a literal number on almost all platform, except the X16 where a numeric expression is also accepted.
VOICE 1
or VOICE 2
are availableThe command is then is followed by at least one of the following:
ON
or OFF
VIC-20 C64 C16 Plus/4 C128 X16 M65LEFT
or RIGHT
X16TONE <tone_value>
VIC-20 C64 C16 Plus/4 C128 X16 M65ADSR <attack>, <decay>, <sustain>, <release>
C64 C128 M65WAVE SAW|TRI|PULSE|NOISE
VIC-20 C64 C16 Plus/4 C128 X16 M65PULSE <freq>
C64 C128 X16 M65FILTER ON|OFF
C64 C128 M65VOLUME
X16' Clear all registers SOUND CLEAR VOLUME 15 ' Set up voice 1 for a high-pitch sawtooth wave but do not turn it on yet VOICE 1 WAVE SAW TONE 2500 ADSR 0, 7, 12, 1 ' Turn it on VOICE 1 ON ' Set up voice 2 properties and turn it on immediately VOICE 2 WAVE PULSE PULSE 450 TONE 400 ADSR 9, 7, 10, 4 ON ' Change its tone while the voice is still on VOICE 2 TONE 2300
Turns the voice on or off. Supported on all platforms.
VOICE <voice_no> ON VOICE <voice_no> OFF
On X16, ON
turns on the voice in both left and right channels.
X16 Turns the voice on or off on the left or right channel only.
VOICE <voice_no> LEFT VOICE <voice_no> RIGHT
Sets the tone (frequency) for a voice. Supported on all platforms.
VOICE <voice_no> TONE <tone_number>
The <tone_number> means a different value on each platform.
Sets the wave form for a particular voice.
VOICE <voice_no> WAVE SAW ' sawtooth VOICE <voice_no> WAVE TRI ' triangle VOICE <voice_no> WAVE PULSE ' pulse VOICE <voice_no> WAVE NOISE ' noise
PULSE
and voice 2 can take PULSE
or NOISE
PULSE
and voice 4 is always NOISE
Sets the pulse frequency for a particular voice. Only works if the waveform of that voice is set to PULSE
. Supported on C64 C128 M65 only.
VOICE <voice_no> WAVE PULSE PULSE <freq>
Frequency must be a value between 0 AND 4096.
Sets the envelope for a particular voice. Supported on C64 C128 M65 only.
VOICE <voice_no> ADSR <attack>, <decay>, <sustain>, <release>
All four values are expressions that must evaluate to a number between 0 and 15.
Applies or removes filter for the particular voice. The filter properties must be set using the FILTER command. Supported on C64 C128 M65 only.
VOICE <voice_no> FILTER ON VOICE <voice_no> FILTER OFF
Controls the volume of the sound with a logarithmic curve; 0 is silent, 63 is the loudest. Supported on X16 only.
VOICE <voice_no> VOLUME 0 ' Voice is silent VOICE <voice_no> VOLUME 63 ' Voice is loudest