It uses rounding to put the getspec data for 5 frequencies (gi0, gi1, gi2, gi3, gi4) in a single variable (g1):
And then in pixel it puts all that getspec data in different variables (j4, j3, j2, j1, (j0)). j0 isn't actually created in the preset, it's included in the z1.
Frame:
gi0=((getspec(0,0,0))*100)%100/100;
gi1=((getspec(0.05,0,0))*100)%100/100;
gi2=((getspec(0.1,0,0))*100)%100/100;
gi3=((getspec(0.2,0,0))*100)%100/100;
gi4=((getspec(0.3,0,0))*100)%100/100;
g1=gi0+gi1*100+gi2*10000+gi3*10000*100+gi4*10000*10000;
I have a question though: how many digits can a variable hold? This preset goes from 0.01 to 10000000, but if you could use more, a lot more frequencies can be included.
pixel:
j4=(j/10000/10000*100)%100/100;j4=if(above(j4*10000*10000,j),j4-0.01,j4);
j3=((j-j4*10000*10000)/10000/100*100)%100/100;j3=if(above(j3*10000*100,j-j4*10000*10000),j3-0.01,j3);
j2=((j-j3*10000*100-j4*10000*10000)/10000*100)%100/100;j2=if(above(j2*10000,j-j3*10000*100-j4*10000*10000),j2-0.01,j2);
j1=((j-j2*100*100-j3*10000*100-j4*10000*10000)/100*100)%100/100;j1=if(above(j1*100,j-j2*10000-j3*10000*100-j4*10000*10000),j1-0.01,j1);
j0=j-j1*100-j2*10000-j3*10000*100-j4*10000*10000;
Is it possible to do some kind of int() function, because the way I round the numbers (var*100)%100/100 requires an extra line in the section with j4, j3, j2 and j1, because it rounds. That means that when var=1.67, it rounds to 2, when I want 1. The line j4=if(above(j4*10000*10000,j),j4-0.01,j4); can fix that, but an int()-like function would be faster.