コード例 #1
0
ファイル: pulse.py プロジェクト: ptone/BirdFish

p = PulseChase(name="greenpulse",
        start_pos=12,
        end_pos=65,
        speed=3,
        move_tween=tween.IN_OUT_CUBIC,
        )

elementid = 0
for i in range(1,360,3):
    elementid += 1
    l = RGBLight(
            start_channel=i,
            name="pulse_%s" % elementid,
            attack_duration=0,
            release_duration=0,
            sustain_value=1,
            )
    # l.hue = random.random() * 255
    l.hue = .74
    l.saturation = 1
    l.update_rgb()
    # l.simple = True
    # add the light to the network
    dmx3.add_element(l)
    p.elements.append(l)
    osc_dispatcher.add_map('/2/fader2', l, 'hue')


p.start_pos = 12
コード例 #2
0
ファイル: all_random.py プロジェクト: ptone/BirdFish
class CustomColorChanger(LightGroup):
    def trigger(self, sig_intensity, **kwargs):
        for e in self.elements:
            e.hue = random()
            e.update_rgb()
        super(CustomColorChanger, self).trigger(sig_intensity, **kwargs)


p = CustomColorChanger(name="bluechase")
elementid = 0
for i in range(1, 360, 3):
    elementid += 1
    l = RGBLight(
        start_channel=i,
        name="pulse_%s" % elementid,
        attack_duration=1,
        decay_duration=.8,
        release_duration=0,
        sustain_value=0,
    )
    l.hue = random()
    l.saturation = 1
    l.update_rgb()
    # l.simple = True
    # add the light to the network
    dmx3.add_element(l)
    p.elements.append(l)

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)
コード例 #3
0
ファイル: simple_colorshift.py プロジェクト: ptone/BirdFish
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")

# 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)
コード例 #4
0
ファイル: solriser_working.py プロジェクト: thosmos/SolRiser
#dispatcher.add_trigger('/1/push1', single)

#p = PulseChase(name="greenpulse",
#        start_pos=1,
#        end_pos=12,
#        speed=3,
#        move_tween=tween.IN_OUT_CUBIC,
#        )
#
elementid = 0
for i in range(1, 27, 3):
    elementid += 1
    l = RGBLight(
        start_channel=i,
        name="pulse_%s" % elementid,
        attack_duration=0,
        release_duration=0,
        sustain_value=1,
        #simple=True
    )
    #l.hue = random.random() # * 255
    l.hue = .74
    l.saturation = 1
    l.update_rgb()
    show.add_element(l, network=dmx)
    #l.simple = True
    # add the light to the network
    #dmx.add_element(l)
    #p.elements.append(l)
    dispatcher.add_map('/1/fader1', l, 'hue')
    dispatcher.add_map('/1/fader2', l, 'intensity')
    #    l.effects.append(pulser)
コード例 #5
0
ファイル: simpleRGB.py プロジェクト: ptone/BirdFish
# 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")
osc_dispatcher = OSCDispatcher(('0.0.0.0', 8998))

# create a single RGB light element
single = RGBLight(
    start_channel=10,
    name="singletestb",
    attack_duration=0,
    decay_duration=0,
    release_duration=.75,
    sustain_value=1,
)
single.hue = random.random()
single.saturation = 1
single.update_rgb()
single.bell_mode = True

oscsingle = RGBLight(
    start_channel=91,
    name="singletestb",
    attack_duration=0,
    decay_duration=0,
    release_duration=.75,
    sustain_value=1,
コード例 #6
0
ファイル: all_random.py プロジェクト: ptone/BirdFish
class CustomColorChanger(LightGroup):
    def trigger(self, sig_intensity, **kwargs):
        for e in self.elements:
            e.hue = random()
            e.update_rgb()
        super(CustomColorChanger, self).trigger(sig_intensity, **kwargs)

p = CustomColorChanger(name="bluechase")
elementid = 0
for i in range(1,360,3):
    elementid += 1
    l = RGBLight(
            start_channel=i,
            name="pulse_%s" % elementid,
            attack_duration=1,
            decay_duration=.8,
            release_duration=0,
            sustain_value=0,
            )
    l.hue = random()
    l.saturation = 1
    l.update_rgb()
    # l.simple = True
    # add the light to the network
    dmx3.add_element(l)
    p.elements.append(l)



show.add_element(p)
# set the input interface to trigger the element
コード例 #7
0
ファイル: chase.py プロジェクト: ptone/BirdFish
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
    # l.simple = True
    # add the light to the network
    dmx3.add_element(l)
    simple.elements.append(l)


simple.start_pos = 12
# p.left_width = p.right_width = 10
コード例 #8
0
ファイル: fireball.py プロジェクト: ptone/BirdFish
# 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")
# 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
コード例 #9
0
ファイル: simpleRGB.py プロジェクト: ptone/BirdFish
# 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")
osc_dispatcher = OSCDispatcher(('0.0.0.0', 8998))

# create a single RGB light element
single = RGBLight(
        start_channel=10,
        name="singletestb",
        attack_duration=0,
        decay_duration=0,
        release_duration=.75,
        sustain_value=1,
        )
single.hue = random.random()
single.saturation = 1
single.update_rgb()
single.bell_mode = True

oscsingle = RGBLight(
        start_channel=91,
        name="singletestb",
        attack_duration=0,
        decay_duration=0,
        release_duration=.75,
        sustain_value=1,
コード例 #10
0
ファイル: chase.py プロジェクト: ptone/BirdFish
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
    # l.simple = True
    # add the light to the network
    dmx3.add_element(l)
    simple.elements.append(l)

simple.start_pos = 12
# p.left_width = p.right_width = 10
simple.speed = .5
コード例 #11
0
ファイル: simple_colorshift.py プロジェクト: ptone/BirdFish
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")

# 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)