[chuck-users] Reading sample's value

Tom Lieber tom at alltom.com
Fri Mar 30 18:31:15 EDT 2012

On Fri, Mar 30, 2012 at 6:27 PM, Matt Bard <mattthestrat at hotmail.com> wrote:
> Is there a way that I can read individual sample's values?  Does ChucK have
> some method of giving me those as floats/ints?  I'd like to monitor each
> sample's current value to create a Schmitt Trigger, for example.

You can use last() to get the last sample any UGen produced.

  SinOsc s => dac;
  repeat(50) {
    samp => now;
    <<< s.last() >>>;

Tom Lieber

More information about the chuck-users mailing list