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

Re: [sc-users] recording a Pbind into a Buffer




On Dec 1, 2008, at 7:27 AM, Dan Stowell wrote:
Hi -

I have a Pbind which generates 8 seconds of sound. I'd like to play it
and record it into an 8-second-long Buffer at the same time, but I'm
not sure about the neatest way to do this without losing some of the
beginning/end. How would you do it?

Actually I think this would be really clean to do with Pproto, but currently it doesn't have support for making nodes or groups in the initialization function.

Ron, is there a reason why synth/group support is not there? There is a group event type, but it's commented out.

Actually, come to think of it, why not Pfx? This way it will automatically stop the recorder when the pattern exits.

SynthDef(\bufrec, { |bufnum, gate = 1, bus|
var sig = In.ar(bus, 1);
FreeSelf.kr(1 - gate);
RecordBuf.ar(sig, bufnum);
}).memStore;

b = Buffer.alloc(s, 8 * s.sampleRate, 1);

p = Pfx(Pbind(\degree, Pseries(0, 1, 8), \dur, 0.25), \bufrec, \bufnum, b, \bus, 0).play;

hjh


: H. James Harkins
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman