示例#1
0
        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)

# 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()
except KeyboardInterrupt:
    # cleanup
    dispatcher.stop()
    sys.exit(0)
示例#2
0
# 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)

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
示例#3
0
文件: pulse.py 项目: ptone/BirdFish
    # 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
# p.left_width = p.right_width = 10
p.left_width = 10
p.right_width = 10
p.left_shape = p.right_shape = tween.OUT_CIRC
p.speed = 3
p.moveto = p.end_pos = 65
p.trigger_toggle = True

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)
osc_dispatcher.add_map('/elements/fader1', p, 'speed', in_range=(0,4), out_range=(.5, 10))

# startup the midi communication - runs in its own thread
dispatcher.start()
osc_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()
except KeyboardInterrupt:
示例#4
0
# add the network to the show
show.networks.append(dmx3)

# create an input interface
dispatcher = MidiDispatcher("MidiKeys")

# create a single channel light element
single = LightElement(
        start_channel=1,
        name="singletest",
        attack_duration=1,
        release_duration=1.5,
        )

# add the light to a network
show.add_element(single, network=dmx3)

# a blinker is configured by how many times it should blink per second
# 2 is the default
blinker = Blink(frequency=3)

# we tell the blinker what elements it should effect
blinker.targets.append(single)

# we add the blinker to the shows effects
show.effects.append(blinker)

# set the input interface to trigger the element
# midi code 41 is the "Q" key on the qwerty keyboard for the midikeys app
dispatcher.add_observer((0,41),single)
示例#5
0
文件: doors.py 项目: ptone/BirdFish
    l = RGBLight(
        start_channel=i,
        name="pulse_%s" % elementid,
        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)
示例#6
0
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)

    # set the input interface to trigger the element
    # midi code 41 is the "Q" key on the qwerty keyboard for the midikeys app
    #dispatcher.add_observer((0,41), single)
    dispatcher.add_trigger('/1/push1', l)
    dispatcher.add_trigger('/1/toggle1', l)

#
示例#7
0
for i in range(1, 180, 3):
    # for i in range(1,2):
    elementid += 1
    l = RGBLight(
        start_channel=i,
        name="pulse_%s" % elementid,
        attack_duration=0,
        release_duration=0,
        sustain_value=1,
    )
    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
示例#8
0
文件: chase.py 项目: ptone/BirdFish
    # 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
simple.moveto = simple.end_pos = 65
# simple.continuation_mode = 'loop'
# simple.trigger_toggle = True
simple.sweep = False
simple.width = 3

show.add_element(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), simple)  # J


p = Chase(name="bluechase")
elementid = 0
for i in range(1, 360, 3):
    elementid += 1
    l = RGBLight(
            start_channel=i,
            name="pulse_%s" % elementid,
            attack_duration=.3,
            decay_duration=0,
            release_duration=.4,
示例#9
0
文件: doors.py 项目: ptone/BirdFish
    l = RGBLight(
            start_channel=i,
            name="pulse_%s" % elementid,
            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)
示例#10
0
for i in range(1,180,3):
# for i in range(1,2):
    elementid += 1
    l = RGBLight(
            start_channel=i,
            name="pulse_%s" % elementid,
            attack_duration=0,
            release_duration=0,
            sustain_value=1,
            )
    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)
示例#11
0
oscsingle = RGBLight(
        start_channel=91,
        name="singletestb",
        attack_duration=0,
        decay_duration=0,
        release_duration=.75,
        sustain_value=1,
        )

oscsingle.hue = random.random()
oscsingle.saturation = 1
oscsingle.update_rgb()


# add the light to a network
show.add_element(single, network=dmx3)
show.add_element(oscsingle, network=dmx3)

# set the input interface to trigger the element
# midi code 41 is the "Q" key on the qwerty keyboard for the midikeys app
dispatcher.add_observer((0, 41),single)
osc_dispatcher.add_trigger('/2/toggle2', oscsingle)
osc_dispatcher.add_map('/2/fader2', oscsingle, 'hue')
osc_dispatcher.add_map('/elements/fader1', oscsingle, 'saturation', in_range=(0,4))

# startup the midi communication - runs in its own thread
dispatcher.start()
osc_dispatcher.start()

# start the show in a try block so that we can catch ^C and stop the midi
# dispatcher thread
示例#12
0
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)

    # set the input interface to trigger the element
    # midi code 41 is the "Q" key on the qwerty keyboard for the midikeys app
    #dispatcher.add_observer((0,41), single)
    dispatcher.add_trigger('/1/push1', l)
    dispatcher.add_trigger('/1/toggle1', l)

#
示例#13
0
文件: chase.py 项目: ptone/BirdFish
    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
simple.moveto = simple.end_pos = 65
# simple.continuation_mode = 'loop'
# simple.trigger_toggle = True
simple.sweep = False
simple.width = 3

show.add_element(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), simple)  # J

p = Chase(name="bluechase")
elementid = 0
for i in range(1, 360, 3):
    elementid += 1
    l = RGBLight(
        start_channel=i,
        name="pulse_%s" % elementid,
        attack_duration=.3,
        decay_duration=0,
        release_duration=.4,
        sustain_value=1,