Hi list, I had some question about Envelope so I did some looking around. I found this; https://lists.cs.princeton.edu/pipermail/chuck-users/2005-October/000049.htm... But strangely it has no replies. I can confirm the behaviour Graham found there, in fact it seems that when .target is quite high (like say around 500) and .time is set at .5 Envelope takes a huge amount of time to reach it's target. This is quite mysterious to me and not at all like what it's supposed to do. Could somebody kindly look into this? Thanks, Kas.
On Sep 13, 2006, at 2:48 PM, Kassen wrote:
Hi list,
I had some question about Envelope so I did some looking around. I found this; https://lists.cs.princeton.edu/pipermail/chuck-users/2005-October/ 000049.html
But strangely it has no replies.
I can confirm the behaviour Graham found there, in fact it seems that when .target is quite high (like say around 500) and .time is set at .5 Envelope takes a huge amount of time to reach it's target.
This is quite mysterious to me and not at all like what it's supposed to do. Could somebody kindly look into this?
Looks like .time is taken as the length of time in seconds for the value to go from 0.0 to 1.0. Based on the ChucK manual, I, too, would have expected this to be the desired time to go from the current value to the target value. Care to report this as a bug, http:// wiki.cs.princeton.edu/index.php/ChucK/Bugs/Reports seems to be the place for that? -Jukka
On 9/14/06, Jukka Akkanen
Looks like .time is taken as the length of time in seconds for the value to go from 0.0 to 1.0. Based on the ChucK manual, I, too, would have expected this to be the desired time to go from the current value to the target value. Care to report this as a bug, http:// wiki.cs.princeton.edu/index.php/ChucK/Bugs/Reports seems to be the place for that?
I'd be delighted to report it "officially" but it just might be badly documented correct behaviour? What I wanted is admittedly totally different from what it's intended to do. I wanted a "free" interpolating glide. My plan was to feed it a .target in Hz, set time to something dependant on BPM and just feed it a new "target" every note, chuck env.last() to osc.freq every few ms for some cheap thrills. Well.... no cigar. I think you are right about how it works; in that case "time" would define the slope of the ramp. That'd be valid if somewhat odd. So; the documentation is mistaken or the code has a problem.... Personally I suspect Envelope wasn't expected to have .target be set to something along the lines of 500 so it might be cool to talk about what it's supposed to do and how in ChucK. I'll submit the bug to the official page for reference and use a rather elaborate way of "manual" interpolation for now. Kas.
What I wanted is admittedly totally different from what it's intended to do. I wanted a "free" interpolating glide. My plan was to feed it a .target in Hz, set time to something dependant on BPM and just feed it a new "target" every note, chuck env.last() to osc.freq every few ms for some cheap thrills.
So; the documentation is mistaken or the code has a problem.... Personally I suspect Envelope wasn't expected to have .target be set to something along the lines of 500 so it might be cool to talk about what it's supposed to do and how in ChucK. I'll submit the bug to the official page for reference and use a rather elaborate way of "manual" interpolation for now.
I am not sure what one is supposed to get out of env.last()... however, I was able to use Envelope with large target values, like this: sinosc osc => dac; Envelope env => blackhole; 240.0 => float BPM; 60.0 / BPM => float BeatSeconds; 0.0 => env.value; while(true) { std.rand2f(200.0, 800.0) => env.target; std.fabs(env.target()-env.value()) / (BeatSeconds * second/ samp) => env.rate; while(env.value() != env.target()) { env.value() => osc.freq; 5::ms => now; } BeatSeconds::second => now; } // -Jukka
On 9/14/06, Jukka Akkanen
Hi! This issue has been fixed in the new release, we think. You can now set target and time independently. Please let us know if this works better. Thanks! Ge!
participants (3)
-
Ge Wang
-
Jukka Akkanen
-
Kassen