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

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



Hey James,

Well here is another place where recording a pattern is cutting off the first note of the sequence.  I'm recording to a sound file rather than a buffer.  I've tried a bunch of things but can't get record to start after the pattern starts.  Any ideas?

(
f = Routine {
var tempos, soundFileDuration=600, subdiv = 3/2, subdivstr;
tempos = [40];
subdivstr = subdiv.asFraction[0].asString ++ "in" ++ subdiv.asFraction[1].asString ++ "_";
0.1.wait;
tempos.do { |tempo, i|
r = Record(s).start("sounds/metronome/" ++ tempo.asString ++ "bpm_" ++ subdivstr ++ ".aiff");
0.1.wait;
p = Ppar([
Pmono(\click5, \trig1, 1, \rel, 0.2, \freq, 200, \outbus, 0, \dur, 1, \tempo, tempo / 60),
Pmono(\click5, \trig1, 1, \rel, 0.2, \freq, 1200, \outbus, 1, \dur, 1/subdiv,  \tempo, tempo / 60)
]).play;
(soundFileDuration + 0.2).wait;
p.stop;
0.1.wait;
r.stop;
1.wait;
};
}.play;
)

Thanks

Bruce



On Dec 1, 2008, at 10:21 PM, James Harkins wrote:


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


Best Regards,


Bruce Arnold
201 East 12th Street #102
New York, New York  10003
212-473-1264 phone
212-473-4601 fax