[chuck-users] ADSR needs a kick in the pants

Jack Atherton lja at ccrma.stanford.edu
Thu Jan 30 11:32:21 EST 2020


FYI, you should be able to avoid using the Step if you use env.value()
instead of env.last(). Last is the output sample, and value is the
amplitude of the envelope being applied to the input signal. It would
probably be useful to implement those other envelope types as chugins -- go
for it!

On Thu, Jan 30, 2020 at 8:22 AM Michael Heuer <heuermh at gmail.com> wrote:

> Hello ChucKers,
>
> For the longest time I couldn't figure out how to get envelopes to work
> correctly as modulators
>
> ADSR env => blackhole;
>
> spork ~ updateAtSampleRate();
>
> fun void updateAtSampleRate()
> {
>   while (true)
>   {
>     1::samp => now;
>     env.last() => // do something
>   }
> }
>
> It turns out they need a kick in the pants to work correctly, in other
> words
>
> Step step => ADSR env => blackhole;
> 1.0 => step.next;
>
>
> Is this intentional?
>
> Then is there any interest in implementing all the other envelope types
> (AD, AR, AHDSR, DADSR, DAHDSR)?  I could probably do it in ChucK, but it
> might be better to implement them as chugins or upstream in STK.
>
> In any case, now that I know how to make ADSR envelopes work, I have some
> pretty awful synthesized drums, just in time for the RPM challenge.
>
> https://github.com/heuermh/lick/tree/master/lick/kick
> https://github.com/heuermh/lick/tree/master/lick/snare
>
> Cheers,
>
>    michael
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20200130/5fc20d87/attachment.html>


More information about the chuck-users mailing list