check out the "follower.ck" file in smelt (smelt.cs.princeton.edu). dt On Feb 17, 2009, at 4:24 PM, Stefan Blixt wrote:
Tom's solution is probably the easiest and most effective.
For other reasons, I've been thinking that it would be cool to have some kind of gate UGen (though it doesn't necessarily output anything) that triggers events depending on what has been chucked into it. Something like this:
-------------------------- adc => GateTrigger gate;
0.01 => gate.threshold; 1::ms => gate.release;
gate.event => now; -----------------------------
Here the gate.event would receive a signal when whatever is coming from adc goes over 0.01 or below 0.01. You'd need some kind of filter or release so the thing doesn't go off every time the signal crosses zero.
Maybe a digression...
On Tue, Feb 17, 2009 at 9:43 PM, rkramer
wrote: Being a relative non-programmer, I'm not quite sure if this is even possible... My goal is a quick and dirty program that will measure the time between two large audio events (in the input sound buffer, live recording.) Essentially what I want to do is use ChucK for practical demonstrations of simple physics... IE demonstrating average velocity of a falling object (that generates a sufficiently loud event when it is released and when it hits the floor.) Any tips where to start on this project?
Ryan
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- Release me, insect, or I will destroy the Cosmos! _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users