Toot 8: Soundin

Now instead of continuing to enhance the same instrument, let us design
a totally different one. We'll read a soundfile into the orchestra, apply
an amplitude envelope to it, and add some reverb. To do this we will employ
Csound's soundin and reverb
generators. The first is described as:

a1 soundin ifilcod[, iskiptime][, iformat]

soundin derives its signal from a pre-existing file. ifilcod
is either the filename in double quotes, or an integer suffix (.n) to the
name "soundin". Thus the file "soundin.5" could be
referenced either by the quoted name or by the integer 5. To read from
500ms into this file we might say:

a1 soundin "soundin.5", .5

The Csound reverb generator is actually composed of four parallel
comb filters plus two allpass
filters in series. Although we could design a variant of our own using
these same primitives, the preset reverb is convenient, and simulates a
natural room response via internal parameter values. Only two arguments
are requiredÑthe input (asig) and the reverb time (krvt)

ar reverb asig, krvt

The soundfile instrument with artificial envelope and a reverb (included
directly) is as follows: