Hi,

I’m building a sketch that uses different algorithms to generate audio. I have one knob swap in different algorithms. Ideally, I’d like to store dozens of them…

This snipped of code works fine, but seems a bit inelegant - it feels like I should be able to store a bunch of these lines in an array, and pull them in with a number:

```
if (knob == 0){
PORTD = t * ((t>>12|t>>8)&63&t>>4) ; // Algorithm here
t++;
}
else if (knob == 1){
PORTD = t*((("38947237")[t>>13&3])^(("2414144")[t>>8&("5685")[t>>15&4]]))
;
t++;
}
else if (knob == 2){
PORTD = ((((t%4)/10)+((t%3)/10)+((t%8)/10)+((t%9)/3)+((t%11)/10)+((t%13)/10)+((t%17)/10)+((t%23)/10)+((t%33)/10)+((t%12)/10))*5)+(((((t>>5)&((t>>((t&4)?(t%3):(t%2)))*(t>>5|t>>3|t>>7|t>>13)))>>(t<<((t&12)?t>>(t%4):t>>8)))%256)/2)
;
t++;
}
else if (knob == 3){
PORTD = t*(((t>>11)^((t>>17)-1)^((t>>23)-3)^((t>>27)-7)^1)%13)
;
t++;
}
```

… and so on.