[chuck-users] Gen10 issue with coefficients

mario buoninfante mario.buoninfante at gmail.com
Sat Dec 8 11:34:00 EST 2018


Hi,


I'm working with the Gen10 UGen and it seems like once I set up the 
coefficients, I can't change them on the fly anymore. To be more precise 
I can only add new sines to the table but I can't get rid of the ones 
that are already there.

Here's an example where I try to remove the fundamental, but I can't

Phasor phasor => Gen10 g10 => Gain volume => dac;

volume.gain(0.1);

g10.coefs([1.]);

0 => int c;
while(true)
{
     if(c==3)
     {
         g10.coefs([0., 0.,0.,0.,1.]);
         <<< "table update" >>>;
     }

     Math.random2f(500,700) => phasor.freq;
     c++;
     second => now;
}

When I update the table, instead of removing the 1st partial and add the 
5th, I end up having both 1st and 5th.

I had a quick look at the source code (ugen_osc.cpp, row 1469) and the 
possibility of having a coefficient equal to 0 is not considered.

Would it be better if we could remove partials?


Cheers,

Mario

-- 
Electronic Musician, Creative Coder, QA Engineer
https://vimeo.com/creativecodingsalerno
http://mbuoninfante.tumblr.com/
https://github.com/mariobuoninfante
https://bitbucket.org/mariobuoninfante/



More information about the chuck-users mailing list