The Sound Of Music - AMSTRAD cpc 6128 User Instruction

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

Advertisement

The sound of music ....
Of all the 6128's features, the sound and envelope commands will probably seem to be
the most daunting at first sight - this needn't be the case. With a little practice you
should be able to make a whole range of different noises and even make the machine
play a complete tune with harmonies.
Let's start by having a look at the first 4 parts of a SOU N D command. These are:
channel number, tone period, duration of note, and volume. You may be wondering
what range each number has to be in.
We'll leave the first part (channel number) for a moment because it is quite
complicated. The second part (tone period) can take any whole number value from 0
to 4095, but only some of these will actually produce recognisable notes from the
musical scale - these are listed in part 5 of the chapter entitled 'For your reference .... '.
For instance the number 239 will play middle C, and 253 will play the note B below
middle C, the values 240 to 252 will play a tone, but not one that corresponds to the
piano scale. If the tone period is zero then no tone will be played - this will be useful
when using 'noise' (explained later).
The third part of the SOU N D command gives the duration of the note in units of a
hundredth of a second. The value can generally be anywhere in the range 1 to 32767.
However, if the value is zero, then the length of the note will be determined by the
'envelope' used (more ofthis later ).lfthe value is negative then it indicates how many
times the envelope should be played, so -3 would mean 'repeat the volume envelope
three times' (again, this will be explained later).
The fourth part of the command is the volume. This can be from 0 to 15 (but if it is
omitted, 12 is assumed). With the simple sounds that have been made so far, the
volume remained constant for the whole time that the note played. When a 'volume
envelope' is used to vary it, then the volume part ofthe SOU N D command is taken as
the starting value of the note.
Now for the channel number part of the command. You might as well know now that
this is a 'bit significant' number - so you'll need to know a little about binary numbers
to fully understand it (see part 1 of this chapter).
A sound can be played on one of three possible channels, ifthe computer is connected
to a stereo amplifier, then one channel will be on the left, another on the right and the
third on both (in the middle). To choose which channel(s) that a note should be played
on, the following numbers are used:
1 channel A
2channelB
4channelC
At your leisure ....
Chapter 9 Page 35

Advertisement

Table of Contents
loading

Table of Contents