from datetime import datetime from typing import List, Dict, Callable from timed_events_data import get_timed_events from PyDMXControl import Colors from PyDMXControl.controllers import uDMXController as Controller from PyDMXControl.effects.Color import Color_Chase from PyDMXControl.profiles.Stairville import LED_Par_10mm, LED_Par_36 from PyDMXControl.profiles.funGeneration import LED_Pot_12_RGBW # This is my home setup, which also acts as a great demo of some of what this library is capable of doing. # See the tests directory for other recent/new features that I've possibly been working on. # Create our controller dmx = Controller() # Load some fixtures from JSON dmx.json.load_config('json/home.json') # Define some custom colors and a global fade time custom_blue = [0, 16, 255, 0] custom_blue_2 = [0, 160, 255, 0] custom_snow = [32, 48, 255, 0] custom_cyan = [0, 128, 255, 0] custom_cyan_2 = [0, 255, 64, 0] custom_white = [255, 255, int(255 * 0.8), 255] flood_white = [255, int(255 * 0.9), int(255 * 0.7)] fade_time = 5000
from time import sleep from timed_events_data import get_timed_events from PyDMXControl.controllers import uDMXController as Controller # Create controller and events dmx = Controller(suppress_dmx_value_warnings=True) # Load some fixtures from JSON dmx.json.load_config('json/home.json') # Pause/play testing """ from time import sleep player.set_volume(0) player.set_volume(1, 5000) player.play("you-will-be-found.mp3") print("playing") sleep(10) player.pause() print("paused") sleep(3) player.unpause() print("unpaused") sleep(5) player.stop() print("stopped") sleep(5) """
from time import sleep from PyDMXControl import Colors from PyDMXControl.controllers import uDMXController as Controller from PyDMXControl.effects.Color import Chase from PyDMXControl.effects.Intensity import Dim from PyDMXControl.profiles.funGeneration import LED_Pot_12_RGBW from PyDMXControl.profiles.Stairville import LED_Par_10mm, LED_Par_36 dmx = Controller() # Fixtures dmx.add_fixture(LED_Par_10mm) dmx.add_fixture(LED_Par_36) dmx.add_fixture(LED_Par_36) dmx.add_fixture(LED_Par_36) dmx.add_fixture(LED_Par_36) dmx.add_fixture(LED_Pot_12_RGBW) dmx.add_fixture(LED_Pot_12_RGBW) # Dim all up dmx.all_locate() # Test color chase Chase.group_apply( dmx.get_all_fixtures(), 1000, colors=[Colors.Red, Colors.Yellow, Colors.Green, Colors.Blue]) # Wait then clear sleep(15)
from PyDMXControl.controllers import uDMXController as Controller # Create our controller dmx = Controller() # Load fixture in from json dmx.load_json_config('tests/json/load.json') # Check fixture was loaded dmx.all_locate() # Save fixture back to json print(dmx.save_json_config('tests/json/save.json')) # Start console debug for testing dmx.debug_control() # Close the controller once we're done dmx.sleep_till_enter() dmx.close()
from datetime import datetime from PyDMXControl import Colors from PyDMXControl.controllers import uDMXController as Controller from PyDMXControl.profiles.Eyourlife import Small_Flat_Par from PyDMXControl.profiles.Stairville import LED_Par_10mm, LED_Par_36 # This is my home setup, which also acts as a great demo of some of what this library is capable of doing. # See the tests directory for other recent/new features that I've possibly been working on. # Create our controller dmx = Controller() # Load some fixtures from JSON dmx.load_json_config('tests/json/home.json') """ dmx.add_fixture(LED_Par_10mm, name="Flood") dmx.add_fixture(LED_Par_36, name="S1 Art Left") dmx.add_fixture(LED_Par_36, name="S2 Board") dmx.add_fixture(LED_Par_36, name="S3 Art Right") dmx.add_fixture(LED_Par_36, name="S4 Books") dmx.add_fixture(Small_Flat_Par, name="F1 Desk Right") dmx.add_fixture(Small_Flat_Par, name="F2 Desk Left") """ # Define all the methods the callback will use custom_blue = [0, 16, 255] custom_white = [255, 140, 70]
from PyDMXControl.controllers import uDMXController as Controller from PyDMXControl.profiles.Eyourlife import Small_Flat_Par from PyDMXControl.profiles.Stairville import LED_Par_10mm, LED_Par_36 dmx = Controller() # Fixtures dmx.add_fixture(LED_Par_10mm) dmx.add_fixture(LED_Par_36) dmx.add_fixture(LED_Par_36) dmx.add_fixture(LED_Par_36) dmx.add_fixture(LED_Par_36) dmx.add_fixture(Small_Flat_Par) dmx.add_fixture(Small_Flat_Par) # Web Debug dmx.web_control() # Dim all up dmx.all_locate() # Done dmx.sleep_till_enter() dmx.close()
from timed_events_data import get_timed_events from PyDMXControl.controllers import uDMXController as Controller # Create controller and events dmx = Controller(suppress_dmx_value_warnings=True) # Load some fixtures from JSON dmx.json.load_config('json/home.json') # Get the timed events (contains the audio) events = get_timed_events(dmx) # Web Debug dmx.web_control(timed_events={"you-will-be-found": events}) # Done dmx.sleep_till_enter() dmx.close()
from PyDMXControl.controllers import uDMXController as Controller from PyDMXControl.effects.Intensity import Dim from PyDMXControl.profiles.Eyourlife import Small_Flat_Par from PyDMXControl.profiles.Stairville import LED_Par_10mm, LED_Par_36 dmx = Controller() # Fixtures dmx.add_fixture(LED_Par_10mm) dmx.add_fixture(LED_Par_36) dmx.add_fixture(LED_Par_36) dmx.add_fixture(LED_Par_36) dmx.add_fixture(LED_Par_36) dmx.add_fixture(Small_Flat_Par) dmx.add_fixture(Small_Flat_Par) def strobe(): dmx.all_off() Dim.group_apply(dmx.get_all_fixtures(), 50) def clear(): dmx.all_locate() dmx.clear_all_effects() # Web Debug dmx.web_control( callbacks={ "strobe": strobe,
from PyDMXControl.controllers import uDMXController as Controller # Create our controller dmx = Controller() # Load fixture in from json dmx.json.load_config('json/load.json') # Check fixture was loaded dmx.all_locate() # Save fixture back to json print(dmx.json.save_config('json/save.json')) # Start console debug for testing dmx.debug_control() # Close the controller once we're done dmx.sleep_till_enter() dmx.close()
from datetime import datetime from PyDMXControl import Colors from PyDMXControl.controllers import uDMXController as Controller from PyDMXControl.profiles.Eyourlife import Small_Flat_Par from PyDMXControl.profiles.Stairville import LED_Par_10mm, LED_Par_36 # This is my home setup, which also acts as a great demo of some of what this library is capable of doing. # See the tests directory for other recent/new features that I've possibly been working on. # Create our controller dmx = Controller() # Create some fixtures (auto insert at next chan) dmx.add_fixture(LED_Par_10mm, name="Flood") dmx.add_fixture(LED_Par_36, name="S1 Art Left") dmx.add_fixture(LED_Par_36, name="S2 Board") dmx.add_fixture(LED_Par_36, name="S3 Art Right") dmx.add_fixture(LED_Par_36, name="S4 Books") dmx.add_fixture(Small_Flat_Par, name="F1 Desk Right") dmx.add_fixture(Small_Flat_Par, name="F2 Desk Left") # Define all the methods the callback will use def standard_lights(): dmx.get_fixture(1).set_channels(Colors.Black, 0, 0, 0, 0) dmx.get_fixture(2).set_channels(0, Colors.Black, 0, 0) dmx.get_fixture(3).set_channels(0, Colors.Black, 0, 0)
from PyDMXControl import Colors from PyDMXControl.audio import player from PyDMXControl.controllers import uDMXController as Controller from PyDMXControl.effects.Color import Chase from PyDMXControl.profiles.Eyourlife import Small_Flat_Par from PyDMXControl.profiles.Stairville import LED_Par_36, LED_Par_10mm from PyDMXControl.utils.timing import TimedEvents # Create controller and events dmx = Controller(suppress_dmx_value_warnings=True) events = TimedEvents(True) # Load some fixtures from JSON dmx.load_json_config('tests/json/home.json') # Pause/play testing """ from time import sleep player.set_volume(0) player.set_volume(1, 5000) player.play("tests/you-will-be-found.mp3") print("playing") sleep(10) player.pause() print("paused") sleep(3) player.unpause() print("unpaused") sleep(5) player.stop()