Building FM operator mod matrix in gen

Riki Keckarovski's icon

Hi,
I'm trying to build operator connection scheme switcher algorithm in gen~ (controlled via max live.dial, but without luck :( ). I've tried so far with codebox if ... statement, but with no luck, somewhere the signal get's lost. Also have to mention that when I replicate all 8 algorithms with all of the operators which are 4 the signal goes correct to the expectations, but this way it eat's up a lot of CPU power. I would appreciate any ideas on how to achieve this without replicating all 8 algorithm which contain 4 operators each, which is sending all parameters to 32 destinations at once and eating the CPU.
Thanks.

Ryan Palm's icon

So your bringing things out of gen and have control over that?
I believe gen has an attribute called "active". You could maybe switch that attribute on and off for each algorithm. Then send all the parameters everywhere at once so things are identical.

Ernest's icon

There actually isnt a better option than gen~ with conditional if statements. But gen~ is not very help;ful with bugs. It's best to make each piece in top level code first, and when you put it inside an if statement, make sure that all the variables are set before the if statement starts. It doesn't always find undefined variables inside if statements and that leads to unexpected crashes.