[chuck-users] Gen10.coefs abuse?

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


Hi

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;
while(true){
     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];
         }
     }
     g10.coefs(a);
     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
Atte

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



More information about the chuck-users mailing list