Specifications

7.4 Effects 83
write
list append
t l
list prepend
textfile
clear
timer
pack f f
t f b b
start-record
t b b b
t b b
del
list append
unpack f f
list split 2
f
t b b
s synth
r synth
pd synth
s synth
textfile
load-playback
write ./sq.txt cr
read ./sq.txt
rewind
t b b b
notein
stripnote
list prepend set
fig 7.25: A MIDI sequencer that uses textfiles to store data
restart from zero . This time value, along with the current MIDI note number ,
is packed by
pack
into a pair and appended to the lis t accumulator. When you
are done playing, hit the write button to flush the list into
textfile
and write it
to a file called sq.txt in the cur rent working directory. Moving to the load and
replay side of things, banging the load-replay button r eads in the textfile and
issues a rewind messag e setting
textfile
to the start of the sequence. It then
receives a bang which squirts the whole list into a list sequencer like the one we
just looked at.
SECTION 7.4
Effects
For the last part of this chapter I am going to introduce simple effects.
Chorus and reverb are used to add depth and space to a sound. They are
particularly useful in music making, but also have utility in game sound effects
to thicken up weaker sources. Always use them sparingly a nd be aware that
it is probably better to make use of effects available in your external mixer, as
plugins, or as part of the game audio engine.
Stereo chorus/flanger effect
The effect of chorus is to produce a multitude o f sources by doubling up many
copies of the s ame sound. To do this we use a several delays and position them
slightly apart. The aim is to deliberately cause beating and swirling as the
copies move in and out of phase with o ne another. In Fig. 7.26 an input signal
at the first inlet is split three ways. An attenuated copy is fed directly to the
right stereo outlet while two other copies are fed to separate delay lines. In the
centre you see two variable delay taps,
vd~
, which are s ummed.