[chuck-users] How to ramp pitch?
Bonnie Eisenman
bmeisenm at princeton.edu
Thu May 22 16:39:27 EDT 2014
Hi all, sorry if this question has been answered before, but I can't find
it in the docs.
I'd like to ramp a pitch quickly from one frequency to another. I feel like
there should be a better way to do this than what I'm currently using,
which is this:
// Where length is the # of milliseconds this should take
for (0 => int i; i < length $ int; i++) {
f1 - ((i/length) * (f1 - f2)) => float newFreq;
osc.freq(newFreq);
1::ms => now;
}
This works but it produces an unfortunate clicking noise at the end (and
yup, I'm using an envelope). Any tips?
Thanks!
--Bonnie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20140522/d1cdc4c1/attachment.htm>
More information about the chuck-users
mailing list