def test(self): self.allLights['frontSpencer'].setController(lights.getRGBSequenceController([ ((0,0,0), 1.0), ((255,0,0), 1.0), ((0,255,0), 1.0), ((0,255,0), 1.0), ((0,0,255), 1.0), ((255,0,255), 1.0), ]))
def bassLights(): return lights.getRGBSequenceController( [((255,255,255), self.spb*0.5), ((100,0,0), self.spb*0.0), ((255,255,255), self.spb*0.5), ((255,0,0), self.spb*0.75), ((100,0,0), self.spb*0.0), ((255,255,255), self.spb*0.5), ((255,0,0), self.spb*0.0), ((255,255,255), self.spb*0.25), ((255,0,0), self.spb*0.0), ((255,255,255), self.spb*0.5), ((255,0,0), self.spb*1.0), ((100,0,0), self.spb*0.0) ]*2 )
def intro(self, n): if not self.firstIntro and n == 1: self.updateBPM(8, False) else: self.updateBPM(8, True) if not self.firstIntro: n += 7 self.setLights(['frontLeftMagic'], lambda: lights.FadeInController( lights.ConstantRGBController(0,0,0), 0.1)) print "intro with n = " + str(n) if n == 1: print "fisrt intro" self.allLights['backTanner']['light'].setController( lights.FadeInController( lights.ConstantRGBController(255, 0, 0), 0.5 )) self.allLights['frontTanner']['light'].setController( lights.FadeInController( lights.ConstantRGBController(255, 255, 255), 0.5 )) if n == 2: c = lights.getRGBSequenceController([ ((255, 255, 255), self.spb*4.0), ((255, 0, 0), self.spb*10), ((0, 0, 0), 1.0) ]) for name, l in self.allLights.items(): l['light'].setController(c) def bassLights(): return lights.getRGBSequenceController( [((255,255,255), self.spb*0.5), ((100,0,0), self.spb*0.0), ((255,255,255), self.spb*0.5), ((255,0,0), self.spb*0.75), ((100,0,0), self.spb*0.0), ((255,255,255), self.spb*0.5), ((255,0,0), self.spb*0.0), ((255,255,255), self.spb*0.25), ((255,0,0), self.spb*0.0), ((255,255,255), self.spb*0.5), ((255,0,0), self.spb*1.0), ((100,0,0), self.spb*0.0) ]*2 ) if n > 2 and n < 6: self.setLights(['frontSpencer', 'frontLeft', 'backTanner'], lambda: lights.getRGBSequenceController([ ((255,255,255), self.spb*1.0), ((255,0,0), self.spb*1.0), ((100,0,0), self.spb*0.0), ((255,255,255), self.spb*1.0), ((255,0,0), self.spb*1.0), ((100,0,0), self.spb*0.0), ((255,255,255), self.spb*1.0), ((255,0,0), self.spb*1.0), ((100,0,0), self.spb*0.0), ((255,255,255), self.spb*1.0), ((255,0,0), self.spb*1.0), ((100,0,0), self.spb*0.0) ])) self.setLights(['frontTanner', 'frontRight', 'backSpencer', 'backDoug'], lambda: lights.getRGBSequenceController([ ((255,255,255), self.spb*1.0), ((100,0,0), self.spb*0.0), ((255,255,255), self.spb*1.0), ((255,0,0), self.spb*1.0), ((100,0,0), self.spb*0.0), ((255,255,255), self.spb*1.0), ((255,0,0), self.spb*1.0), ((100,0,0), self.spb*0.0), ((255,255,255), self.spb*1.0), ((255,0,0), self.spb*1.0), ((100,0,0), self.spb*0.0), ((255,255,255), self.spb*1.0), ((100,0,0), self.spb*0.0) ])) if n >= 6 and n < 10: self.setLights(['frontSpencer', 'frontLeft', 'backTanner'],bassLights) self.setLights(['frontTanner', 'frontRight', 'backSpencer', 'backDoug'], bassLights) if n == 10 or n == 12: self.setLights(['frontSpencer', 'backSpencer'], lambda: lights.ConstantRGBController(255,0,0)) self.setLights(['frontLeft','frontTanner', 'frontRight', 'backTanner'], lambda: lights.ConstantRGBController(0,0,0)) self.setLights(['backDoug'], bassLights) if n == 11 or n == 13: self.setLights(['frontSpencer', 'backSpencer'], lambda: lights.ConstantRGBController(0,0,0)) self.setLights(['frontTanner', 'backTanner'], lambda: lights.ConstantRGBController(255,0,0)) self.setLights(['frontLeft', 'frontRight','backDoug'], bassLights) if n> 2 and n%2 == 1: self.setLights(['rear1', 'rear4', 'backTravis'], lambda: lights.getRGBSequenceController([ ((255,255,255), self.spb*4.0), ((255,255,0), self.spb*4.0), ((255,0,0), self.spb*2.0), ])) self.setLights(['rear2', 'rear3'], lambda: lights.getRGBSequenceController([ ((255,255,255), self.spb*4.0), ((255,0,0), self.spb*4.0), ((255,255,0), self.spb*2.0), ])) elif n > 2: self.setLights(['rear1', 'rear4', 'backTravis'], lambda: lights.getRGBSequenceController([ ((255,255,255), self.spb*4.0), ((255,0,0), self.spb*4.0), ((255,255,0), self.spb*2.0), ])) self.setLights(['rear2', 'rear3'], lambda: lights.getRGBSequenceController([ ((255,255,255), self.spb*4.0), ((255,255,0), self.spb*4.0), ((255,0,0), self.spb*2.0), ]))