Ejemplo n.º 1
0
# 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)


Ejemplo n.º 2
0
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
try:
    show.run_live()
except KeyboardInterrupt:
    # cleanup
    dispatcher.stop()
    osc_dispatcher.stop()
    sys.exit(0)
Ejemplo n.º 3
0
#p.left_width = 1
#p.right_width = 1
#p.left_shape = p.right_shape = tween.OUT_CIRC
#p.speed = 3
#p.moveto = p.end_pos = 12
##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)
#dispatcher.add_map('/1/fader1', p, 'speed', in_range=(0,1), out_range=(.5, 10))
#
##dispatcher.add_trigger('/1/push1', p)
#dispatcher.add_trigger('/1/toggle1', p)

# startup the midi communication - runs in its own thread
# dispatcher.start()
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()
    dispatcher.stop()
    sys.exit(0)
Ejemplo n.º 4
0
    dispatcher.add_trigger('/global/active', l)
    dispatcher.add_trigger('/1/push1', l)
    #dispatcher.add_trigger('/global/active', l)

#    if i in range(12,21):
#        raySwiper.add_element(l)

dispatcher.add_map('/global/speed', hueShift, 'speed')
dispatcher.add_map('/1/fader2', hueShift, 'speed')


inners = [15, 13, 12, 14, 16]
outers = [20, 18, 17, 19, 21]


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

# start the show in a try block so that we can catch ^C and stop the midi
# dispatcher thread
try:
    show.run()
except KeyboardInterrupt:
    # cleanup
    # dispatcher.stop()
    dispatcher.stop()
    sys.exit(0)