Send normalized values back to APC40
[SugarCubes.git] / SamMorrow.pde
1 abstract class SamPattern extends SCPattern {
2 public SamPattern(GLucose glucose) {
3 super(glucose);
4 setEligible(false);
5 }
6 }
7
8 class JazzRainbow extends SamPattern {
9 public JazzRainbow(GLucose glucose) {
10 super(glucose);
11 }
12
13
14 public void run(double deltaMs) {
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++) {
21 colors[(i+b)%colors.length] = lx.hsb(a+i%250, 100, b*a%100);
22 }
23 }
24 }
25 }
26 }