QML/plugin: How to create staff-text object with the ornaments font

• Jul 29, 2019 - 13:49

How, when creating a staff-text, do I select the font that has all the musical ornament symbols in the "Alpha" character palette>? Or know the right one? What is its name, and can that name be relied upon?


Comments

The safest thing would probably be to access the value of the "musical symbols font" style setting, if that's available. Otherwise, best would probably be to pick either Emmentaler or Bravura. The latter is normally the default, but Bravura is the fallback font chosen for characters Emmentaler does not defined. And I have no idea if that fall-back mechanism works within a plugin. To select the font, normally you'd set the font face aka font family property on the staff text itself, if you want the whole text to have that. If you just want a set of characters within the font to have that, it's trickier, and probably isn't exposed to plugins but I don't really know. There is some facility for a markup within the text, that would probably be the way to go if we were to support it.

Some quick hacked together test based off of looking into what is generated in an mscx for staff text with special characters combined with some source code browsing.

Copy and pasting the symbol from a staff text seems to work if your qml file is UTF-8 encoded. Otherwise using SMuFL definitions inside <sym> tags is by far the more readable method imo.

See attachements for example and reference links

Attachment Size
special_characters.qml 1.08 KB
292759_special_characters.mscx 5.19 KB

In reply to by [DELETED] 1831606

Set the element (a Text/Label) to have font.family: 'MScore Text'. That's how the dropdown for TempoChanges does it.

I've not had the opportunity to test out your plugins (summer's a busy period), but they look quite impressive at first glance. I've asked Marc to look into them as well, as I believe they fill an often requested gap in user experience and possibilities when tuning playback; perhaps he can cover them in one of his "café" sessions...

In reply to by jeetee

The dropdown for tempo changes, unfortunately, has "health issues" in this very regard (at least in my environment). I'd appreciate if you took a look at that.

Do look at/listen to my sample scores. The first ten measures of Erbarme dich, mein Gott make the case convincingly. See also my TBD.md (on GitHub) for directions I'd like to go.

In reply to by [DELETED] 1831606

If you can find the tick of the chord (might have to go up to the segment for that), then keep using cursor.next() until you've hit the same tick with the cursor; meaning you've arrived at the same segment.

If the chord is in a different staff, then first try to figure that out and assign the track of the cursor. Assigning a track to a cursor makes it rewind to tick 0 if I remember correctly.

Do you still have an unanswered question? Please log in first to post your question.