[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] USing the same buffer for multiple pv's



On Thursday, December 12, 2002, at 12:17 PM, Casey Basichis wrote:

Is it possible to use the same buffer for multiple
pv's if they are in series, or do i need different
buffers for each synth?

You are not supposed to specify a buffer for the PV ugens. Only the FFT is supposed to have the buffer specified. The PV ugens pass a trigger among themselves that contains the buffer only on the sample when they are to do their calculation. That is what the variable 'chain' is below. Passing the chain variable does three things: enforces the execution order, specifies the buffer to operate on, triggers the operation at the right time.

The FFT generates the 'chain' signal and it is passed along from each ugen to the next in the order you want the operations done.

(
x = SynthDef("randcomb", { arg bufnum=0;
	var in, chain;
	in = {WhiteNoise.ar(0.8)}.dup;
	chain = FFT(bufnum, in);
	chain = PV_RandComb(chain, 0.95, Impulse.kr(0.4));
	Out.ar(0, IFFT(chain));
}).writeDefFile;
s.sendMsg("/d_load", "synthdefs/randcomb.scsyndef");
)


--
--- james mccartney   james@xxxxxxxxxxxxxx   <http://www.audiosynth.com>
SuperCollider - a real time synthesis programming language for the PowerMac.
<ftp://www.audiosynth.com/pub/updates/SC2.2.16.sea.hqx>