dispatcher = MidiDispatcher("MidiKeys") # osc_dispatcher = OSCDispatcher(('0.0.0.0', 8998)) # create a single RGB light element single = RGBLight( start_channel=61, name="singletestb", ) # Define the fireball effect # this consists of a colorshift that has changes to hue, saturation and intensity # the use of the OUT_CIRC shape is used to make most of the change happen # right away, then slowly complete the rest # the add shift take a start, end, duration, and shape fireball_duration = 2 fireball = ColorShift() # we don't want the effect to loop back, so we disable the default looping fireball.set_loop(None) # change from yello to red over the duration of the effect fireball.add_hue_shift(.13, 0, fireball_duration, shape=tween.OUT_CIRC) # 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)
dispatcher = MidiDispatcher("MidiKeys") # osc_dispatcher = OSCDispatcher(('0.0.0.0', 8998)) # create a single RGB light element single = RGBLight( start_channel=61, name="singletestb", ) # Define the fireball effect # this consists of a colorshift that has changes to hue, saturation and intensity # the use of the OUT_CIRC shape is used to make most of the change happen # right away, then slowly complete the rest # the add shift take a start, end, duration, and shape fireball_duration = 2 fireball = ColorShift() # we don't want the effect to loop back, so we disable the default looping fireball.set_loop(None) # change from yello to red over the duration of the effect fireball.add_hue_shift(.13, 0, fireball_duration, shape=tween.OUT_CIRC) # 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,
# create a single channel light element single = RGBLight( start_channel=1, name="singletest", attack_duration=1, sustain_value=1, release_duration=1.5, ) single.saturation = 1 # add the light to a network show.add_element(single, network=dmx3) cshift = ColorShift() cshift.add_hue_shift(start=.5, end=.7, duration=4) cshift.add_hue_shift(start=.7, end=.1, duration=1) cshift.add_hue_shift(start=.1, end=.5, duration=2) cshift.add_sat_shift(start=1, end=0, duration=3.5) cshift.add_sat_shift(start=0, end=1, duration=3.5) # the effect is configured by how many times it should pulse per second # 1 is the default # if you wanted to give the pulse a different characteristic # pulser = Pulser(on_shape=tween.IN_CIRC, off_shape=tween.OUT_CIRC) # we append the effect to the elements own list of effects single.effects.append(cshift) # set the input interface to trigger the element