Hello, ChucK people - How do I use CurveTable? I've tried chucking a SinOsc to it as one would an envelope, but that didn't work. I've also tried this: SinOsc s => Gain g => dac; CurveTable t; [0.0, 0.0, 0.0, 2.0, 1.0, 0.0, 3.0, 0.0] @=> float times[]; times => t.coefs; while (true) { 1::samp => now; t.last() => g.gain; }; thanks, jascha
Hi Jascha, you need a phasor to drive the table. Phasor p => CurveTable t => blackhole; Also, you need to set the phasor's freq. So, if you want to read the table N times in t::second, then your phasor freq should be N/t. You could try sthg like this: SinOsc s => Gain g => dac; Phasor driver => CurveTable t => blackhole; // <------ connect to phasor [0.0, 0.0, 0.0, 2.0, 1.0, 0.0, 3.0, 0.0] @=> float times[]; times => t.coefs; s.freq()/100. => driver.freq; // <-- phasors freq while (true) { 1::samp => now; t.last() => g.gain; } hope it helps, eduard On Oct 10, 2007, at 8:19 PM, Jascha Narveson wrote:
Hello, ChucK people -
How do I use CurveTable? I've tried chucking a SinOsc to it as one would an envelope, but that didn't work. I've also tried this:
SinOsc s => Gain g => dac; CurveTable t; [0.0, 0.0, 0.0, 2.0, 1.0, 0.0, 3.0, 0.0] @=> float times[]; times => t.coefs; while (true) { 1::samp => now; t.last() => g.gain; };
thanks,
jascha _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Marvy - thanks! -j On Oct 10, 2007, at 2:43 PM, eduard aylon wrote:
SinOsc s => Gain g => dac; Phasor driver => CurveTable t => blackhole; // <------ connect to phasor [0.0, 0.0, 0.0, 2.0, 1.0, 0.0, 3.0, 0.0] @=> float times[]; times => t.coefs; s.freq()/100. => driver.freq; // <-- phasors freq while (true) { 1::samp => now; t.last() => g.gain; }
participants (2)
-
eduard aylon
-
Jascha Narveson