Exemplo n.º 1
0
        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)
Exemplo n.º 2
0
            )
    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)

chase.end_pos = 70
chase.speed = 3

show.add_element(chase)

# 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)  #Q
dispatcher.add_observer((0, 70), chase)  #J

# 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)
Exemplo n.º 3
0

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:
    # cleanup
    dispatcher.stop()
    osc_dispatcher.stop()
    sys.exit(0)
Exemplo n.º 4
0
# 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)

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


Exemplo n.º 5
0
    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()

# 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)
Exemplo n.º 6
0
    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,
            )
    l.hue = .54
Exemplo n.º 7
0
    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()

# 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)
Exemplo n.º 8
0
    )
    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)

chase.end_pos = 70
chase.speed = 3

show.add_element(chase)

# 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)  #Q
dispatcher.add_observer((0, 70), chase)  #J

# 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)
Exemplo n.º 9
0
    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,
    )
    l.hue = .54
    l.saturation = 1