You don’t absolutely have to specify any of the control
characters, but you should to maximize the power from your
synthesizer. The Commodore 128 automatically sets the
synthesizer controls to the default settings in Figure 7-6. If you
don’t assign special control characters, the SID chip can PLAY
only one envelope, one voice and one octave without any
FILTERing. Specify the control characters to exercise the most
control over the notes within your PLAY string.
If you specify an ENVELOPE statement and select your own
settings instead of using the default parameters from Figure 7-5,
the envelope control character number in your PLAY string must
match the envelope number in your ENVELOPE statement in
order to assume the parameters you assigned. You don’t have to
specify the ENVELOPE statement at all if you just want to PLAY
the default settings from Figure 7-6. ln this case, simply select an
envelope number with the (T) control character in the PLAY
statement.
Here’s an example of the PLAY statement using the SID chip
control characters within a string. Add this line to your program
and notice the difference between this statement and the PLAY
statement in line 40.
50 PLAY”M V2 05 T7 U5 XO C D E F G A B”
This statement PLAYS the same notes as in line 40, but voice 2 is
selected, the notes are played one octave higher (5) than line 40,
the volume setting is turned down to 5 and the FILTER is
specified as off. For now, leave the filter off. When you learn
about FILTERing in the next section, you can come back and turn
the filter on to see how it affects the notes being played. Notice
line 50 selects a new instrument, the organ envelope, with the T7
control character. Now your program PLAYS two different
instruments in two of the independent voices. Add this statement
to PLAY the third voice:
60 PLAY “M V3 06 U7 T6 XO C D E F G A B”
Here’s how line 60 controls the synthesizer. The V3 selects the
third voice, 06 places voice 3 one octave higher (6) than voice
two, T6 selects the harpsichord envelope, U7 sets the volume to
7 and XO leaves the filter off for all three voices. Now your
program PLAYS all three voices, each one octave higher than the
other, in three separate instruments, piano, organ and harpsichord.
7-18