MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

New dynamics properties for voicing and stave positioning

Open mike-spa opened this issue 10 months ago • 10 comments

Resolves: #22175

The way that the "All voices" option is presented in the properties is just a placeholder. It functions correctly, but it looks different from the design. Given that implementing the required button+dropdown will take some more work, @cbjeukendrup and I have decided to do it later. Meanwhile, @avvvvve and @oktophonie please have fun with this, looking forward to your feedback 😄

mike-spa avatar May 02 '24 15:05 mike-spa

@mike-spa First off, this is sooooo satisfying! Bravo. Testing it a bit just now and found a few small things:

  1. I assume the "All..." labels aren't the same as in the spec for now just to fit them inside those buttons? So you don't have to go looking, they should be:

    • All voices on instrument
    • All voices on this staff only
  2. When one of the "All..." voice options is selected, none of the voice buttons in the note input toolbar should be accented. Currently, voice 1 gets accented when you do this.

  3. In Style > Dynamics & hairpins, when "Center on grand staff instruments automatically" is turned off, any dynamics with "Center between staves" set to Auto should no longer be centered. In other words, Auto should behave as if set to "Off" instead of "On".

  4. When applying dynamics to the bottom staff, sometimes the vertical offset below the staff changes after changing from voice 1 or 3 to one of the "All..."s or voice 2 or 4 (see video)

https://github.com/musescore/MuseScore/assets/20806406/002aa917-8575-40d9-a96f-d4403a5baf18

avvvvve avatar May 02 '24 20:05 avvvvve

@avvvvve

  1. Yes the button labels are just as placeholders as the buttons themselves (the full labels don't fit). We'll fix them :)
  2. Fixed ✅
  3. Fixed ✅
  4. Fixed ✅

mike-spa avatar May 03 '24 12:05 mike-spa

@mike-spa I created a PR to your repo to implement the design for the "All" button: https://github.com/mike-spa/MuseScore/pull/1 You can merge that PR, and then the commits will appear here immediately (also make sure to pull them to your own computer). After doing that, the commits are on your branch and you can continue adding new commits or amending previous ones (including my ones), just as if the commits were created by you.

cbjeukendrup avatar May 06 '24 01:05 cbjeukendrup

For @cbjeukendrup: Nice work on the button! We should make the context menu show up if you right-click on the button too. And one suggestion for an interaction feature, if it's not too much to implement... Right now, the context menu only shows up after clicking and releasing the mouse on the "All" button. It would be cool if it appeared as soon as you click down, then if you kept holding, you could drag the mouse over one of the context menu options and then release to select it all in one click. But that's definitely extra credit.

Also, would it be possible to make this button a reusable component i.e. one that shows up in "UI Gallery" for future use? :)

For @mike-spa, cc @bkunda: When copying and pasting a dynamic, its "Apply to voice" is getting set based on what is selected in the new Preference in Note Input, "When entered, dynamics and hairpins should affect:"

If it's set to "All voices on the instrument", then I copy a dynamic set to voice 3 and paste it somewhere else, it gets set to "All voices" and the "Position" and "Center between staves" get reset to "Auto", even if I had manually chosen other options.

I think dynamics should retain their properties when copied and pasted instead, regardless of what you've chosen in preferences.

avvvvve avatar May 06 '24 15:05 avvvvve

We should make the context menu show up if you right-click on the button too.

Done!

Also, would it be possible to make this button a reusable component i.e. one that shows up in "UI Gallery" for future use?

It is already reusable; it basically consists of three components: the FlatButton, the menu indicator triangle that is also seen in the note input bar, and the menu. But I've added the combination of the three to the DevTools page, because why not.

Right now, the context menu only shows up after clicking and releasing the mouse on the "All" button. It would be cool if it appeared as soon as you click down, then if you kept holding, you could drag the mouse over one of the context menu options and then release to select it all in one click. But that's definitely extra credit.

Unfortunately, that is difficult. Making the menu open on press (instead of release) is doable, but the problem is that you can't receive release events in the menu items if the initial press event was sent to anything other than the menu item (namely to the button). Also, when we implement this, we should implement it for all menu buttons throughout the app in one go. Feel free to open a new feature request for that.

cbjeukendrup avatar May 06 '24 22:05 cbjeukendrup

I think dynamics should retain their properties when copied and pasted instead, regardless of what you've chosen in preferences.

@avvvvve Done! ✅

mike-spa avatar May 09 '24 09:05 mike-spa

@mike-spa Looking good! The addition of the voice preference is great. I'd suggest a small change to the label: "Place above staff on vocal instruments" I know 'vocal instruments' sounds like not a real thing, but they are technically instruments in MSS.

A couple other style dialog things:

  1. Can we make the reset button in the "Default positions..." section reset all three settings back to the default?

  2. When 'Position' is set to 'Above', can we disable 'Place above staff on vocal instruments' (40% opacity) since it will have no bearing on the score?

  3. The "Center on grand staff instruments automatically" checkbox currently centers dynamics automatically on any instrument with at least two staves. The original intent was that it would only do this for instruments defined as having more than one staff (i.e. piano/organ). So currently, if you put a dynamic on a violin part with two staves, it gets centered. Can we make it only apply to the correct instruments? Alternatively, we could make this a dropdown and provide three options: Never center automatically, Center on grand staff instruments, Center on any instrument with more than 1 staff @oktophonie thoughts on whether the latter is something we should even allow?

And one engraving thing: 4. When copying a dynamic with an individual voice selection (say, voice 3) and pasting onto a different note (say, voice 2), the dynamic takes the color of the voice it was pasted on. The "Apply to voice" shows the correct voice, from the copied dynamic, so the color just needs to be correct.

avvvvve avatar May 13 '24 18:05 avvvvve

@avvvvve all done!

mike-spa avatar May 14 '24 12:05 mike-spa

@mike-spa

Re: #1 above, the reset button only becomes active if you change the position setting. It should become active if you uncheck either of the other two options too.


The rest below we can address in follow-ups to this PR after merging!

I noticed some slightly strange behavior with the actual placement of centered dynamics. Check the video below. I added a ridiculously tall spacer to the staff to illustrate that the dynamic moves around when a note's boundaries extend beyond one of the staves even if it's still very far away from the dynamic.

Dynamics on the very first note of the system appear slightly misaligned with the rest.

mp generally feels vertically misaligned with mf. Personally, I'd expect their baselines to be the same. I don't think other in-score elements are causing this offset.

https://github.com/musescore/MuseScore/assets/20806406/cd7f13ee-b3e1-475a-ac17-4b3350d15818

avvvvve avatar May 15 '24 14:05 avvvvve

The behaviour shown in the video is as intended for now - pending a lot more testing in real-world situations; more nuance and possibly config options will be required.

We centre dynamics in the available vertical space (not between the staves only), and also do not align the baselines since p, mp etc (dynamics with descenders but no ascenders) then appear too low in isolation.

When dynamics are adjacent or close together then yes, the baselines should probably align (in most situations), but that matter is to be addressed in Phase II.

oktophonie avatar May 16 '24 08:05 oktophonie

@RomanPudashkin all done! 👍

mike-spa avatar May 27 '24 11:05 mike-spa