AMSTRAD cpc 6128 User Instruction page 411

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

Advertisement

If 64 (2
t
6) is added to the channel number, then this indicates that the note should
be held. In effect, this means that the note will not play until the command
R E LEA S E is used.
And finally, if 128 (2
t
7) is added to the number, then the queue of the channel
specified will be cleared (or flushed). Therefore, if you start a sound that is going to
continue for too long on a particular channel, then a quick way to stop it is to flush the
channel:
SOUND 1,248,30000
SOUND 1+128,0
(this would play for 5 minutes)
(this will stop it short)
In direct command mode, a quicker way of stopping any long sounds is to press the
[DEL] key at the start of a line; the short warning beep flushes all sound channels.
Now that we can hopefully send a sound to any of the three channels that we choose,
(with rendezvous if necessary), it would be nice to be able to produce a little more than
the rather unmelodious 'beep' that the simple SOU N D command produces. The way
to do this is to play the sound with an envelope - a pattern that defines how the note
gets louder and quieter during the short time it is playing. A note produced by an
instrument has an initial attack, where the volume rises very sharply. The volume of
the note then falls away to a lower level which is sustained for a time, after which it
fades away to zero. It is possible to give an envelope of this nature to the notes
produced by the SOU N D command. The associated EN V command is used to do this.
First let's look at a simple example:
ENV 1,5,3,4,5,-3,8
SOUND 1,142,0,0,1
The EN V must come before the SOU N D command for which it is used. To use this
envelope in a SOU N D command, its number is included as the fifth part of the SOU N D
command - in this case, the envelope is number 1. The first number in an EN V
command is the number of the envelope that it defines. The EN V instruction contains
information about how long the note will last and how loud it will get, so the duration
and volume parts of the SOU N D command are set to zero. The envelope defined above
causes the sound to be increased in 5 steps, each step ihcreasing the volume by 3, and
each step being 4 hundredths of a second long. The volume is then to be reduced in 5
steps, each step decreasing the volume by - 3, each step being 8 hundredths of a
second long. In other words, the first number identifies which envelope is being
defined, and this is then followed by two groups of three numbers, and in each of these
groups, the first number indicates by how many steps the volume is to go up or down.
The second number indicates by how much the volume is to go up or down at each of
these steps, and the third number determines by how long each step of volume is to be
held for.
Chapter 9 Page 38
At your leisure ....

Advertisement

Table of Contents
loading

Table of Contents

Save PDF