Sean Meighan
Software => Bugs in xLights/Nutcracker => Topic started by: skulltronix on October 17, 2018, 10:47:47 AM
-
I can now successfully import a VSA sequence with 4 models. The sequence will play ok from VSA but it loses the sync between movements and sound file starting about 30 seconds in. Happens in last 3 versions of xlights. Now on 2018.36 64 bit. Playback is still a bit jerky also.
The longer the animation runs the more out of sync it gets. Not really noticeable until about 20 seconds in.
I thought it was pc related (slow) but switched to a faster pc, loaded and saved the xml file and get the same problem.
Playing through Enttec Open interface.
-
I switched the mp3 to wav. No difference. I switched the 30ms/f to 33ms/f. No difference.
The faster pc is showing 28-30 fps when played back. Shouldn't it be solid 30?
I closed all preview windows to speed up playback. No help.
What mechanism is it that Xlights uses to assure sync with the sound file?
In Sequence Settings why does it have "Number of Models"? It is blank.
-
You know once you have it all rendered in xLights there is absolutely no difference between the DMX data sent to lights vs servos so have you seen anyone complaining that their lights don't stay in sync? I can't figure anything out cause I'm not seeing what you're seeing. Its Windows its not going to be a rock solid playback rate plus you only playback sequences in xLights for testing its not used for the official playback mechanism. You would be using an FPP or xScheduler for official sequence playback. What happens if you start playback in the middle is it immediately out of sync? Are the effects lined up where they should be? I used to know how we synced up with the sound but I'm not sure if its changed so I'm not going to pretend to know I just know I've never seen my light playback out of sync and all because you have servos its still using DMX data so its not different than a set of lights out there. Number of models has nothing to do with this. Maybe we need to document it in the user manual "Number of models means the number of models". If its blank maybe a bug cropped up. That one I can probably fix.
-
If I start the sequence in the middle it starts in sync but becomes noticeably out of sync after about 20-30 seconds. Its not just out of sync. Its jerky from the very start.
Each time I also transfer it to the Pi3 B+ and get the exact same result from FPP.
I never have Xlights and FPP both physically connected at the same time. No cross talk.
I have often used Xlights as the playback mechanism in a live show without issue, although I agree Windows sucks.
I know the pi3B+ is plenty fast.
An aside: There are many people who use wireless dmx and never see any delays or sync issues with their lights. But matching jaw motions with a soundtrack is much more critical and easier to spot. I've never found wireless DMX acceptable because of the sync issues and slow speed. 1/4 second out of sync might not be noticeable on lights. On jaw motion it is very noticeable.
The jerky motions tell me the frame rate is too slow. Much too slow. Slower than the display is telling me.
-
When you use a new frame rate are you reimporting from VSA? It will quantize the start/stop points to the timing so once imported making it faster doesn't help much.
I just don't know anything I can change to help unless I'm told hey this one effect did not import properly or something like that. Lagging makes it sound like the data packets are getting held up or stacking up somewhere because I'm sure we are creating them on time.
Not sure if its still true but playback sync used to be controlled by us kicking off Windows Media Player through a wxWidgets control class and then we ask it where are you in playback and then we use its reply to determine which frame to output. So if Windows Media Player all of sudden says the audio its at the 25 second mark we output the frame associated with that time location.
-
I start with a new sequence and re-import each time.
When watching the girl model, about 20 seconds in she should have a slow pan back and forth but in xlights she turns her head to the right at full extreme and holds it there for about 10 seconds when she should be looking forward and staying mostly centered. I've compared all the limits in xlights and vsa many times and they are identical. The VSA file just isn't importing correctly.
It is very hard to compare the xlights and vsa files to each other. If a video would help I could make one and post it on youtube or fb to show that girl pan example.
-
Not sure if its still true but playback sync used to be controlled by us kicking off Windows Media Player through a wxWidgets control class and then we ask it where are you in playback and then we use its reply to determine which frame to output. So if Windows Media Player all of sudden says the audio its at the 25 second mark we output the frame associated with that time location.
We don’t use the windows media player any more but the principle still holds. Each time we go to output the frame we ask the sdl player where it is currently up to in the song and that is the frame of data we issue.
Sent from my iPhone using Tapatalk
-
I'm looking at the data in the sequence. I expand the model so I see all the tracks. The fine tracks have all the data. The regular tracks have no data on any of the models. Am seeing this the wrong way?
-
I've also noticed the events have values such as 4 or 4.5. Never 4.4, 4.1. With a range of 1 to 100 is it right to say there are only 200 possible values using this method? That would be ok if both channels get 200 values but if only the fine channel gets the data it would explain the jerkiness.
I'm curious why dmx uses zero to 255 values but xlights uses 0-100. Is that just a historic programmer decision?
I'm going to create a very simple vsa file with just one channel and see how the data compares.
-
I created a file with just one servo motion. It appears to import the correct values but only in the fine channel. There's nothing in the other channel. Ive got to believe this is correct yet I don't understand it..
-
When you say the girls head is stuck in the wrong position that is where I would expect you could narrow it down to a single effect and then we can inspect that effect and compare it to VSA to determine why its different. We use 0 to 100 to represent a percentage so that when you say you need 50% we look at the min/max limits you defined for the servo and give you the value that is in the middle. So if you say the limits are min=100 and max=200 and you set it to 50% then it renders it as a 150. But everything for servos is calculated at the 16 bit level and then that is split into 2 bytes which become the fine and coarse bytes for each servo.
-
I'll try to narrow it down for that one particular instance. Although I'm not sure how that will address the sync issue or jerkiness.
You talk about percentages but with servos we talk about milliseconds. VSA uses two channels to get to 10 bits, not 16. (yes it takes 16 bits to get there) I assume you know that. 1024 steps.
I'd like to see your math for the conversions. EG: If I have a servo with VSA motion restricted to 500 min and 750 max that is 1000 ms to 1500 ms. It has a total number of possible steps of:
500 ms out of possible 2000 ms = 25% of 1024. 56 possible values between 1000 to 1500 ms.
Is my math close to yours?
Servos have a normal range of 1000-2000 ms but some can go from 500ms to 2500 ms.
As further education to that one guy who is following this: Some servos cannot tolerate anything outside 1000-2000 ms. They can fry. So we try to keep our servo ranges within the safe range.
I'll go back to the routine and narrow down that girl pan issue.
This is obviously very important to me and I'm spending a lot of time on it and I really appreciate your help Gil. Thank you.
-
Well.... great news - and weird news.
In the VSA routine there were half a dozen events that had values out of limits for the Girl Pan servo. I corrected those in the VSA routine and then created a new xlights sequence. It works fine. There seems to be something odd about the conversion process that causes the issues.
Now on to other projects. Thanks for your patience.
-
Jerry I don't convert to milliseconds I assume you enter the limits in the units you want sent over in the command so if the min limit is 500 and you choose 0% for a command then 500 is the command that is sent. If you need that converted to milliseconds I assume you do that in your chucky board.
So you said you fix some out of limit commands in VSA and now it's working but you think that means there is something odd in the conversion process? I know I'm clamping to the limits you enter cause I've tested it. You keep telling me xLights has a problem but you keep fixing the problems without me changing xLights. :)
-
Hi :)
I see a few others in the forum are having sync issues with lights. Maybe its not a dmx issue at all but something else.
My VSA file has a number of events that are out of range and fixing it by opening up every single event is killing my carpal tunnel syndrome. I'm looking for a way to fix the VSA file before importing because I could see that just fixing a few events in the girl pan movement noticeably improved the animation. Not sure what format the data in the vsa file is in. It would be great to open it in a good text editor and do find and replace.
Suggestions?
Thx!
-
Well what exactly are you changing? Are you just making the number fall within the limits because my importer already does that. Just create a VSA file that has 1 effect that is out of range and then import it and see what happens. I can't fix this on general statements you need to show me a specific instance that doesn't import correct.
By the way I've seen nobody talk about sync issues.
-
When importing the file I get an error that the girl pan is out of limits. So I went to the area from 20-24 seconds (where the behavior was way off) and checked the values in vsa vs xlights. Definitely different.
But there were about 4 instances in the vsa file in that time range where the events had a low value (in the 400's) and the VSA settings had a low limit of 500. So I hand corrected those events to 500 and imported into xlights again. The pan error no longer occurred at that point and the animation was overall smoother. There was less of a sync problem also but it was still there.
So, next I'm going to fix all out of range errors for all servos and start over with no out of range errors. Based on the limited success above I'm guessing the jerkiness will be gone.
To clarify a bit.. The girl panned to the right and stayed there for several seconds when she should have been looking forward. There are multiple evens in that time period so they are all incorrect.
-
"Definitely different" doesn't get specific enough. Just look at one effect. What was the value in VSA and what did it become in xLights for that same effect? You know the servo and you know the timestamp so it should be easy to click on that effect in xLights. Each servo gets imported to its own row. If it was below the limit I would expect the effect should have resulted in a 0% in xLights because it should clamp to the lower limit.