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

Re: [sc-users] help recording Impulse to a Buffer



Plot's resolution is to small to catch it on screen.... do:

b.write("~/test.aif".standardizePath)

And you can see the Impulse is there in another editor.

Bet,

Josh

On Dec 30, 2008, at 3:43 AM, Eric Lyon wrote:

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


******************************************

/* Joshua D. Parmenter

http://www.realizedsound.net/josh/


“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono

*/