<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">check out the "follower.ck" file in smelt (smelt.cs.princeton.edu).&nbsp;<div><br></div><div>dt</div><div><br><div><div>On Feb 17, 2009, at 4:24 PM, Stefan Blixt wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Tom's solution is probably the easiest and most effective.<br><div><br></div><div>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:</div> <div><br></div><div>--------------------------</div><div>adc => GateTrigger gate;</div><div><br></div><div>0.01 => gate.threshold;</div><div>1::ms => gate.release;</div><div><br></div><div>gate.event => now;</div> <div>-----------------------------</div><div><br></div><div>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.</div> <div><br></div><div>Maybe a digression...&nbsp;</div><div><br><div class="gmail_quote">On Tue, Feb 17, 2009 at 9:43 PM, rkramer <span dir="ltr">&lt;<a href="mailto:rkramer@gmail.com">rkramer@gmail.com</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Being a relative non-programmer, I'm not quite sure if this is even possible...&nbsp; 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.)&nbsp; Essentially what I want to do is use ChucK for practical demonstrations of simple physics...&nbsp; IE demonstrating average velocity of a falling object (that generates a sufficiently loud event when it is released and when it hits the floor.)<br> <br>Any tips where to start on this project? <br><br><br>Ryan<br><br><br><br> <br>_______________________________________________<br> chuck-users mailing list<br> <a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br> <a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br> <br></blockquote></div><br><br clear="all"><br>-- <br>Release me, insect, or I will destroy the Cosmos!<br> </div> _______________________________________________<br>chuck-users mailing list<br><a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>https://lists.cs.princeton.edu/mailman/listinfo/chuck-users<br></blockquote></div><br></div></body></html>