Was up until 1:00 working on a lighting synchronization program in C# (what will become the basis for Concertroid’s lighting synchronization system) whose purpose is to play an audio file and send commands to stage lights via DMX simultaneously. I’m using Chauvet Intimidator Spot LED 250 fixtures with an ENTTEC USB DMX Pro MKII controller. The original purpose for the system was to power a concert I was planning, although I am hoping to debut the technology at a Halloween party in a couple of weeks (a couple of weeks?! and I just finished a very rudimentary synchronization app?! with only one song’s lighting sequence finished that I consider “good”… I must be insane…)
I still need to learn more about properly managing multiple threads running asynchronously. I have to figure out what is the best way to indicate what time the next frame of lighting commands should be sent to the DMX controller. Right now, it’s working fine, but the slightest delay will cause it to go out of sync because the lighting thread is timing based on subtracting the current time from the time it was started.
Hey, I wrote this in one night, it’s not perfect. At least it plays music and controls lights My goal is to modify the audio engine with a function that retrieves a timestamp based on the current audio frame. This will ensure that the timestamp only reflects the exact time of the audio thread, regardless of whether the application is paused or not. Depending on how much delay this may (or may not) introduce, I might consider adding an event handler for a “tick” event that gets called every time the timestamp changes (so the lighting thread doesn’t have to poll the audio thread for the timestamp).
Eventually I would like to design a 100%-independent multiple thread coordination system that will assist with controlling lights, animations, and audio playback all simultaneously.