musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.21k stars 2.64k forks source link

Add style option to use text font for dynamics #23090

Open shoogle opened 4 months ago

shoogle commented 4 months ago

Add an option in Format > Style > Dynamics & hairpins to use the text font instead of the music font to render dynamic symbols like p, f, mp, etc.

This option would be disabled by default. When enabled, dynamic symbols would be treated as Expression text for styling purposes.

Use text font for dynamics: disabled Use text font for dynamics: enabled

Internally, MuseScore would still recognise the 'p's as special musical characters, which would be rendered in the music font again if the style option were subsequently disabled.

Note: It would not be possible for the user to type these special characters by double-clicking on the dynamic and pressing P on their keyboard. The special characters must be entered from the palette like ordinary dynamics.

Why is this option needed?

RNIB require all text in modified stave notation (MSN) must be rendered in a bold, roman (i.e. non-italic) typeface.

After they have enabled "Use text font for dynamics" and modified the Expression style in Format > Style > Text styles, the final appearance of the dynamic would be:

Of course, they could do this manually by deleting the special characters and typing ordinary 'p' characters, and indeed that is what they are doing right now. However, this has to be done for each dynamic individually, and it cannot be easily reverted. Furthermore, typed 'p's are not recognised as dynamics during MusicXML export, which means RNIB has to maintain a separate copy of the score for braille conversion.

Using the style system will provide a one-click solution to change the appearance of every dynamic at once. It will enable RNIB to use a single score as the source for both their MSN and braille transcriptions.

This setting will also be used in the MSN styles for the future Accessibility section in the Properties panel.

Design

In Format > Style > Dynamics & hairpins...

Prototype demo (ignore the red annotations on the left):

https://github.com/musescore/MuseScore/assets/20806406/ed4b4f28-446e-4733-b083-2342210c626e

UI details:

image
SteveBlower commented 4 months ago

"However, this has to be done for each dynamic individually"

Surely it only needs to be done once for each type of dynamic and then the modified version can be added to a pallet. Perhaps all that is needed is an "accessibility dynamics" pallet pre-populated with the bold plain text versions.

shoogle commented 4 months ago

Surely it only needs to be done once for each type of dynamic and then the modified version can be added to a pallet.

That works to create a score, but it still locks you in to using either accessible or inaccessible dynamics. We want a way to quickly switch between them after the score is created, and it needs to work for MusicXML export too.

shoogle commented 4 months ago

In terms of design, we just need a checkbox in here labelled "Use text font for dynamics".

image

The only slight complication is with the "Override score font" option, which is used to specify a music font to use just for dynamics instead of using the main music font set in Format > Style > Score.

"Use text font" could be a sub-option within the "Override score font" section, or they could be separate options. But if they are separate, it shouldn't be possible to enable them both at the same time.

SteveBlower commented 4 months ago

Surely it only needs to be done once for each type of dynamic and then the modified version can be added to a pallet.

That works to create a score, but it still locks you in to using either accessible or inaccessible dynamics. We want a way to quickly switch between them after the score is created, and it needs to work for MusicXML export too.

It only locks you in to one or other if you remove the other pallet. You can have an accessible and a less-accessible pallet (better term than inaccessible I think). Users can decide which one(s) to include in the pallet panel (having their cake and eating it!)

MarcSabatella commented 4 months ago

That’s fine for scores created from scratch, but I think part of the point here is quickly convert existing scores into MSN. At least, that would be my hope.

shoogle commented 4 months ago

Yes, we want to convert existing non-MSN scores to MSN, and existing MSN scores to MusicXML and ordinary notation.

SteveBlower commented 4 months ago

Ahah! Missed that bit. The fatal flaw in my suggestion is revealed!