Increment the values of all knobs in matrix

Hello,

So i'm diving in the world of matrix... and i've learned a looooot of things...

In a knob's matrix, I now know how to "manipulate" their values individually.

I know how to make them all go to the same value at once, with for example a RTZ's button script set to : set('knob_*',0)

But know, i'm trying to ADD a constant to all the knobs at once.
I tried a "Plus 10" button, with something like set('knob_*, get('knob_*') +10)`
But that doesn't work.

I tried something like this too :

var i = "#{$+1}"
{for(i=0; i<4; i++) set('knob_i', get('knob_i')+10)}

And other things... Well... i just knew it wasn't going to be ok... :wink:

So... how can i add 10 to all my knobs ?...

Thank you

You were close:

for (var i = 0; i < 4; i++) {
  set('knob_' + i, get('knob_' + i) + 10)
}
1 Like

Oh... my... gosh... :smiley:

Thank you