ar comb asig, krvt, ilpt[, iskip][, insmps] ar alpass asig, krvt, ilpt[, iskip][, insmps] ar reverb asig, krvt[, iskip]
An input signal is reverberated for krvt seconds with "colored" (comb), flat (alpass), or "natural room" (reverb) frequency response.
ilpt – loop time in seconds, which determines the "echo density" of the reverberation. This in turn characterizes the "color" of the comb filter whose frequency response curve will contain ilpt * sr/2 peaks spaced evenly between 0 and sr/2 (the Nyquist frequency). Loop time can be as large as available memory will permit. The space required for an n second loop is 4n*sr bytes. comb and alpass delay space is allocated and returned as in delay.
iskip (optional) – initial disposition of delay-loop data space ( cf. reson). The default value is 0.
insmps (optional) – if non-zero, loop time is in samples instead of seconds. Default is zero. New in Csound Version 4.16.
These filters reiterate input with an echo density determined by loop time ilpt. The attenuation rate is independent and is determined by krvt, the reverberation time (defined as the time in seconds for a signal to decay to 1/1000, or 60dB down from its original amplitude). Output from a comb filter will appear only after ilpt seconds; alpass output will begin to appear immediately.
A standard reverb unit is composed of four comb filters in parallel followed by two alpass units in series. Loop times are set for optimal "natural room response." Core storage requirements for this unit are proportional only to the sampling rate, each unit requiring approximately 3K words for every 10KC. The comb, alpass, delay, tone and other Csound units provide the means for experimenting with alternate reverberator designs
Since output from the standard reverb will begin to appear only after 1/20 second or so of delay, and often with less than three-fourths of the original power, it is normal to output both the source and the reverberated signal. If krvt is inadvertently set to a non-positive number, krvt will be reset automatically to 0.01. (New in Csound version 4.07.) Also, since the reverberated sound will persist long after the cessation of source events, it is normal to put reverb in a separate instrument to which sound is passed via a global variable, and to leave that instrument running throughout the performance.
ga1 init 0 ; init an audio receiver/mixer instr 1 ; instr (there may be many copies) a1 oscili 8000, cpspch(p5), 1 ; generate a source signal out a1 ; output the direct sound ga1 = ga1 + a1 ; and add to audio receiver endin instr 99 ; (highest instr number executed last) a3 reverb ga1, 1.5 ; reverberate whatever is in ga1 out a3 ; and output the result ga1 = 0 ; empty the receiver for the next pass endin