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

Add multiplication sign for time signatures #26107

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rettinghaus
Copy link
Contributor

This PR makes the multiplication sign for time signatures available:

grafik

Upper and lower case X may be used as well as the multiplication character (×) ×.

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Jan 16, 2025

Can't that get extended to also allow -, and timeSigMinus (and then change timeSigPlusSmall to timeSigPlus?
Maybe also = and /, timeSigEquals and timeSigFractionalSlash?

@@ -1183,6 +1183,9 @@ SymIdList timeSigSymIdsFromString(const String& string, TimeSigStyle timeSigStyl
{ 162, SymId::timeSigCutCommon }, // '¢'
{ 189, SymId::timeSigFractionHalf },
{ 188, SymId::timeSigFractionQuarter },
{ 88, SymId::timeSigMultiply }, // 'X'
{ 120, SymId::timeSigMultiply }, // 'x'
{ 215, SymId::timeSigMultiply }, // '×'
Copy link
Contributor

@Jojo-Schmitz Jojo-Schmitz Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any special reason why not using the characters themselves rather than their ASCII code?
As far as I can tell Char(88) is the same as Char('X'), except the latter is more readable (and obsolets the comment)
Or Char(u'×'), etc.

@rettinghaus
Copy link
Contributor Author

Can't that get extended to also allow -, and timeSigMinus? Maybe also = and /, timeSigEquals and timeSigFractionalSlash?

I think those are for compound meters like "3/4= 6/8" and shouldn't turn up in this context.

@Jojo-Schmitz

This comment was marked as resolved.

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Jan 16, 2025

I believe similar additions are needed here:

QRegularExpression regex("[0-9+CO()\\x00A2\\x00D8\\x00BD\\x00BC]*");

to be able to actually enter those new signs

@rettinghaus
Copy link
Contributor Author

@Jojo-Schmitz interestingly the time signature dialog you open from the palettes is not limited by a similar expression.

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Jan 16, 2025

But the timesig created with it is! It lacks those symbols.

See also my backport to Mu3, Jojo-Schmitz#765

Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 7, 2025
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.

2 participants