![](https://secure.gravatar.com/avatar/040cf872d4b2a16792341f0229136c85.jpg?s=120&d=mm&r=g)
13 Jul
2012
13 Jul
'12
4:18 p.m.
Jordan Orelli
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; }