Fingering plugin - formatting issues
Hi, I just modified the Xaphoon plugin for my ocarina, and while the notes are correct, I don't know enough about MuseScore formatting to get it to display the way I want to.
Currently the formatting section of the code looks like this:
if(index >= 0 && index < fingerings.length){ var text = newElement(Element.STAFF_TEXT); text.placement = Placement.BELOW //Place Taps below notation text.autoplace = false // deactivate Autopacement text.offsetY = 9 // Set Offset Y to 9. text.text = '<font face="OcBoxOcPix"/>' + '<font size="20"/>' + fingerings[index]; cursor.add(text); } }
But ideally, I'd like to add more spacing in between each note so it's not overlapping together like my the first line of my screenshot shows, and space below and above the lyric text so it's not overlapping the actual musical notation.
In the past I've manually added fingering and fixed formatting by setting the font as the second verse of lyrics, and I'd like to emulate this somehow.
Many thanks in advance!
Comments
Disabling autoplace is almost always a mistake, as it prevents MuseScore from automatically doing the very things you say you want done - adding space automatically to prevent collisions. However, even with autoplace enabled, staff text in particular doesn't space notes horizontally. Lyrics do, so you could consider adding them as lyrics instead, although I'm not sure how that would work exactly for the plugins. Or you might try co-opting Roman numeral analysis for this.
In reply to Disabling autoplace is… by Marc Sabatella
Yeah, when I enable autoplacement it does this which is worse somehow.
I hope it shouldn't be too hard to change the staff text to the second line of lyrics instead... Thanks for confirming that staff text doesn't space notes horizontally!
In reply to Yeah, when I enable… by Rammi
Lyrics attach to notes (well, chords) rather than segments. So the code would need to be adjusted some to make that happen, I assume. Might be an easier change to use RNA.
Even as it is, though, you can see that staff text with autoplace on is actually better in one crucial way: the collisions with the next staff down are gone., The only issue is not enough horizontal space. And that's very easy to fix, just turn up the spacing globally for the score. If those symbols will appear on most notes, a simple way to do that would be to increase the "Minimum note distance" in Format / Style / Measure to be enough to account for the symbols you are adding. Or, for that matter, just add a system break after the second non-empty measure so you aren't trying to squeeze so many measures onto a single line. That's going to be the end result of increasing spacing anyhow.