AMSTRAD cpc 6128 User Instruction page 409

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

To play on more than one channel, add up the numbers for the desired channels. For
example to play on A and C use 1 +4 = 5.
SOUND 5,284
You may be wondering why channel C is given the number 4 and not 3 as you might
expect. This is because each of these numbers is a power of two (1=2
t
0, 2=2
t
1,
4=2
t
2) so that they combine to form a binary number. If you think about a three
digit binary number, then each ofthe three digits can be either 0 or 1, and this is used
in the channel number to indicate whether the corresponding channel should be on or
off. From the above example:
5 in decimal is equivalent to
1 * 4 + 0 *
2
+ 1 * 1
or 101 in binary. It follows then, that
if each column ofthis binary number is labelled C, B, and A, this gives:
C B A
1
0 1
In other words, channel C is ON, B is OFF, and A is ON. If the note was to be played on
channels A and B, then this would become:
C B A
o
1 1
And the binary number 011 is the same as
0*4 + 1 *
2
+ 1 * 1
=
3. So the
S OUN
D
command would be:
SOUND 3,142
This is, of course, the same value that would be found if you just added up the
numbers for the channels to play on (remember A= 1, B=2, C=4). So to play on A and
B, the channel number is given by 1 +2 = 3.
If you didn't understand that - don't worry. As long as you can see that a combination
of channels can be chosen by adding up the numbers for each of the channels to be
used, then that's all you really need to know.
Unfortunately, there are yet more values that can be used in the channel number.
The numbers 8, 16 and 32 are used to specify that the sound should 'rendezvous' with
another channel (A, B, C respectively). You're probably wondering what is meant by
the term
rendezvous.
Well, up to now the sounds that we have produced have gone
straight to the specified channels. Try this:
SOUND 1,142,2000
SOUND 1,90,200
Chapter 9 Page 36
At your leisure ....

Advertisement

Table of Contents
loading

Table of Contents