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

Re: [sc-users] wooh-kiki-woohwooh - Sequencing from text, using BufRd and Phasor



On Mon, 29 Dec 2003, Andrew Robinson wrote:

> With the change above, I still have the looping problem.

Maybe something is wrong with BufRd.  Looping makes sense with PlayBuf,
but BufRd's 'looping' is dependent on its driving function.

> I would like to understand how Phasor works too though.
> My usage of it is just pasted straight from the BufRd helpfile.

a Phasor increments a phase index to a buffer/wavetable.  Basically it's a
sawtooth wave that's scaled to spit out each sample of the wavetable, at
a rate that produces the desired output frequency.  Since it's a sawtooth
wave, it repeats, so you either have to kill it at the right time, or use
a different sort of line segment:

(
s = Server.local;
s.sendMsg("/b_allocRead", 0, "sounds/a11wlk01.wav");
)
(
e = Env.new([0.0, 1.0], [10]);
{BufRd.ar(1, 0, EnvGen.ar(e, 1.0, BufFrames.kr(0), 1.0,
BufRateScale.kr(0), doneAction:2)) }.play;
)

If you think about how this all works for a bit, you can figure out why
the Env's length is 10.  And then come back and explain to to me, because
i just plugged that in and it worked ;)

Have you tried PlayBuf?  Or do you need to control the endpoint?  Line.ar
might also be a reasonable alternative to EnvGen, it doesn't have a trig
argument but it might be easier to sort out all the sample points.
 
                             David Loehlin
	             dloehlin@xxxxxxxxxxxx    

	                 Anticlimax radio:
		       whpk 88.5fm chicago
  	  	   fridays eight to ten am
        http://home.uchicago.edu/~dloehlin