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

[sc-users] help recording Impulse to a Buffer



I'm getting some unexpected results - advice would be welcome. (SC Version 3.3a)

TiA,
Eric



b = Buffer.alloc(s, s.sampleRate * 1.0, 1); // allocate 1 second Buffer


b.plot; // show current contents


// expect, and see 1 cycle of a sine


{ RecordBuf.ar( SinOsc.ar(1.0), b.bufnum,0,1,0,1,0, doneAction: 2 ); 0.0 }.play;


// expect 4 clicks, see only 1


{ RecordBuf.ar( Impulse.ar(4, 0, 1), b.bufnum,0,1,0,1,0, doneAction: 2 ); 0.0 }.play;


// now try higher number - weird, non-uniform result:


{ RecordBuf.ar( Impulse.ar(1000, 0, 1), b.bufnum,0,1,0,1,0, doneAction: 2 ); 0.0 }.play;


// but listening, it seems fine 


{ Impulse.ar(4) * 0.5 }.play