# at the beginning, start as white, and in the first 1/8th of the effect # fade from white to full current hue fireball.add_saturation_shift(0, 1, fireball_duration/8, shape=tween.OUT_CIRC) # keep full intensity over the first third of the effect fireball.add_intensity_shift(1, 1, fireball_duration/3) # then for the next two thirds, fade out fireball.add_intensity_shift(1, 0, (fireball_duration/3) * 2, shape=tween.OUT_CIRC) # add the effect to our single test element single.effects.append(fireball) show.add_element(single, network=dmx3) # now we create a chase of elements, and apply the effect to each element # the result is that the effect is painted over time chase = Chase(name='fireball streak') elementid = 0 for i in range(1, 300, 3): elementid += 1 l = RGBLight( start_channel=i, name="item_%s" % elementid, ) dmx3.add_element(l) chase.elements.append(l) # deepcopy is used so that each element has an independent fireball effect # over time, if they shared one copy of the effect, then the fade would # be synchronized, which is not what we want fb = deepcopy(fireball) l.effects.append(fb)
attack_duration=0, decay_duration=0, release_duration=0, sustain_value=1, ) l.hue = .96 l.saturation = 1 l.update_rgb() dmx3.add_element(l) pixels.elements.append(l) doors = LightGroup() show.add_element(doors) for i in range(10, 80, 10): simple = Chase(name="simplechase") simple.start_pos = 1 simple.speed = .5 simple.moveto = simple.end_pos = 11 simple.off_mode = "follow" simple.elements = pixels.elements[i:i + 11] show.add_element(simple) doors.elements.append(simple) # set the input interface to trigger the element # midi code 70 is the "V" key on the qwerty keyboard for the midikeys app dispatcher.add_observer((0, 65), doors) # startup the midi communication - runs in its own thread dispatcher.start()
# from birdfish.log_setup import logger # logger.setLevel(10) # create a light show - manages the updating of all lights show = LightShow() # Create a network - in this case, universe 3 dmx3 = LumosNetwork(3) # add the network to the show show.networks.append(dmx3) # create an input interface dispatcher = MidiDispatcher("MidiKeys") simple = Chase(name="simplechase") elementid = 0 for i in range(1, 360, 3): elementid += 1 l = RGBLight( start_channel=i, name="item_%s" % elementid, attack_duration=0, decay_duration=0, release_duration=0, sustain_value=1, ) l.hue = .59 l.saturation = 1 l.update_rgb() l.bell_mode = True
attack_duration=0, decay_duration=0, release_duration=0, sustain_value=1, ) l.hue = .96 l.saturation = 1 l.update_rgb() dmx3.add_element(l) pixels.elements.append(l) doors = LightGroup() show.add_element(doors) for i in range(10, 80, 10): simple = Chase(name="simplechase") simple.start_pos = 1 simple.speed = .5 simple.moveto = simple.end_pos = 11 simple.off_mode = "follow" simple.elements = pixels.elements[i:i+11] show.add_element(simple) doors.elements.append(simple) # set the input interface to trigger the element # midi code 70 is the "V" key on the qwerty keyboard for the midikeys app dispatcher.add_observer((0,65), doors) # startup the midi communication - runs in its own thread dispatcher.start()
shape=tween.OUT_CIRC) # keep full intensity over the first third of the effect fireball.add_intensity_shift(1, 1, fireball_duration / 3) # then for the next two thirds, fade out fireball.add_intensity_shift(1, 0, (fireball_duration / 3) * 2, shape=tween.OUT_CIRC) # add the effect to our single test element single.effects.append(fireball) show.add_element(single, network=dmx3) # now we create a chase of elements, and apply the effect to each element # the result is that the effect is painted over time chase = Chase(name='fireball streak') elementid = 0 for i in range(1, 300, 3): elementid += 1 l = RGBLight( start_channel=i, name="item_%s" % elementid, ) dmx3.add_element(l) chase.elements.append(l) # deepcopy is used so that each element has an independent fireball effect # over time, if they shared one copy of the effect, then the fade would # be synchronized, which is not what we want fb = deepcopy(fireball) l.effects.append(fb)