[chuck-users] Gen10.coefs abuse?

Atte André Jensen atte.jensen at gmail.com
Tue Jun 26 10:10:37 EDT 2007


In my eagerness to play with GenX I coughed up the following code:

Phasor osc => Gen10 g10 => dac;
int i;
[1., 0.5, 0.3, 0.2] @=> float a[];
440. => osc.freq;
     for(0 => i; i< a.cap(); i++){
         Std.rand2f(-.1,.1) +=> a[i];
         if(a[i] < 0 || a[i] > 1) {
             Math.round(a[i]) => a[i];
     50::ms => now;

Fortunately the update is glitch free, unfortunately it seems that
coefs() is a fairly expensive function :-( I realize that GenX might be
supposed to be used with static coefs, but the above seems like it holds
a lot of potential. It there a way to to what I do more efficiently or
am I simply not supposed to do this?

peace, love & harmony

http://atte.dk       | http://myspace.com/attejensen
http://anagrammer.dk | http://atte.dk/compositions

More information about the chuck-users mailing list