X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=SamMorrow.pde;fp=SamMorrow.pde;h=520ff29fa52eeb222c1420f6fd4175386af678a9;hb=80785186a7f6abc9bb51667d9b2448772f01b84b;hp=0000000000000000000000000000000000000000;hpb=1692ded217cbea0932d92153603c7d42ca2ba847;p=SugarCubes.git diff --git a/SamMorrow.pde b/SamMorrow.pde new file mode 100644 index 0000000..520ff29 --- /dev/null +++ b/SamMorrow.pde @@ -0,0 +1,26 @@ +abstract class SamPattern extends SCPattern { + public SamPattern(GLucose glucose) { + super(glucose); + setEligible(false); + } +} + +class JazzRainbow extends SamPattern { + public JazzRainbow(GLucose glucose) { + super(glucose); + } + + + public void run(int deltaMs) { + // Access the core master hue via this method call + float hv = lx.getBaseHuef(); + for (int i = 0; i < colors.length*5; i=i+27) { + float a = hv%250; + if (i%2 == 0) { + for (int b = 0; b < 70; b++) { + colors[(i+b)%colors.length] = color(a+i%250, 100, b*a%100); + } + } + } + } +}