<div dir="ltr"><div><div><div><div><div><div>Yes, I use the following pattern often<br></div><div><br></div><div>220.0 =&gt; float f;<br></div>SinOsc osc =&gt; dac;<br></div>ASDR adsr =&gt; blackhole;<br><br></div>spork ~ updateAtSampleRate();<br><br></div>fun void updateAtSampleRate() {<br></div>  while (true) {</div><div>    f + adsr.last() * f =&gt; osc.freq;<br></div>    1::samp =&gt; now;<br><div>  }<br><div>}<br></div><div><br></div><div>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)<br><br><a href="https://github.com/heuermh/lick/blob/master/lick/module/Module.ck">https://github.com/heuermh/lick/blob/master/lick/module/Module.ck<br></a><a href="https://github.com/heuermh/lick/blob/master/examples/moduleExample.ck">https://github.com/heuermh/lick/blob/master/examples/moduleExample.ck<br></a></div><div><br></div><div>Cheers,</div><div><br></div><div>   michael</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 1, 2017 at 11:05 AM, Jean Menezes da Rocha <span dir="ltr">&lt;<a href="mailto:jean@menezesdarocha.info" target="_blank">jean@menezesdarocha.info</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>the ADSR UGen, to me, seems to have effect only over amplitude (which is its original function, I concede).</div><div>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?</div><div><br></div><div>Thanks in advance!</div></div><span class="HOEnZb"><font color="#888888"><div dir="ltr">-- <br></div><div class="m_-5045327889894351668gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Jean Menezes da Rocha<div>Compositor</div><div>Professor</div><div>Doutorando em Música pela Universidade Federal da Bahia</div></div></div>
</font></span><br>______________________________<wbr>_________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.<wbr>princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" rel="noreferrer" target="_blank">https://lists.cs.princeton.<wbr>edu/mailman/listinfo/chuck-<wbr>users</a><br>
<br></blockquote></div><br></div>