) l.hue = random() l.saturation = 1 l.update_rgb() # l.simple = True # add the light to the network show.add_element(l, network=dmx3) p.elements.append(l) e = Twinkle() e.targets.append(l) e.off_max = .4 e.off_min = .03 e.on_min = .08 e.on_max = .3 e.intensity_min = .004 e.intensity_max = .12 show.effects.append(e) show.add_element(p) # set the input interface to trigger the element # midi code 70 is the "J" key on the qwerty keyboard for the midikeys app dispatcher.add_observer((0, 70), p) # startup the midi communication - runs in its own thread dispatcher.start() # start the show in a try block so that we can catch ^C and stop the midi # dispatcher thread try: show.run_live()