Now we build a delay. The method will be called ADelay() and
will return an AObject that not only
plays itself, but plays itself a couple of times. It starts as usual, but
after a certain amount of samples it will sound again like an echo. Our delay
will be able to play itself several times, each echo sounding darker and
darker. To reach this effect we have to amplify the delays and filter them.
AAvg (average) can be used as a
lowpass filter. The original sound will not be filtered, but all echos will
be filtered, depending on their appearance. The last echo is filtered most.
We will generate this filtered sounds and mix them, but befor mixing them, we
have to move them in time. The original sound is not moved, but each echo is
moved backwards a little bit. This movement can be done with
AMove. To mix all echos we will create
an method AMix() that addes two objects with certain amplitudes.
At last we take our FM sound and use it for our delay.
|  |