Toot 9: Global Stereo Reverb

In the previous example you may have noticed the soundin source being
"cut off" at ends of notes, because the reverb was inside
the instrument itself. It is better to create a companion instrument,
a global reverb instrument, to which the source signal can be sent. Let's
also make this stereo.

Variables are named cells which store numbers. In Csound, they can be
either local or global, are available continuously, and can
be updated at one of four rates - setup, i-rate, k-rate,
or a-rate.

Local Variables
(which begin with the letters p, i, k, or a)
are private to a particular instrument. They cannot be read from, or written
to, by any other instrument.

Global Variables
are cells which are accessible by all instruments. Three of the same four
variable types are supported (i, k, and a), but these
letters are preceded by the letter g to identify them as "global."
Global variables are used for "broadcasting" general values,
for communicating between instruments, and for sending sound from one instrument
to another.

The reverb instr99 below receives input from instr9 via the global a-rate
variable garvbsig. Since instr9 adds into this global, several copies
of instr9 can do this without losing any data. The addition requires garvbsig
to be cleared before each k-rate pass through any active instruments. This
is accomplished first with an init
statement in the orchestra header, giving the reverb instrument a higher
number than any other (instruments are performed in numerical order), and
then clearing garvbsig within instr99 once its data has been placed
into the reverb.