an open-source digital signal processing and sound synthesis language
about · links · contact

allpass/comb/combset

short feedback delay lines

    [note: comb and combset are older comb filter unit-generators. They have been generally superceded by the Ocomb and Ocombi objects.]

Synopsis

    #include <ugens.h>

    float comb(sample,array)
    float sample, *array;

    float allpass(sample,array)
    float sample, *array;

    float combset(loopt,reverbtime,init,array)
    float loopt,reverbtime,*array;

Description

This is a feedback loop which will store and feedback the signal continuously. Older inputs will decay over a specified reverberation time. Any frequencies in the input signal whose length in samples is close to an integral multiple of the number of samples in the loop will be resonated since there will be less cancellation. This loop must first be initialized with a call to combset(). which intializes an array for use with a comb() or an allpass() filter.

Loopt is 1/hz, which is set to the 'fundamental' of the comb. The number of samples in the loop is loopt * samplingrate.

Reverbtime is the length of time old samples take to decay 60 db.

init is a flag which, if FALSE, forces the loop to be filled with zeroes. Setting init to TRUE will cause the contents of the array loop to be unaltered. Note that this will contain garbage unless it has been previously used by another filter.

Array is the address of a floating point array which must be dimensioned to 2+number_of_samples_in_loop, which is found by loopt*sampling_rate.

allpass() is initialized in the same way as the comb filter but has a feature which cancels the frequency response of the filter and theoretically passes all frequencies at equal amplitude.

    [note: Because of the integer length of the delay-line used, comb will not accurately reproduce higher frequencies (the short delay-length will 'quantize' the frequency resolution). For an accurate high-frequency comb, use the hcomb comb filter.]