New LX UI
[SugarCubes.git] / SamMorrow.pde
CommitLineData
80785186 1abstract class SamPattern extends SCPattern {
dde75983
MS
2 public SamPattern(LX lx) {
3 super(lx);
80785186
S
4 setEligible(false);
5 }
6}
7
8class JazzRainbow extends SamPattern {
dde75983
MS
9 public JazzRainbow(LX lx) {
10 super(lx);
80785186
S
11 }
12
13
34327c96 14 public void run(double deltaMs) {
80785186
S
15 // Access the core master hue via this method call
16 float hv = lx.getBaseHuef();
17 for (int i = 0; i < colors.length*5; i=i+27) {
18 float a = hv%250;
19 if (i%2 == 0) {
20 for (int b = 0; b < 70; b++) {
a41f334c 21 colors[(i+b)%colors.length] = lx.hsb(a+i%250, 100, b*a%100);
80785186
S
22 }
23 }
24 }
25 }
26}