Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import hidden instruments as hidden staves #18229

Closed
wants to merge 3 commits into from

Conversation

Jojo-Schmitz
Copy link
Contributor

@Jojo-Schmitz Jojo-Schmitz commented Jun 27, 2023

Resolves: #10951 (partially)

MU4 treats hidden instruments as muted with no possibility of unmuting, which breaks older (3.x and earlier) scores that use invisible playback staves. The change in this PR acts on import, setting the instrument itself to show but marking the staves of the instrument as invisible. This allows existing scores to both look and sound as before.

Rebased (actually cherry-picked) version of @MarcSabatella's #13293

@Jojo-Schmitz Jojo-Schmitz changed the title Import hidden Import hidden instruments as hidden staves Jun 27, 2023
@Jojo-Schmitz Jojo-Schmitz force-pushed the import-hidden branch 2 times, most recently from 6c1ee02 to 32a6046 Compare June 30, 2023 13:00
@Jojo-Schmitz
Copy link
Contributor Author

Jojo-Schmitz commented Jul 4, 2023

Can this one please get reviewed?

I believe this would be a good compatibility fix and suitable for 4.1.0, see #18431

@cbjeukendrup
Copy link
Contributor

I'm still not convinced that this is the right approach. It isn't very harmful, but still undeniably a hack rather than a real solution. I agree that the "cannot unmute hidden instruments" issue should be prioritised for 4.2 (especially since I seem to recall that it was promised that this would be done soon), but I'd rather make a proper fix directly rather than creating technical debt.

@MarcSabatella
Copy link
Contributor

I definitely agree that going forward, we should have a better solution. However, it's already the case that ever since 4.0 this has been the only way to hide staves without muting them, so by now there are thousands of scores already using this approach. And it's the thing we always have to tell people who try to import older scores. So they are going to do this manually anyhow, and by the time 4.2 rolls around, there will by then be a full year's worth of scores already doing this.

We're going to have to have a migration plan either way. All this PR does is save existing MuseScore 3 users and us volunteers in the forums a lot of trouble in the interim. It doesn't change anything about what still needs to happen for 4.2.

@Jojo-Schmitz
Copy link
Contributor Author

Jojo-Schmitz commented Jul 6, 2023

We really should have had that discussion back in September 2022, when Marc did his #13293 and well before 4.0 got released.
Back then a better solution would have been possible, now it isn't any longer.

@MarcSabatella
Copy link
Contributor

Indeed, but, that's water under the bridge now. I'd still suggest this makes sense to do, but the world won't come to an end if it doesn't happen. I've been frankly surprised it hasn't come up more than it has with respect to imported scores (come up more for new ones). And FWIW, if we're concerned about the risk involved with introducing this change for 4.1 at this point, it could still be reasonable to consider if there ends up being a 4.1.1. But either way, I agree we should prioritize a better solution for 4.2.

@bkunda
Copy link

bkunda commented Jul 7, 2023

This definitely won't make it into 4.1. We are trying to prepare the RC now, so there is no time to consider something like this now.
As @Tantacrul has said elsewhere, we will implement a proper solution for the problem of muting/unmuting hidden instruments in a forthcoming release.
Please let's not spend any more time on this issue at the moment, as we will end up repeating the same discussions we've already had, which will be counter-productive and time-consuming.

@Jojo-Schmitz
Copy link
Contributor Author

How about now, for 4.2?

@Tantacrul
Copy link
Contributor

For me the solution is to simply implement a feature in the instruments panel itself to 'enable audio, even when hidden' (better wording pending). @avvvvve - I think it would be good to have a chat about this and we can pop a new design up as a feature that either we build eventually, unless someone in the community beats us to it. Seems like an easy design and surely an easy implementation too.

That would then provide a way to perfectly import older scores so they look and sound the same, as @Jojo-Schmitz is requesting.

@avvvvve
Copy link

avvvvve commented Aug 18, 2023

I floated this by @Tantacrul earlier this week, but just got around to mocking it up. We could add a new setting in preferences called "Mute playback of hidden instruments".

  • When checked, the current 4.1 behavior would apply
  • When unchecked, the mute buttons in Mixer would no longer be affected by an instrument's hidden/shown state. An unmuted instrument will stay unmuted if hidden in the Instruments panel (and a muted instrument will stay muted if shown).

It could be checked on by default if we don't want to affect playback in existing 4.0-4.1 scores.

To accommodate this, I'm suggesting we change the name of the I/O tab in Preferences to Playback, and some small copy changes to the section titles.

image

A tradeoff of this approach is that it'd be a global MS setting rather than a per-score setting. I don't think it's a huge issue as I'd guess that users would generally stick to one approach, but it could require toggling when opening someone else's score who uses the opposite setting.

@bkunda
Copy link

bkunda commented Aug 21, 2023

I'm just catching up on this.
Seems like a fairly simple way of accommodating the use cases identified in other discussions about this issue.

Just a couple of thoughts:

When checked, the current 4.1 behavior would apply

A further quirk with the current behaviour is that the "solo" button in the mixer remains enabled when an instrument is hidden. Toggling this doesn't do anything, so it seems this should also be disabled – together with the mute button – when this new checkbox is checked.

A tradeoff of this approach is that it'd be a global MS setting rather than a per-score setting. I don't think it's a huge issue as I'd guess that users would generally stick to one approach, but it could require toggling when opening someone else's score who uses the opposite setting.

@shoogle just raised the point with me that there would also be some oddness if the same user opened their score on a different machine (where the new global setting was different).

I don't think this is a huge problem 🤷‍♂️, but it does raise the question of whether the user will be able to figure out what's going on and correct the setting to achieve their desired playback behaviour.

It's probably not a super common case (it would occur where the user opens their score on a machine where this setting has been switched off by someone else). I'd say we'd need to make sure it's well documented so they can easily find the solution. I had wondered whether adding any explanatory UI copy beneath the setting might be helpful, but in this use case the user may not even know this setting exists, so any extra copy wouldn't be helpful anyway.

Anyway, I suspect this is a relatively minor point in what is otherwise going to be a fix that should accommodate two very different kinds of playback behaviour for two different kinds of user preferences 👍🏻.

@shoogle
Copy link
Contributor

shoogle commented Aug 21, 2023

It could require toggling when opening someone else's score who uses the opposite setting

I don't think this is acceptable. Scores need to sound how they were intended to sound. Doing otherwise would break rendering on MuseScore.com as well as for other users.

We can still have an option like this in Preferences, but it needs to do something to the Mixer / Instrument panel / score properties so that the score sounds the same for everyone.

The preference would be "When hiding an instrument, also mute it in the Mixer" or something like that. When opening such a score, you would find some instruments are muted and others not, and it wouldn't matter whether they got that way because of a setting in Preferences or because the user muted them manually.

@MarcSabatella
Copy link
Contributor

Definitely, global options (eg, preferences) should affect the behavior of the program, but not the sound of a score. So a score saved one way needs to sound that way regardless of the state of any global option.

Overall, I think this global option is the wrong solution, though. It's not like someone always wants to mute staves staves when hiding instruments, or that they never want to. There are some specific cases in which you want to hide & mute an instrument, other specific cases where you want the instrument to be invisible but still audible. The right solution is to simply provide a way of specifying which you mean at the moment you hide the instrument.

The simplest from a design perspective is to just allow the user to unmute the hidden instrument in the mixer, as originally requested in #10951

@bkunda - you had earlier described how you saw that scenario working, in your comment at #10951 (comment)

Other designs are possible as well of course. Like for instance, a three-state visibility button - visible+audible, invisible+inaudible, invisible+audible. Or a second mute toggle there in the instruments panel that normally is set automatically when toggling the visibility but can be unchecked independently. The nice thing about the latter possibility is that it potentially allows people to mute/unmute ordinary visible staves without the need to open the mixer - a very common request.

@Tantacrul
Copy link
Contributor

Tantacrul commented Aug 21, 2023

I think we've gone down a rabbit hole a little bit.

  • Ben's suggestion is to utilise the Mute feature when hiding / showing staves. The beauty of this is that the user can manually unmute anything that's hidden or visa versa.

  • All we're discussing now is a setting that allows the user to specify the default behaviour if they hide an instrument. Basically 'Should it toggle mute when I hide an instrument? yes or no?'. It doesn't matter what option you choose because you can override it manually using the mixer.

  • This won't affect other one user's consumption of another user's scores because we'll just store whether the instrument was muted or not.

So, I don't think this setting will have any bearing on opening someone else's scores.

@Tantacrul
Copy link
Contributor

@avvvvve

I wrote a comment about a disagreement I had with one aspect of your design... and then realised I'd read it wrong, so deleted the comment. 😄

@bkunda
Copy link

bkunda commented Aug 21, 2023

@Tantacrul's comment here certainly clarifies things for me.

@avvvvve I think the part to refine would be this:

When checked, the current 4.1 behavior would apply

It would be better if, when checked, the mute switches would default to being switched on when an instrument is hidden. They also wouldn't be disabled, so as to preserve the user's ability to change this at any point if desired.

This setting can then be saved to the score, meaning it will open as the user intended on other machines.

Let's spec this out in a proper design before taking it further.

@RomanPudashkin
Copy link
Contributor

Will be fixed here: #19433. Closing

@Jojo-Schmitz Jojo-Schmitz deleted the import-hidden branch February 5, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MU4 Issue] The user should be able to unmute hidden instruments
8 participants