Controller integration; time code, midi, osc...

Steve Ratcliffe

New elf
Joined
Nov 26, 2018
Messages
4
Hi All,

Just wondering if it’s possible to output time code, midi or osc from either vixen or xLights? I’d like to use my lighting console to program moving lights and other effects items, and have the sequencer fire the cues on the console at the relevant points, anyone done much along these lines?

Many Thanks, Steve.
 

keithsw1111

Senior elf
Joined
Oct 11, 2012
Messages
589
Location
Kellyville, NSW
Xlights can from its scheduler. It’s probably not the most tested code but we are happy to work with you to get it working.
 

Steve Ratcliffe

New elf
Joined
Nov 26, 2018
Messages
4
Thanks Keith, I'm not sure its something ill have time to integrate into the actual show this year, but would be good to experiment over Christmas and see how it could work for next year.

Can you only output time code when triggering a finished show from the scheduler, or can you get it to output whilst working on a sequence?

Thanks again, Steve.
 

Steve Ratcliffe

New elf
Joined
Nov 26, 2018
Messages
4
Hi again Keith, is the offer of some collaboration over time code in xlights still possible? I think we’ve discussed this on other forums since, and I’ve had some conversations with others (who’ve been less helpful/fairly negative on the whole subject really) - but I’m keen to give this a whirl and fully explore/test the functionality.

I have a couple of other guys from pro lighting circles interested in working on this as a project, one of which knows time code/midi show control/osc etc inside out, and we have some “tinkering time” over our summer maintenance period to give it some attention.

Cheers, Steve.
 

worends

New elf
Joined
Nov 18, 2019
Messages
5
Has any progress been made to get MIDI Timecode working as an input to (remote) or output from
(master) xScheduler? We are trying to get the scenario described above working for our Christmas show.

We are using xLights/xScheduler to control the RGB LED pixels and a Highend Systems Hog 4 PC to control moving lights. I can confirm that the Hog 4 PC successfully receives MIDI Timecode from the PC running xScheduler using a MTC simulator app (https://www.styletronix.net/Software/MTC/info.aspx). I am sending the MTC signal across rtpMidi (https://www.tobias-erichsen.de/software/rtpmidi.html) using a separate network from the ArtNet network for controlling the RGB LED pixels.

I have tried setting up xScheduler as both a MIDI Timecode master and a remote. As a master, I cannot get it to send MTC to the Hog 4 PC. My assumption is that it would start the MTC at 00:00:00.00 when the playlist starts. I have also tried xScheduler as a remote, but I can't figure out how to setup an Event to start a playlist at a certain timecode value or to keep steps of a playlist in sync with MTC.

Any help would be appreciated. We are getting down to the wire to get this connected and working. Other forum posts seem to indicate that setting up xScheduler as a MTC master works, but they mainly end there with no indication of how the individuals got it working.

We are currently running xScheduler v2019.64

Thanks,
David
 

keithsw1111

Senior elf
Joined
Oct 11, 2012
Messages
589
Location
Kellyville, NSW
It works fine in all of my testing. I mostly used timelord as my test and it both sends and receives fine. You are going to need to provide details.
 

worends

New elf
Joined
Nov 18, 2019
Messages
5
Thanks for the quick reply Keith. I don't have much experience with timelord, but I will look into it. Does it act as a virtual midi device when used on the same PC as xScheduler or does it require physical MIDI hardware to be present? Have you used it between two different PCs? If you got it working between two separate PCs, where you using physical USB to MIDI device or have you ever tried using the rtpMIDI over Ethernet? FYI: We are using Windows PCs to run xLights/xScheduler and the Hog 4 PC software, not Mac or Linux.

From what I can tell in the xScheduler log, it is correctly binding to the virtual MIDI device setup by rtpMIDI. However, I only see lines in the log file regarding a MIDI SysEx message. I don't see any debug messages for MTC or MIDI Notes.

I don't know if this forum allows images or not, but it might be helpful if you can post some pictures of the xScheduler setup you used to get it working as a MTC master and a snippet of the log file I would expect if xScheduler is working correctly as a MTC Master. I will post some pictures of our setup when I get home from my regular job tonight as well as post the log file from xScheduler.

Secondary question -- If we do get xScheduler working as a MTC master, is it possible to define the starting MTC value for each step in a playlist. At the very least, would the MTC value start from 00:00:00.00 each time a playlist is started from the beginning? If there are multiple steps in a playlist (different songs) and I start the playlist from the second step in the playlist (e.g. for testing), does the MTC value start at an offset value as-if the first step had played or does it start from 0 as well?
 
Last edited:

worends

New elf
Joined
Nov 18, 2019
Messages
5
Keith,

I've attached a zip file with some captures of the MIDI traffic (used MIDI-OX to get the captures). The zip file also contains the xScheduler log files as well as some screen shots of the setup we are using on the PC with xScheduler installed and a TimeLord show file I used for my testing.

I guess our goal at this point would be to get xScheduler working as a MTC Master. I've noticed that xScheduler forgets the selected MIDI port after a few restarts. I don't know if that is because they are enumerated in a different order or if there is something wrong with xScheduler itself. I tried rebooting the PC to see if that would reduce the listed MIDI devices to what is actually on the PC, but that didn't seem to help. Both MTC Sender and TimeLord correctly showed the list of MIDI devices on the PC.

The only new thing between my first post and today is the use of a MIDI loopback adapter (loopmidi from http://www.tobias-erichsen.de/software/loopmidi.html) This seems to have helped with getting MIDI to loop back to other devices on the same PC, but has not really solved the problem of getting xScheduler to act as the MTC Master and for our Hog 4 PC software to act as the MTC Slave.

I tried sending MTC with xScheduler, MTC Sender, and TimeLord. Both TimeLord and MTC Sender were able to trigger the cue list correctly in Hog 4 PC on the second computer. I was never able to get xScheduler to trigger the cue list in Hog 4 PC. I was able to see, using MIDI-OX that the PC with Hog 4 PC was receiving the MIDI messages. I was also able to see the MTC show up in the "Receive" pane of MTC Sender. However, the "Receive" pane frequently changed colors from green to yellow to red which seemed to indicate that MTC Sender couldn't properly lock onto the signal. When I did the same test with TimeLord and MTC Sender itself, I did not see any dropouts in the MTC Sender "Receive" pane.

Hopefully this provides you the details you need to look into the problem we are having. If not, can you be more specific in what I can provide to assist in diagnosing our problem.

Thanks,
David
 

Attachments

keithsw1111

Senior elf
Joined
Oct 11, 2012
Messages
589
Location
Kellyville, NSW
I am sorry but I dont monitor forum posts so this is going to be a slow conversation as I only stumble across responses every day or two.

There is a lot here to respond to so I will try to answer them.

"I don't have much experience with timelord, but I will look into it. Does it act as a virtual midi device when used on the same PC as xScheduler or does it require physical MIDI hardware to be present?" - It doesnt do either. It talks to either a virtual device you install or it talks to a real device ... just like xSchedule does. I just wanted something other than another xSchedule to test against to ensure we were doing the right thing.

"If you got it working between two separate PCs, where you using physical USB to MIDI device or have you ever tried using the rtpMIDI over Ethernet?" - I dont know anything about rtpMIDI but as long as it looks like a MIDI device to xSchedule it should be ok.

"I don't know if this forum allows images or not, but it might be helpful if you can post some pictures of the xScheduler setup you used to get it working as a MTC master" - I dont have any images to post ... i would have to go back and set it all back up again.

"Secondary question -- If we do get xScheduler working as a MTC master, is it possible to define the starting MTC value for each step in a playlist. At the very least, would the MTC value start from 00:00:00.00 each time a playlist is started from the beginning? " - For all timecodes xSchedule assumes it applies to the first playlist where the first step starts at 00:00:00.00 ... everything is relative to that.

"I've noticed that xScheduler forgets the selected MIDI port after a few restarts " - the only reason i can see that might happen is if its device id changed or it was not there when xSchedule went looking for it.

You can turn on additional logging by changing the following line in xschedule.windows.properties in the xlights install directory

log4cpp.category.log_sync=WARN, A1

to

log4cpp.category.log_sync=DEBUG, A1

and restart xSchedule
 

keithsw1111

Senior elf
Joined
Oct 11, 2012
Messages
589
Location
Kellyville, NSW
I looked at your zip file but there is so much there that I have no idea what relates to what and what is trying to prove what so it does not really help.

If you want to resolve this you are going to need to get way more systematic about it.

Like many problem solvers you seem to be throwing everything into the mix and that just makes the actual problem harder to see.

If you want to jump onto zoom some time to work it out i am happy to do so after 5pm my time.
 

worends

New elf
Joined
Nov 18, 2019
Messages
5
Keith,

What is local time for you? I am located in the Central Timezone in the United States (UTC -6:00).

I apologize that the following sections are long and detailed, but I think it is necessary to see the full system scope as well as demonstrate what I believe to be the root cause of the issue.

Attached is an updated zip file with annotated pictures. The color codes on the bullets below correspond to the type of files mentioned the Basic Setup section after the discussion paragraphs below.
  • MIDI captures (MIDI-OX capture files noted below)
  • screen captures of the setup (png files)
  • a TimeLord show file I used for testing (.sho file)
  • and some debug logs from the xLights/xScheduler program
I tried sending MTC with xScheduler, MTC Sender, and TimeLord. Both TimeLord and MTC Sender were able to trigger the cue list correctly in Hog 4 PC on the second computer. I was never able to get xScheduler to trigger the cue list in Hog 4 PC because it seemed like the Hog wouldn't lock onto the MTC signal from xScheduler. I was able to see, using MIDI-OX, that the PC with Hog 4 PC was receiving the MIDI messages from all three programs. I was also able to see the MTC show up in the "Receive" pane of MTC Sender that was running on the same PC as xScheduler. However, the "Receive" pane frequently changed colors from green to yellow to red which seemed to indicate that MTC Sender couldn't properly lock onto the signal. When I did the same test with TimeLord and MTC Sender itself, I did not see any dropouts (color flicker) in the MTC Sender "Receive" pane.

Additionally, I have talked with a few other lighting industry professionals (these are folks running national tours with bands and theater companies) regarding our MIDI Timecode setup. They believe the setup is good as far as the loopback and network setup. The only suggestion they had was to add some blank leader (pre-roll) on our audio tracks to give time for the Hog to sync to the MTC prior to the audio actually starting. I believe I can manage this suggestion by directly editing the audio tracks and adding silence to the beginning of the tracks. Although, the option to specify a pre-roll time for each step as well as the starting value for the MTC generation would be helpful.

************************
Possible root cause
************************

At this point, I'm fairly certain that the timecode sent from xScheduler is not stable enough for the receiving application (Hog 4 PC) to lock onto. This is evidenced by the "MTC Receiver" pane flickering its background color between green, yellow, and red as well as some analysis I did of the MIDI captures and log files.

I did further analysis of the MIDI captures and found that the quarter frame messages do not seem to be sent from xScheduler with the correct spacing. Observe the "DIFF to PREV" column in the attached Excel files. For TimeLord and MTC Sender, the quarter frames were spaced between 7-8 apart. For xScheduler, the quarter frames are on top of each other with 0-1 spacing. This spacing seems to correlate to Timestamp values in the xSchedule log files (xSchedule_l4cpp.log between rows 615 and 4047). I also noticed that there were multiple log lines with a warning that the "frame interval is greater than 200%". I don't know if this warning is related to MIDI or ArtNet. It is important to note that the MIDI capture files were captured on the same PC that was running xScheduler through the local loopback. This reduced or eliminated the timing aspect of rtpMIDI or networking infrastructure to the other PC running the Hog software.
*************************

Basic setup:
  • Two Windows PCs
    • PC #1 runs the Hog 4 PC software for controlling moving lights
      • 2 USB DMX single widgets for controlling moving lights
    • PC #2 runs xLights/xScheduler for controlling LED Pixel tape (pixel mapping)
      • ArtNet output for controlling LED Pixel tape
    • Christmas Room Setup.png
      • This picture shows the connections between the various PCs and lighting equipment
  • Both PCs are connected together over hard wired Ethernet (static IP addresses set on network adapters - not in same range as ArtNet, 192.168.1.x range)
    • USB to Ethernet adapters on both PCs
    • PCs are connected through a Netgear managed switch (GS108E)
    • ArtNet on PC #2 runs out of a separate network port
  • Both PCs run a program called rtpMIDI for sending and receiving MIDI over Ethernet (https://www.tobias-erichsen.de/software/rtpmidi.html)
    • 2019-11-18 22_48_56-rtpMIDI using Apple Bonjour on xScheduler PC.png
      • This picture shows the rtpMIDI application running on PC #2 (the one with xScheduler)
      • The "HogPC" text indicates that PC #1 was discovered on the network and is connected to this instance of rtpMIDI
      • This picture also shows that the loopback MIDI port (xLights Local MIDI) is connected to rtpMIDI
  • A software-based MIDI loopback adapter called loopMIDI (http://www.tobias-erichsen.de/software/loopmidi.html) is used on PC #2 so that multiple programs can talk to each other locally
    • the loopback adapter is connected to rtpMIDI for sending the MIDI over Ethernet
    • 2019-11-18 22_49_54-loopMIDI on xScheduler PC.png
      • This picture shows the name of the local loopback MIDI port (xLights Local MIDI)
      • The name of this port will show up in several other pictures to demonstrate the inputs and outputs are correctly configured across the system
  • I used a program called MIDI-OX (http://www.midiox.com/) for capturing the MIDI traffic on the local loopback adapter of PC #2 as well as the output of rtpMIDI on PC #1
  • We would like to use the xLights/xScheduler program as the MTC source because it is controlling both the audio and LED Pixel tape.
    • 2019-11-18 22_45_59-xLights Scheduler 2019.64 64bit-MTC Set as Master.png
      • This picture shows that xScheduler is correctly configured as MTC Master
    • 2019-11-18 22_46_54-Configure MIDI Timecode.png
      • This picture shows that xScheduler is correctly connected to the loopback output port (xLights Local MIDI)
    • 2019-11-18 23_01_39-xScheduler as master - MTC Sender as receiver.png
      • This picture shows that the MTC Sender application is having trouble locking onto the MTC produced by xLights
      • The MTC Receiver pane in in MTC Sender is red
    • MIDI-OX capture file:
      • MIDILog-xScheduler-master-pretty.txt
      • MIDI Log with xScheduler as Master.xlsx
        • The first column in the Excel File indicates that the spacing between the quarter frames doesn't match that of two other industry standard tools
        • I believe this is the root cause why the Hog software couldn't lock onto the signal and why the MTC Sender software was showing errors in the receive pane of the app.
    • Log Files from xScheduler application
      • xSchedule_l4cpp.log
        • The notable items in this log file are the debug lines for "MIDI Short Message" and "Frame Interval"
        • The Timestamp value at the end of the MIDI Short Message line closely tracks the spacing of the messages seen in the MIDI capture files
          • rows 615-4047
        • The frame interval warning may be related to the incorrect quarter frame message spacing. I have not looked at the xScheduler source code to confirm or deny this hypothesis.
        • It can also be seen that the discovered MIDI devices is not consistent with each program startup
          • rows 173-181
          • rows 278-291
      • xSchedule_l4cpp.log.1
      • xSchedule_l4cpp.log.2
        • MIDI Short Message timestamp values
          • rows 218-9098
          • rows 10043-19409
  • Other MTC software sources I used
    • MTC Simulator (https://www.styletronix.net/Software/MTC/info.aspx)
      • 2019-11-18 22_51_35-MTC Sender - Control Tab on xScheduler PC.png
        • This picture shows the Control Tab of the MTC Sender application
        • The picture has annotations to show what the various parts of the app do and where they get their data
      • 2019-11-18 22_52_22-MTC Sender - Sender tab on xScheduler PC.png
        • This picture shows that the application is connected to the local loopback for sending MTC
        • Another annotation on the picture also shows that there is a check box available to enable a high-precision mode.
          • I use the app in both modes (checked and unchecked) and was able to successfully trigger the Hog 4 PC software to run a cue list.
          • I don't think this setting had any affect on the stability of the generated MTC at least for the short time I ran it for the testing and capturing of traffic.
      • 2019-11-18 22_54_13-MTC Sender - Receiver Tab on xScheduler PC.png
        • This picture shows that the application is connected to the local loopback for receiving MTC
      • MIDI-OX capture file:
        • MIDILog-MTCSender-master-pretty.txt
        • MIDI Log with MTC Sender as Master.xlsx
      • Show File I used for testing: TimeLord - TSO Test.sho
        • The file is just a single cue that generates 1 minute of MTC
    • TimeLord (https://timelord-mtc.com/)
      • 2019-11-18 22_50_46-TimeLord 2.0.17.png
      • 2019-11-18 22_56_14-TimeLord as master - MTC Sender as receiver on xScheduler PC.png
      • MIDI-OX capture file:
        • MIDILog-TimeLord-master-pretty.txt
        • MIDI Log with TimeLord as Master.xlsx
 

Attachments

keithsw1111

Senior elf
Joined
Oct 11, 2012
Messages
589
Location
Kellyville, NSW
I am in Sydney, Australia.

First of all ... let me say that xSchedule is not today a perfect MIDI timecode source ... it sends a midi timestamp once per frame (typically 25 or 50ms) ... nowhere near the full set of codes. Why? well mainly because it is a shed load of overhead. As you see that can cause issues with tools that expect perfectly complete time code. Could it be added sure ... but not at this time of year.

As for the reverse ... consumption of timecode ... xSchedule is much more forgiving ... it basically uses the time code as a check and re-align ... in fact internally it ignores the vast majority of the timecode packets received unless there is a significant time difference between the timecode and where it is up to. This helps prevent jitter in playback and is more sympathetic with some of the other sync protocols ... and to be honest in most situations works perfectly well as it still reacts to jumps but doesnt get distracted by small drifts that no one really notices.

I am happy to work on a more complete implementation in the new year ... but I need someone with the equipment and the commitment to help complete the project ... something i have very limited access to. If there are bug fixes I can look at them but i dont have the time to go redeveloping it right now.

I even have a full SMTPE implementation but that is also untested and not even in the released code right now.

You may find this easier to discuss over zoom if you can find a suitable time.
 

worends

New elf
Joined
Nov 18, 2019
Messages
5
Keith,

Thanks for the follow up on this. To use xSchedule as a source for MIDI timecode, we will need it to more closely follow the protocol and send the updates at the appropriate time. For this year, it looks like we will have to go a different route for our moving lights. We are going to attempt using the xLights DMX model for the time being, but it is not as easy to work with as a real moving light console like the Hog.

We would be happy to assist with validating a new timecode implementation in the coming year. Given the chance, we would like to make use of this for the 2020 Christmas season. When introducing a new feature, is there any formal process that is followed as far as gathering requirements? If so, can you point us to that location and we can begin putting a few ideas in there.

Thanks,
David
 
Top