DelayN, DelayL, DelayA DelayA.ar(in, maxdelaytime, delaytime, mul, add) Simple delay line. DelayN uses no interpolation, DelayL uses linear interpolation, DelayA uses all pass interpolation. in - the input signal. maxdelaytime - the maximum delay time in seconds. used to initialize the delay buffer size. delaytime - delay time in seconds. {Impulse.ar(100)}.scope; ( {Decay.ar(Impulse.ar(MouseY.kr(1, 10)), 1, MouseX.kr(0, 1))}.scope; .) {Decay.ar(Dust.ar(1,0.5), 0.3, WhiteNoise.ar)}.play; ( // Dust randomly triggers Decay to create an exponential // decay envelope for the WhiteNoise input source { z = Decay.ar(Dust.ar(1,0.5), 0.3, WhiteNoise.ar); DelayN.ar(z, 0.2, 0.2, 1, z); // input is mixed with delay via the add input }.play) CombN, CombL, CombA CombA.ar(in, maxdelaytime, delaytime, decaytime, mul, add) Comb delay line. CombN uses no interpolation, CombL uses linear interpolation, CombA uses all pass interpolation. in - the input signal. maxdelaytime - the maximum delay time in seconds. used to initialize the delay buffer size. delaytime - delay time in seconds. decaytime - time for the echoes to decay by 60 decibels. If this time is negative then the feedback coefficient will be negative, thus emphasizing only odd harmonics at an octave lower. // Comb used as a resonator. The resonant fundamental is equal to // reciprocal of the delay time. { CombN.ar(WhiteNoise.ar(0.01), 0.01, XLine.kr(0.0001, 0.01, 20), 0.2) }.play; { CombL.ar(WhiteNoise.ar(0.01), 0.01, XLine.kr(0.0001, 0.01, 20), 0.2) }.play; { CombA.ar(WhiteNoise.ar(0.01), 0.01, XLine.kr(0.0001, 0.01, 20), 0.2) }.play; // with negative feedback: { CombN.ar(WhiteNoise.ar(0.01), 0.01, XLine.kr(0.0001, 0.01, 20), -0.2) }.play; { CombL.ar(WhiteNoise.ar(0.01), 0.01, XLine.kr(0.0001, 0.01, 20), -0.2) }.play; { CombA.ar(WhiteNoise.ar(0.01), 0.01, XLine.kr(0.0001, 0.01, 20), -0.2) }.play; // used as an echo. { CombN.ar(Decay.ar(Dust.ar(1,0.5), 0.2, WhiteNoise.ar), 0.2, 0.2, 3) }.play; { CombN.ar(Impulse.ar(300), 0.0002, 0.0002, 0.01) }.plot; // See FFT of comb filter ( { var src, fftsize, cosineTable, fft, window; fftsize = 8192; window = Signal.hanningWindow(fftsize); // make a signal analysis window cosineTable = Signal.fftCosTable(fftsize); // make cosine table required for FFT src = CombN.ar(WhiteNoise.ar(0.1), 0.01, MouseX.kr (0.0, 0.0005)); fft = FFT.ar(fftsize, 0, cosineTable, nil, nil, src, 0.0); Scope.window("FFT", fftsize, nil, fft.magnitudeApx / 20); src }.play; GUIWindow.closeAll; ) AllpassN, AllpassL, AllpassA AllpassA.ar(in, maxdelaytime, delaytime, decaytime, mul, add) All pass delay line. AllpassN uses no interpolation, AllpassL uses linear interpolation, AllpassA uses all pass interpolation. in - the input signal. maxdelaytime - the maximum delay time in seconds. used to initialize the delay buffer size. delaytime - delay time in seconds. decaytime - time for the echoes to decay by 60 decibels. If this time is negative then the feedback coefficient will be negative, thus emphasizing only odd harmonics at an octave lower. // Since the allpass delay has no audible effect as a resonator on // steady state sound ... { AllpassA.ar(WhiteNoise.ar(0.1), 0.01, XLine.kr(0.0001, 0.01, 20), 0.2) }.play; // ...these examples add the input to the effected sound so that you can hear the // effect of the phase comb : ( { z = WhiteNoise.ar(0.1); z + AllpassN.ar(z, 0.01, XLine.kr(0.0001, 0.01, 20), 0.2)}.play) ( { z = WhiteNoise.ar(0.1); z + AllpassL.ar(z, 0.01, XLine.kr(0.0001, 0.01, 20), 0.2) }.play) ( { z = WhiteNoise.ar(0.1); z + AllpassA.ar(z, 0.01, XLine.kr(0.0001, 0.01, 20), 0.2) }.play) // used as an echo - doesn't really sound different than Comb, // but it outputs the input signal immediately (inverted) and the echoes // are lower in amplitude. { AllpassN.ar(Decay.ar(Dust.ar(1,0.5), 0.2, WhiteNoise.ar), 0.2, 0.2, 3) }.play; { AllpassN.ar(Impulse.ar(300), 0.0002, 0.0002, 0.01) }.plot; MultiTap MultiTap.ar(timesArray, levelsArray, in, mul, add) Multi tap delay line. timesArray - a Ref to an Array of delay times in seconds. levelsArray - a Ref to an Array of amplitudes. in - the input signal. ( { MultiTap.ar(`[0.1, 0.2, 0.3, 0.4], `[0.1, 0.2, 0.4, 0.8], Decay.ar(Dust.ar(2), 0.1, PinkNoise.ar)) }.play) DelayWr, TapN, TapL, TapA DelayWr.ar(buffer, in) TapN.ar(buffer, delayTime, mul, add) These unit generators implement delay line reading and writing in separate objects. This lets you put processing in the feedback loop, or granulate a delay line, or implement a ping pong delay or other feedback network. The Tap unit generators read from the delay line and DelayWr writes to it. You must supply an instance of Signal long enough to hold the maximum delay time you will require. You do not need to initialize the buffer. The maximum delay time is the length of the buffer minus the block size. The minimum delay time is equal to the block size + 1. A single delay line may have any number of Taps but only one DelayWr. The same buffer should be supplied to the DelayWr and all Tap unit generators which are part of the same delay line. TapN uses no interpolation, TapL uses linear interpolation, TapA uses all pass interpolation. The output of DelayWr is just its input. The output of DelayWr is usually not needed, but it must be in the call graph of the Synth. In order to acheive this you will usually use the