Yes, I use the following pattern often

220.0 => float f;
SinOsc osc => dac;
ASDR adsr => blackhole;

spork ~ updateAtSampleRate();

fun void updateAtSampleRate() {
  while (true) {
    f + adsr.last() * f => osc.freq;
    1::samp => now;
  }
}

There is also this pattern, which tries to encapsulate the above (whatever
you chuck into cv Gain(s) are provided as float parameter(s) to the tick
method)

https://github.com/heuermh/lick/blob/master/lick/module/Module.ck
https://github.com/heuermh/lick/blob/master/examples/moduleExample.ck

Cheers,

   michael


On Wed, Nov 1, 2017 at 11:05 AM, Jean Menezes da Rocha <
j...@menezesdarocha.info> wrote:

> Hello,
>
> the ADSR UGen, to me, seems to have effect only over amplitude (which is
> its original function, I concede).
> However, is there any use case where I can use ADSR to map, say, pitch
> instead of amplitude, in order to avoid recurring to functions and for
> loops?
>
> Thanks in advance!
> --
> Jean Menezes da Rocha
> Compositor
> Professor
> Doutorando em Música pela Universidade Federal da Bahia
>
> _______________________________________________
> chuck-users mailing list
> chuck-users@lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
>
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

Reply via email to