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

#
#
#p.start_pos = 1
## p.left_width = p.right_width = 10
#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)
#
Exemplo n.º 2
0
osc_dispatcher = OSCDispatcher(('0.0.0.0', 8998))

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

# set the input interface to trigger the element
# midi code 41 is the "Q" key on the qwerty keyboard for the midikeys app
midi_dispatcher.add_observer((0, 41), single)
osc_dispatcher.add_trigger('/elements/push2', single)

# startup the midi communication - runs in its own thread
midi_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
    midi_dispatcher.stop()
    osc_dispatcher.stop()
    sys.exit(0)
Exemplo n.º 3
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
try:
    show.run_live()
except KeyboardInterrupt:
Exemplo n.º 4
0
show.networks.append(dmx3)

# create an input interface
midi_dispatcher = MidiDispatcher("MidiKeys")
osc_dispatcher = OSCDispatcher(("0.0.0.0", 8998))


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

# set the input interface to trigger the element
# midi code 41 is the "Q" key on the qwerty keyboard for the midikeys app
midi_dispatcher.add_observer((0, 41), single)
osc_dispatcher.add_trigger("/elements/push2", single)

# startup the midi communication - runs in its own thread
midi_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
    midi_dispatcher.stop()
    osc_dispatcher.stop()
    sys.exit(0)
Exemplo n.º 5
0
        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
try:
    show.run_live()
except KeyboardInterrupt:
    # cleanup
    dispatcher.stop()
    osc_dispatcher.stop()
Exemplo n.º 6
0
    show.add_element(l, network=dmx)
    hueShift.add_element(l)

    # add the light to the network
    #dmx.add_element(l)
    #p.elements.append(l)

    dispatcher.add_map('/global/intensity', l, 'intensity')
    dispatcher.add_map('/1/fader1', l, 'intensity')
    dispatcher.add_map('/global/hue', l, 'hue')
    #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('/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
Exemplo n.º 7
0
    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)

#
#
#p.start_pos = 1
## p.left_width = p.right_width = 10
#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)
#
Exemplo n.º 8
0
    show.add_element(l, network=dmx)
    hueShift.add_element(l)

    # add the light to the network
    #dmx.add_element(l)
    #p.elements.append(l)

    dispatcher.add_map('/global/intensity', l, 'intensity')
    dispatcher.add_map('/1/fader1', l, 'intensity')
    dispatcher.add_map('/global/hue', l, 'hue')
    #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('/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()