LiCK has implementations of all the easing interpolations as fuction classes, test here
https://github.com/heuermh/lick/blob/master/InterpolationTest.ck
michael
On Jul 13, 2012, at 2:18 PM, Lars Ullrich
what about:
float lineInterpol(float startValue, float endValue, float percent) { if (startValue == endValue) return startValue; return ((1 - percent) * startValue) + (percent * endValue); }
Am 13.07.2012 um 22:21 schrieb George Locke:
I was worried I'd end up with s/t like Jordan's solution; can't try Kassen's suggestion till i get home, but it does look a lot cleaner.
@Jordan If you want a pitch envelope, you can do s/t like this:
Envelope e => Gain g => SinOsc s => dac; Step s=> g; 0 => s.sync; // binds s.freq to input from g
100 => float minFreq; 500 => float maxFreq; minFreq => s.next; (maxFreq-minFreq) => e.gain; // noteOn() no longer limited to 0-1 ;) e.noteOn();
I learned how to do this last night for a percussion patch i'm working on.
On Fri, Jul 13, 2012 at 3:38 PM, Kassen
wrote: With the way I illustrated you should be able to write arbitrarily large or small values to either .value() or .target(). It is only when using noteOn() and noteOff() (or whatever they were called) that it is forced in the 0-1 range, I believe.
Yours, Kas. _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
------------------------------------------------ Audio Engineer / Developer
Lars Ullrich F: 00 49/ (0) 30 569 70 435 H: 00 49/ 0172 477 09 77
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users