Jack preferences for becomeTimebaseMaster (PREF_IO_JACK_TIMEBASEMASTER) broken in commit 8 months ago
I'm running jack and have MuseScore using jack, and create a tempo element, and starting playback runs at that tempo. But after changing that tempo (either by using the auto follow-text or by manually editing tempo via inspector), if I press playback the tempo is still the same.
However if I go to preferences and change MuseScore to use pulseaudio (and restart), then the tempo plays back correctly at the new speed. If I then go to setting again and change back to jack (and restart), then the tempo plays back at the old speed.
It is as if the tempo is fixed with jack. I'm a little perplexed.
On Arch Linux 5.11 x86_64, MuseScore version (64-bit): 3.6.2.548021370, revision: 3224f34
Comments
I did a factory reset, and still have this issue. Strange.
ah, closing ardour in the background fixed it. Though I didn't set musescore to use another program as timebase master.
In reply to ah, closing ardour in the… by ericfontainejazz
still having funny issue with ardour closed. If I go back to pulseaudio in musescore now, then actual tempo playback is much slower than what tempo I set. Seems slower by a similar ratio when I change tempo.
In reply to still having funny issue… by ericfontainejazz
stopping jackd seems to fix that...hmm. but pulse audio shouldn't have been affected by jackd.
In reply to stopping jackd seems to fix… by ericfontainejazz
the problem starts again when I start ardour...
But I'm not using Jack Transport! So ardour shouldn't affect musescore!!!
In reply to the problem starts again… by ericfontainejazz
and now closing ardour, and I'm back and the funny thing where MuseScore's playback becomes much slower than the tempo I set.
In reply to and now closing ardour, and… by ericfontainejazz
and it is slower by a proprotional amount... like playback is a quarter the speed of the tempo I set.
In reply to and it is slower by a… by ericfontainejazz
restarting musescore, and tempo behaves normally now.
In reply to restarting musescore, and… by ericfontainejazz
opening other jack programs like audacity doesn't affect musescore's playback.
But the moment I open my ardour project, then musescore's playback gets fixed again.
In reply to opening other jack programs… by ericfontainejazz
so pressing the [Int.] button on Ardour to change from Internal to Jack traport on ardour, and then changing the first and only tempo element in my Ardour project and pressing play & pause is what seems to control the tempo that musescore plays back at.
In reply to so pressing the [Int.]… by ericfontainejazz
again I don't have musescore set to "Use Jack Transport". So why is ardour somehow controlling musescore's tempo to be fixed to ardour's tempo, I don't know.
This problem seems to happen when I check the box in Ardour's transport to be "Timebase Master" and have Ardour on Jack transport.
I found the git commit that broke the timebasemaster funcitonality. See:
https://github.com/musescore/MuseScore/commit/1f7f5d7cad1d7913ef15155fc…
There was a line deleted that says:
There was modifications to that file, but the resulting file failed to include the modified version of that line.
In reply to I found the git commit that… by ericfontainejazz
I changed this forum topic title accordingly.
So it seems the fix should be easy, basically readd that line.
In reply to I changed this forum topic… by ericfontainejazz
I'm also noticing that the line
is missing with that revised commit.
That commit was by Sergios - Anestis Kefalidis (SKefalidis)
In reply to I'm also noticing that the… by ericfontainejazz
looking at commit history, it seems he made commits from March to June of 2020. So was likely a Google Summer of Code student. He must have broke this functionality and no one tested it?
In reply to looking at commit history,… by ericfontainejazz
Here is visually the diff. You can see that becomeTimebaseMaster->isChecked() is not affecting preferences. So it seems musescore is always stuck as a default.
I've pinged Sergio on the Telegram dev chat so he can confirm this to be an oversight error or explain the intent of the change if it was deliberate.
I'll look into it. The lines haven't been removed, at least as far as I can tell from reviewing the PR on Github. I'll start looking into it on my IDE and I'll update you.
In reply to I'll look into it. The lines… by Sergios - Anes…
thanks for responding so quickly.
Look at https://github.com/musescore/MuseScore/blob/v3.6.2/mscore/prefsdialog.c… you will see
|| preferences.getBool(PREF_IO_JACK_TIMEBASEMASTER) != becomeTimebaseMaster->isChecked())
but that becomeTimebaseMaster->isChecked() isn't accessed anywhere inside that if statement, but it really should be used to call preferences.setPreference().
In reply to thanks for responding so… by ericfontainejazz
I could be totally off base to, so I shouldn't accuse you of breaking it...maybe I'm the one confused.
But I'm quite suspicious of the "//till this" on https://github.com/musescore/MuseScore/blob/v3.6.2/mscore/prefsdialog.c…
and "//this" on https://github.com/musescore/MuseScore/blob/v3.6.2/mscore/prefsdialog.c…
I don't know what that comment in your commit means...but to me that comment looks like you might have intended to do something and forgot to follow through completing it.
In reply to I could be totally off base… by ericfontainejazz
I believe that I have found the problem.
PREF_IO_JACK_TIMEBASEMASTER
andPREF_IO_JACK_REMEMBERLASTCONNECTIONS
are in the wrong std::vector and are updated beforebool jackParametersChanged
is set. Unfortunately, I can't test if my PR will fix the problem. If you are able to test it that would be really helpful :^)In reply to I believe that I have found… by Sergios - Anes…
ok, thanks, I will monitor https://github.com/musescore/MuseScore/pull/7546 and try out the appimage when it builds.
In reply to I believe that I have found… by Sergios - Anes…
I'm verifying that this commit has fixed that issue I reported. I'm now able to turn on and off MuseScore's JackTransport setting, and so can use (or not use) external Jack programs like Ardour in sync with MuseScore.
Thanks!
In reply to I'm verifying that this… by ericfontainejazz
I haven't completely followed this, but I wonder, as a workaround, does it work to change some other setting to force the change to "take"? That was the case with a similar issue with some particular setting not notifying the dialog it had changed.