[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] Need help with Buffer and Osc
Not sure what you're trying to accomplish...
basically, this will be a sample-and-hold effect which
you could do more easily with the Demand UGens.
But, in any case, try filling the buffer like this
(untested):
pitchBuffer.setn(0, Signal[69, 71, 73, 74, 76, 78, 80,
81].midicps.asWavetable);
Note also that Osc will interpolate, so the output
will not be limited to the precise MIDI notes you
specify. If you want these to be allowable pitches,
look into Demand.
Osc will always use the full buffer. To use a partial
buffer at control rate, try Index.kr.
hjh
--- Daniel Nouri <dpunktnpunkt@xxxxxx> wrote:
> Hello.
>
> I try to use a buffer filled with frequencies as the
> input for a Latch.
> It doesn't work:
>
> pitchBuffer = Buffer.alloc(s, 16, 1);
> pitchBuffer.setn(0, [69, 71, 73, 74, 76, 78, 80,
> 81].midicps);
>
> base = Latch.kr(
> Osc.kr(pitchBuffer.bufnum, y),
> gate
> );
>
> 'y' and 'gate' have meaningful values. What am I
> doing wrong?
>
> Further, how do I tell the Osc to loop at index 8?
>
> Thanks for your help, --Daniel
=====
____ James Harkins /// dewdrop world
\ / jamshark70@xxxxxxxxx
\/ http://www.dewdrop-world.net
"... love and hot pants, peace, harmony..."
-- Dick Lee, Hot Pants: The Musical