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

Re: [sc-users] real time input granulator



Thank you Batuhan and Scott!!!

Cool, it's work!! So here is the code from examples....


(
// allocate a Buffer
s = Server.local;
b = Buffer.alloc(s, 44100 * 1.0, 1); // a one second 1 channel Buffer
)

// from TGrains example
(
{
var bufnum = 0, trate, dur, clk, pos, pan, in;
trate = MouseY.kr(8,120,1);
dur = 12 / trate;
clk = Impulse.kr(trate);
pos = MouseX.kr(0,BufDur.kr(bufnum)) + TRand.kr(0, 0.01, clk);
pan = WhiteNoise.kr(0.6);
in = SoundIn.ar(0);
RecordBuf.ar(in, bufnum, loop: 1);
//RecordBuf.ar(in, bufnum, loop: 0);
TGrains.ar(2, clk, b, 1, pos, dur, pan, 0.1);
}.play;
)
b.free;


So now I want to trigger the RecordBuf from a transient attack (ex: percussion) with loop mode at 0 ( of RecordBuf). I saw Amplitud for amp following but not an specific attack detection ugen (maybe not difficult to implement). 

Any idea haw to trigger the recording buffer from an attack detection?

Thank again for this quick help!!!

p







Le 26 juil. 09 à 18:46, Batuhan Bozkurt a écrit :

Hi Perdo, welcome aboard. Use SoundIn.ar to get input from the hardware inputs, RecordBuf or BufWr to record into a buffer. You may also want to see LocalBuf. Help files for those should lead you to the right direction.

Best,
Batuhan Bozkurt




On Jul 26, 2009, at 7:30 PM, Perdo wrote:

Hi sc gurus!

I'm new to SC. I work a little with others patching programs but seems that SC is more powerful and quarks is very impressive!!
I play a little with granulators ugens (Tgrain, GrainBuf, etc) and now I want to play it in real time with an audio input (In.ar) but don't know how. All the examples are with a load buffer "a11wlk01-44_1.aiff"....
I know that I need to rec a buffer in real time but in Buffer documentation doesn't appear how...

Any idea? is this possible in SC?

Thanks

Best

p