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

#
#
#p.start_pos = 1
## p.left_width = p.right_width = 10
#p.left_width = 1
#p.right_width = 1
Ejemplo n.º 4
0
        )

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()
    sys.exit(0)
Ejemplo n.º 5
0
    #l.hue = .74

    l.hue = (1.0 / NUM_CHANNELS) * (NUM_CHANNELS - (i - 1.0))
    l.intensity = 1
    l.saturation = 1

    #l.update_rgb()

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

#
#
#p.start_pos = 1
## p.left_width = p.right_width = 10
#p.left_width = 1
#p.right_width = 1 
Ejemplo n.º 8
0
    #l.hue = .74

    l.hue = (1.0 / NUM_CHANNELS) * (NUM_CHANNELS - (i - 1.0))
    l.intensity = 1
    l.saturation = 1

    #l.update_rgb()

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