comb
Prev | Orchestra Opcodes and Operators | Next

## comb

comb — Reverberates an input signal with a “colored” frequency response.

## Description

Reverberates an input signal with a “colored” frequency response.

## Syntax

    ares comb asig, krvt, ilpt [, iskip] [, insmps]

## Initialization

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 n*sr floating or double numbers (usually 4 or 8 bytes). Delay space is allocated and returned as in delay.

iskip (optional, default=0) -- initial disposition of delay-loop data space (cf. reson). The default value is 0.

insmps (optional, default=0) -- delay amount, as a number of samples.

## Performance

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).

This filter reiterates 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.

## Examples

Here is an example of the comb opcode. It uses the file comb.csd.

Example 127. Example of the comb opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

    <CsoundSynthesizer>
    <CsOptions>
    ; Select audio/midi flags here according to platform
    -odac     ;;;RT audio out
    ;-iadc    ;;;uncomment -iadc if RT audio input is needed too
    ; For Non-realtime ouput leave only the line below:
    ; -o comb.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

    sr = 44100
    ksmps = 32
    nchnls = 2
    0dbfs = 1

    gamix init 0

    instr 1

    kcps    expon p5, p3, p4
    asig	vco2  0.3, kcps
    	outs  asig, asig

    gamix = gamix + asig

    endin

    instr 99

    krvt =  3.5
    ilpt =  0.1
    aleft	comb gamix, krvt, ilpt
    aright	comb gamix, krvt, ilpt*.2
    	outs   aleft, aright

    clear gamix	; clear mixer

    endin

    </CsInstruments>
    <CsScore>

    i 1 0 3 20 2000
    i 1 5 .01 440 440

    i 99 0 8
    e

    </CsScore>
    </CsoundSynthesizer>

## See Also

alpass, reverb, valpass, vcomb

## Credits

Barry L. Vercoe

Prev | Up | Next
cngoto | Home | combinv