def lf(c1, c2): p1 = PartyBar().all(c1) p2 = PartyBar().all(c2) c = Chase() c.add(FadeCommand(p1, p2, 15, 15.8)) c.add(FadeCommand(p2, p1, 16, 15.8)) c.loop = True return c
def twobardimmer(pb): c = Chase() pb2 = PartyBar.clone(pb) pb2.dim(0) # If we run the dim for the whole measure we lose time to # hit the next beat c.add(FadeCommand(pb, pb2, 0, 3.75)) c.add(FadeCommand(pb2, pb, 4, 3.75)) return c
def fourstepmover(duration, color, background=BLACK, fadeDivisor=2.0): c = Chase() p0 = PartyBar() p1 = PartyBar() p1.l1(color) p1.l2(background) p1.l3(background) p1.l4(background) p2 = PartyBar() p2.l1(background) p2.l2(color) p2.l3(background) p2.l4(background) p3 = PartyBar() p3.l1(background) p3.l2(background) p3.l3(color) p3.l4(background) p4 = PartyBar() p4.l1(background) p4.l2(background) p4.l3(background) p4.l4(color) sceneDur = duration / 4.0 c.add(FadeCommand(None, p1, 0, sceneDur / fadeDivisor)) c.add(FadeCommand(p1, p2, sceneDur, sceneDur / fadeDivisor)) c.add(FadeCommand(p2, p3, sceneDur, sceneDur / fadeDivisor)) c.add(FadeCommand(p3, p4, sceneDur, sceneDur / fadeDivisor)) c.add(SleepCommand(sceneDur)) return c
def strobe(scene, beatdivision, duration): c = Chase() off = PartyBar.clone(scene) off.dim(0) numScenes = (1.0 / beatdivision) * duration numScenes = numScenes / 2 sceneDuration = beatdivision scenes = 0 while scenes < numScenes: print("Adding commands" + str(scenes)) c.add(SceneCommand(off, 0)) c.add(SceneCommand(scene, beatdivision)) c.add(SleepCommand(beatdivision)) scenes = scenes + 1 return c
def onebardimmer(pb): c = Chase() pb2 = PartyBar.clone(pb) pb2.dim(0) c.add(FadeCommand(pb, pb2, 0, 4)) return c