Пример #1
0
dispatcher = MidiDispatcher("MidiKeys")
osc_dispatcher = OSCDispatcher(('0.0.0.0', 8998))

# create a single RGB light element
single = RGBLight(
    start_channel=10,
    name="singletestb",
    attack_duration=0,
    decay_duration=0,
    release_duration=.75,
    sustain_value=1,
)
single.hue = random.random()
single.saturation = 1
single.update_rgb()
single.bell_mode = True

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
Пример #2
0
dispatcher = MidiDispatcher("MidiKeys")
osc_dispatcher = OSCDispatcher(('0.0.0.0', 8998))

# create a single RGB light element
single = RGBLight(
        start_channel=10,
        name="singletestb",
        attack_duration=0,
        decay_duration=0,
        release_duration=.75,
        sustain_value=1,
        )
single.hue = random.random()
single.saturation = 1
single.update_rgb()
single.bell_mode = True

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

Пример #3
0
simple = Chase(name="simplechase")
elementid = 0
for i in range(1, 360, 3):
    elementid += 1
    l = RGBLight(
            start_channel=i,
            name="item_%s" % elementid,
            attack_duration=0,
            decay_duration=0,
            release_duration=0,
            sustain_value=1,
            )
    l.hue = .59
    l.saturation = 1
    l.update_rgb()
    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
Пример #4
0
simple = Chase(name="simplechase")
elementid = 0
for i in range(1, 360, 3):
    elementid += 1
    l = RGBLight(
        start_channel=i,
        name="item_%s" % elementid,
        attack_duration=0,
        decay_duration=0,
        release_duration=0,
        sustain_value=1,
    )
    l.hue = .59
    l.saturation = 1
    l.update_rgb()
    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)