expand

Reference > delay

Wave
Spectrum

    

delay(m) creates a delay filter. Currently this is only defined for positive integer m.

Filter equation
output[i] = input[i - m]

In synthesine, filters are functions with methods for applying and setting the filter, and an internal memory that keeps track of the state of the filter. The technical term for the kind of object is a closure. Every time you create a filter, the state is erased, so it’s a good idea to define your filters only once, in the setup function.

You can find the code for delay in the synthesine library.