Page 1 of 1
Timing Problem
Posted: Tue Apr 21, 2015 7:44 am
by Chris De Rock
I have a strange behavior with rgb matrixes. i can tap the tempo and the tap-widget shows me the correct beat, but the fixures get a totaly different timing and are not in beat. Tested with QLC+ 4.8.5 GIT on OSX 10.6 and Raspberry.
Re: Timing Problem
Posted: Tue Apr 21, 2015 9:43 am
by plugz
Hi,
please share a workspace file demonstrating the issue.
Thanks.
Re: Timing Problem
Posted: Wed Apr 22, 2015 6:38 am
by Chris De Rock
ok, here are the workspace
Re: Timing Problem
Posted: Wed Apr 22, 2015 6:57 am
by janosvitok
My guess is that tapping adjusts speed (step duration) but doesn't adjust when the step starts, so it the matrix (or anything else) is in tempo but may be off beat.
Re: Timing Problem
Posted: Wed Apr 22, 2015 7:33 am
by Chris De Rock
No. As long as i tap the tempo, all fixures are in beat. if i stop tapping, the speed changes.
Re: Timing Problem
Posted: Wed Apr 22, 2015 8:33 am
by plugz
Yup.
This happens quickly on short tempos (like 300ms).
This is something that is complex to fix :/
Re: Timing Problem
Posted: Wed Apr 22, 2015 8:36 am
by Chris De Rock
This workspace is for the liveset of my band (rolling stones tribute) and the effect happens on every speed (i think from 70bpm to 130bpm. i tap quarter notes)
Re: Timing Problem
Posted: Wed Apr 22, 2015 9:14 am
by plugz
Yes, it also happens on longer tempos.
Re: Timing Problem
Posted: Wed Apr 22, 2015 9:22 am
by Chris De Rock
now i have found the file engine/src/mastertimer-unix.cpp (currently im on debian) and set the tread priority to time-critical but it changes nothing.
Re: Timing Problem
Posted: Wed Apr 22, 2015 2:26 pm
by plugz
If you can compile from sources, the RGBMatrix + speed dial tap should look way better now.
Chasers have to be fixed still.
Re: Timing Problem
Posted: Wed Apr 22, 2015 2:26 pm
by Chris De Rock
plugz wrote:If you can compile from sources, the RGBMatrix + speed dial tap should look way better now.
Chasers have to be fixed still.
Oh, great. Then i wait a few days (i need this at the end of the month)
Re: Timing Problem
Posted: Wed Apr 22, 2015 2:54 pm
by plugz
Chaser timings improved too.
Here's a sample workspace for testing.
How to test the bug ?
- Start the chaser and the rgbmatrix
- You have to tap to a tempo that is not a multiple of the MasterTimer tick. Like 0s.290 (default tick is 20ms, so 0s.280 or 0s.300 may show a correct behavior)
- The speed dial tap and the lights will quickly be out of sync
How to test the fix ?
- Install QLC+ from git sources, do the same as above.
Now, a question: Would 1ms precision instead of 10ms precision be useful for you ?
Also, if you can compile from sources, can you tell the sync is better now ?
Re: Timing Problem
Posted: Wed Apr 22, 2015 2:59 pm
by Chris De Rock
There seems to be another small problem: QTimer::setTimerType and Qt::PreciseTimer are not available in QT 4.8, so the patch is a little bit evil.
Re: Timing Problem
Posted: Wed Apr 22, 2015 3:43 pm
by plugz
Sorry :/ fixing that...
Re: Timing Problem
Posted: Wed Apr 22, 2015 3:53 pm
by plugz
Fixed, thanks for reporting my mistake
I don't know about the default precision of QTimer on Qt4 though, but it seems to be precise enough.
Re: Timing Problem
Posted: Wed Apr 22, 2015 3:53 pm
by Chris De Rock
plugz wrote:Fixed, thanks for reporting my mistake
I don't know about the default precision of QTimer on Qt4 though, but it seems to be precise enough.
Now it looks (and works) good. Thank you for the fix.