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


initialize and use delay lines

    [note: These older delay functions have been replaced by the Odelay/Odelayi objects.]


    #include <ugens.h>

    float *array,maxlength;
    int *delvals;

    float delget(array,wait,delvals)
    float *array,wait;
    int *delvals;

    float *array,signal;
    int *delvals;

    float dliget(array,wait,delvals)
    float *array,wait;
    int *delvals;


These units are used to store and fetch samples from a delay line. delset() is the initialization unit for delget(), delput(), and dliget(). array is an array of floats which must be at least maxlength words long, where this number is the maximum size you expect to use (sampling rate * maximum delay in seconds). delvals is an array of two integers used for bookkeeping purposes. delput() stores signal in array, and delget() fetches a sample from the pipeline where wai is the age of the sample in seconds. E.g. if wait is equal to .5 at a sampling rate of 30000, delget() will look back 15000 samples. array must be dimensioned appropriately. Naturally, delput() must be called before delget(), dliget() is identical with delget() except that it will interpolate linearly between samples according to the fractional part of wait.