[chuck-users] Ramping Sine and other Inputs
Perry Cook
prc at CS.Princeton.EDU
Fri Jul 13 16:18:12 EDT 2012
> Jordan Orelli <jordanorelli at gmail.com> Wrote:
> there's no way to use this to ramp an arbitrary variable,
> like the frequency of a SinOsc, for example, is there?
> Cause I do stuff like this and find it kinda annoying:
Hey Jordan,
Not for any arbitrary UG, but for SineOsc, Phasor, and some others,
there is a .sync() method that instructs them to look at anything ChucKed
to their input as a frequency. Here's a silly example with SinOsc:
SinOsc s => dac;
0 => s.sync;
Step blah => Envelope freq => s;
1.0 => blah.next;
0.5 :: second => freq.duration;
1 => freq.keyOn;
while (1) {
Std.rand2f(0.1,1.0) :: second => now;
Std.rand2f(100.0,1000.0) => freq.target;
}
More information about the chuck-users
mailing list