SlideShare a Scribd company logo
1 of 12
Download to read offline
Spotlight on. Python
  Python for realtime control
       of stage lighting
 Nic Cave-Lynch – Tymar Lighting
Spotlight on. Python

    The problem

    Current architecture

    Version 2 architecture

    DMX Engine

    RDDD (Rubber Duck Driven Development)

    Observations
The problem

    Lighting bands, typically in small-ish venues

    DMX: 40 updates/second, 200-500 channels

    Moving lights (HTP/LTP)

    Music usually new to me
'Busking' in 4 dimensions
Enhance the music
Enhance the show
Current architecture

Input wing:    serial   asynchat      DMX engine       asynchat   USB     DMX
  faders                 gathers      HTP/LTP ->        sends
                                                                        generator
  buttons               wing input   channel value       DMX



              USB         (fcntl)
                                     moving light      Mimic
 trackball               capture
                                      manager        (wxPython)
                        trackball
Version 2 architecture

              USB/                                                                USB/
Input wing:   serial/
                                      ZeroMQ                ZeroMQ     DMX        serial/
   faders      MIDI     Input wing              DMX                                Wifi       DMX
                                                                     generator
   buttons               controller   struct   engine       struct                          generator
                                                                     controller
 trackballs

                         ZeroMQ                  ZeroMQ
                         protocol                protocol
                          buffers                buffers




                             Config UI / mimic
DMX Engine
   Engine()
     –   Holders for Valgens, Scenelets, Fixtures
     –   dispatches zmq messages from wing/UI

   Valgens know which Scenelets they drive

   Scenelet sends multiple of Valgen value to Fixture channels

   Fixture has channel for each aspect of the light
     –   output function eg calculate pan/tilt values from (x,y,z)

   Speed important:
     –   reduce lookups
     –   integer dict keys
     –   Valgen->Scenelet->Fixture single function call
     –   struct module
RDDD

    Architecture took ages

    Rubber Duck Driven Development

    "make something that doesn't work"
Observations

    Unit tests inhibit experimentation

    Deciding to Open Source can be an inhibitor

    Spoilt for choice in libraries/frameworks/etc.
     
         Analysis paralysis


    Surprising results in some performance areas
     
         struct module
     
         string/integer dict keys


    I hate OpenOffice.org Impress 3.2: it's barely useable
For more live Python action

              200 metres from dinner venue:

               ●   Left out of Tulsi

               ●   20 metres to Guznee St

               ●   Right up Ghuznee St

               ●   One block up

               ●   Straight over traffic lights

               ●   Bodega is on the left

More Related Content

Similar to Spotlight on Python

Introduction to Vortex86EX Motion Control Modules
Introduction to Vortex86EX Motion Control ModulesIntroduction to Vortex86EX Motion Control Modules
Introduction to Vortex86EX Motion Control Modules
roboard
 
Sony Anycast AWS-G500E
Sony Anycast AWS-G500ESony Anycast AWS-G500E
Sony Anycast AWS-G500E
AV ProfShop
 
Introduction To Fusion Widescreen 01
Introduction To Fusion Widescreen 01Introduction To Fusion Widescreen 01
Introduction To Fusion Widescreen 01
Chris Prosio
 
Sound Devices 788T
Sound Devices 788TSound Devices 788T
Sound Devices 788T
AV ProfShop
 
Usb Controlled Function Generator
Usb Controlled Function GeneratorUsb Controlled Function Generator
Usb Controlled Function Generator
Kent Schonert
 

Similar to Spotlight on Python (20)

Introduction to Vortex86EX Motion Control Modules
Introduction to Vortex86EX Motion Control ModulesIntroduction to Vortex86EX Motion Control Modules
Introduction to Vortex86EX Motion Control Modules
 
Sony Anycast AWS-G500E
Sony Anycast AWS-G500ESony Anycast AWS-G500E
Sony Anycast AWS-G500E
 
Programmable Rf Attenuation Project
Programmable Rf Attenuation ProjectProgrammable Rf Attenuation Project
Programmable Rf Attenuation Project
 
OSC and DMXControl
OSC and DMXControlOSC and DMXControl
OSC and DMXControl
 
dmx master controller DMX-N02
dmx master controller DMX-N02dmx master controller DMX-N02
dmx master controller DMX-N02
 
Videoconference introduction
Videoconference introductionVideoconference introduction
Videoconference introduction
 
Dvr 3104 fp
Dvr 3104 fpDvr 3104 fp
Dvr 3104 fp
 
Dvr 3104 fp
Dvr 3104 fpDvr 3104 fp
Dvr 3104 fp
 
Video Drivers
Video DriversVideo Drivers
Video Drivers
 
TinyML - 4 speech recognition
TinyML - 4 speech recognition TinyML - 4 speech recognition
TinyML - 4 speech recognition
 
Multicast tutorial v3
Multicast tutorial v3Multicast tutorial v3
Multicast tutorial v3
 
Mp3 player project presentation
Mp3 player project presentationMp3 player project presentation
Mp3 player project presentation
 
Direct Out Technologies Andiamo.MC
Direct Out Technologies Andiamo.MCDirect Out Technologies Andiamo.MC
Direct Out Technologies Andiamo.MC
 
Gnu Radio and the Universal Software Radio Peripheral
Gnu Radio and the Universal Software Radio PeripheralGnu Radio and the Universal Software Radio Peripheral
Gnu Radio and the Universal Software Radio Peripheral
 
Introduction To Fusion Widescreen 01
Introduction To Fusion Widescreen 01Introduction To Fusion Widescreen 01
Introduction To Fusion Widescreen 01
 
Kramer 788T
Kramer 788TKramer 788T
Kramer 788T
 
Sound Devices 788T
Sound Devices 788TSound Devices 788T
Sound Devices 788T
 
Usb Controlled Function Generator
Usb Controlled Function GeneratorUsb Controlled Function Generator
Usb Controlled Function Generator
 
Isa scada overview
Isa scada overviewIsa scada overview
Isa scada overview
 
Technical Proposal - Public Address
Technical Proposal - Public AddressTechnical Proposal - Public Address
Technical Proposal - Public Address
 

More from dn

More from dn (8)

Code quality; patch quality
Code quality; patch qualityCode quality; patch quality
Code quality; patch quality
 
How does this code work?
How does this code work?How does this code work?
How does this code work?
 
Python worst practices
Python worst practicesPython worst practices
Python worst practices
 
Struggling to find an open source business model
Struggling to find an open source business modelStruggling to find an open source business model
Struggling to find an open source business model
 
Testing in those hard to reach places
Testing in those hard to reach placesTesting in those hard to reach places
Testing in those hard to reach places
 
Automated testing in Python and beyond
Automated testing in Python and beyondAutomated testing in Python and beyond
Automated testing in Python and beyond
 
Behaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About TestingBehaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About Testing
 
Patterns in Python
Patterns in PythonPatterns in Python
Patterns in Python
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 

Spotlight on Python

  • 1. Spotlight on. Python Python for realtime control of stage lighting Nic Cave-Lynch – Tymar Lighting
  • 2. Spotlight on. Python  The problem  Current architecture  Version 2 architecture  DMX Engine  RDDD (Rubber Duck Driven Development)  Observations
  • 3. The problem  Lighting bands, typically in small-ish venues  DMX: 40 updates/second, 200-500 channels  Moving lights (HTP/LTP)  Music usually new to me
  • 4. 'Busking' in 4 dimensions
  • 7. Current architecture Input wing: serial asynchat DMX engine asynchat USB DMX faders gathers HTP/LTP -> sends generator buttons wing input channel value DMX USB (fcntl) moving light Mimic trackball capture manager (wxPython) trackball
  • 8. Version 2 architecture USB/ USB/ Input wing: serial/ ZeroMQ ZeroMQ DMX serial/ faders MIDI Input wing DMX Wifi DMX generator buttons controller struct engine struct generator controller trackballs ZeroMQ ZeroMQ protocol protocol buffers buffers Config UI / mimic
  • 9. DMX Engine  Engine() – Holders for Valgens, Scenelets, Fixtures – dispatches zmq messages from wing/UI  Valgens know which Scenelets they drive  Scenelet sends multiple of Valgen value to Fixture channels  Fixture has channel for each aspect of the light – output function eg calculate pan/tilt values from (x,y,z)  Speed important: – reduce lookups – integer dict keys – Valgen->Scenelet->Fixture single function call – struct module
  • 10. RDDD  Architecture took ages  Rubber Duck Driven Development  "make something that doesn't work"
  • 11. Observations  Unit tests inhibit experimentation  Deciding to Open Source can be an inhibitor  Spoilt for choice in libraries/frameworks/etc.  Analysis paralysis  Surprising results in some performance areas  struct module  string/integer dict keys  I hate OpenOffice.org Impress 3.2: it's barely useable
  • 12. For more live Python action 200 metres from dinner venue: ● Left out of Tulsi ● 20 metres to Guznee St ● Right up Ghuznee St ● One block up ● Straight over traffic lights ● Bodega is on the left