2 //your buffer should be the same numChannels as your inputs
3 *ar { arg bufnum=0, inputs, delayTime, feedback=0.7, rotate=1;
5 var trig, delayedSignals;
7 trig = Impulse.kr(delayTime.reciprocal);
10 PlayBuf.ar(inputs.numChannels,bufnum,1.0,trig,
15 RecordBuf.ar(delayedSignals,bufnum,0.0,1.0,0.0,1.0,0.0,trig);
24 *ar { arg bank, index, inputs, delayTime, feedback=0.7, rotate=1, interpolationType=2;
26 var indices, delayedSignals, outputs;
28 delayedSignals = PlayBuf.ar(bank, index, -1, delayTime, interpolationType).postln;
30 outputs = delayedSignals.rotate(rotate) * feedback + inputs;
32 RecordBuf.ar(bank, index, outputs, run: -1); // feedback to buffers
44 these are still set up for sc3d5 style PlayBuf.
45 won't work on scsynth yet
51 *ar { arg bank, firstIndex, function, inputs, delayTime, interpolationType=2;
52 var indices, delayedSignals, outputs;
53 //[bank, firstIndex, function, inputs, delayTime, interpolationType].postln;
54 if (delayTime.isArray, {
55 // need separate buffers.
57 inputs = inputs.asArray;
58 indices = Array.series(inputs.size, firstIndex, 1);
60 // tap the delay lines
61 delayedSignals = PlayBuf.ar(bank, indices, -1, delayTime, interpolationType).postln;
63 outputs = function.value(inputs, delayedSignals);
65 // mix the delayed signal with the input
67 RecordBuf.arN(bank, indices, outputs, run: -1); // feedback to buffers
69 // tap the delay lines
70 delayedSignals = PlayBuf.ar(bank, firstIndex, -1, delayTime, interpolationType).postln;
72 outputs = function.value(inputs, delayedSignals);
74 // mix the delayed signal with the input
76 RecordBuf.ar(bank, firstIndex, outputs, run: -1); // feedback to buffers
79 ^outputs // output the mixed signal and force the DelayWr into the call graph