Allow % as chord symbol

• Oct 19, 2015 - 15:41
Type
Functional
Frequency
Many
Severity
S5 - Suggestion
Status
active
Regression
No
Workaround
No
Project

GIT commit: dd4530e

See discussion in https://musescore.org/en/node/83781. The request is to allow "%" to be typed in a chord symbol and be automatically converted to the measure repeat sign.

This would be very easy in principle; just a matter of adding appropriate sym and/or token tags to the XML files. But an issue might be that most fonts won't include the measure repeat symbol, so we might have to special case this and force the musical text font to be used instead.


Comments

There is a glyph. It seems to be sized pretty small though.

Turns out the "sym" declarations don't work here - they aren't used when rendering unrecognized chords. But it's easy to special case in the code. Just need to figure out what makes sense in terms of fonts & sizes.

Well, it depends on the font size of course. But the standard chord symbol font is 12pt, and at that size, the repeat measure symbol is tiny. The jazz templates use 15pt font and it is still very small. Even at 20pt - which I thought was supposed to be the nominal size for musical symbols - the symbol is noticeably smaller than the one we draw. I need to add it at 24pt to get it to look like a normal repeat bar. Maybe I am misremembering that 20pt is supposed to be nominal?

Not that the repeat symbol should necessarily be as big as usual when used as a chord symbol. But I'd like to understand the situation better before hard-coding some size into this, since it won't be something we can parameterize in the XML files.

I see, I guess it really is 24pt then. Anyhow, I'd have to decide what size to use in this context, but don't love the idea of hard-coding it, so am still thinking about how to make it something I could parameterize in the chord description file.

What's weird is if I add the symbol into ordinary text using the F2 palette, 24pt looks fine. However, when I try modifying the code to explicitly create a TextSegment using a 24pt version of either the musical text font or the current font (musical text text works as fallback it seems), it's way too small, and I need 36pt. I am probably doing something wrong, but anyhow, that was throwing me too.

The symbol also has a vertical offset that may or may not be appropriate. I think ultimately if I am to do this, I would like to create a special entry for it in the XML file and somehow access that. I could imagine us using a similar mechanism with other "special" chord symbols like "N.C." (which currently works, but I could imagine wanting to make smaller than default). Or "/", which, when used alone, should perhaps be converted into the same slash we use in slash notation.

So, unfortunately it looks like there might not be a simple quick-and-dirty implementation of this, but it's still worth looking into doing at some point.