def next_scene(self, i): if i % 2 == 1: sceneFactory = Blackout() else: sceneFactory = White() return sceneFactory.scene()
def next_scene(self, i): red = Red().scene() green = Green().scene() cyan = Cyan().scene() blue = Blue().scene() purple = Purple().scene() yellow = Yellow().scene() if i % 12 == 0: return green if i % 12 == 2: return cyan if i % 12 == 4: return blue if i % 12 == 6: return purple if i % 12 == 8: return red if i % 12 == 10: return yellow return White().scene()
def withFlash(effect, flashScene = White().scene()): wait = [{ "type": "wait", "duration": 0.05 }] return flashScene + wait + effect
def next_scene(self, i): red = Red().scene() green = Green().scene() cyan = Cyan().scene() blue = Blue().scene() purple = Purple().scene() yellow = Yellow().scene() blackout = Blackout().scene() white = White().scene() strobe = WhiteStrobeLow().scene() flash = withFlash(Blackout().scene()) chainStrobe = [ blackout, white, blackout, white, blackout, blackout, blackout, white, blackout, white, blackout, blackout, flash, blackout, blackout, blackout, flash, white, blackout, white, blackout, blackout, blackout, white, blackout, white, blackout, blackout, flash, blackout, blackout, blackout, flash, white, blackout, white, blackout, blackout, blackout, white, blackout, white, blackout, blackout, flash, white, white, white, white, white, white, white, blackout, blackout, blackout, red, blackout, red, blackout, blackout, blackout ] chainStrobe += chainStrobe chain = [blackout] if i < len(chainStrobe): return chainStrobe[i % (len(chainStrobe))] else: return chain[(i - len(chainStrobe)) % (len(chain))]
def next_scene(self, i): red = Red().scene() green = Green().scene() cyan = Cyan().scene() blue = Blue().scene() purple = Purple().scene() yellow = Yellow().scene() scene = White().scene() if i % 6 == 0: scene = green if i % 6 == 1: scene = cyan if i % 6 == 2: scene = blue if i % 6 == 3: scene = purple if i % 6 == 4: scene = red if i % 6 == 5: scene = yellow return withColoredFlash(scene)
def next_scene(self, i): if i % 2 == 0: sceneFactory = Blue() else: sceneFactory = White() return sceneFactory.scene()
def __init__(self, dmxUsb): super().__init__(dmxUsb) red = Red().scene() purple = Purple().scene() white = White().scene() self.candidates = self._generate(white, red) + self._generate( red, purple) + self._generate(purple, red)
def next_scene(self, i): red = Red().scene() green = Green().scene() white = White().scene() yellow = Yellow().scene() if i % 4 == 0: return green if i % 4 == 1: return red if i % 4 == 2: return yellow if i % 4 == 3: return white return Blackout().scene()
def next_scene(self, i): wait = [{"type": "wait", "duration": 0.05}] return White().scene() + wait + between(Blackout().scene(), Red().scene(), 0.75)
def next_scene(self, i): wait = [{"type": "wait", "duration": 0.05}] return White().scene() + wait + Blackout().scene()