Create horizontal Line (TextLine)
I've been trying to create a horizontal line (as seen in the screenshot; available under "view > palletes" and then "lines") to achieve staff lines with different placement.
Aside: What I'm trying to achieve is to get a Klavarskribo-like notation (Dekker variant, 6-6 spacing), with two lines representing c# and d#, then a 1.5sp gap in between and three lines representing f#, g#, a#. You can see that the gap is 1.5 sp in the image where E+F are played together.
I have managed to place the notes to a fixed line and to add the ledger staff lines as symbols (and correct their offsetX so they are at the right position) with a plugin (derived from the colornotes plugin). I can also place those lines manually (although it is a bit tedious since it needs to be repeated after every system break!)
However I can't seem to find a way to place a horizontal line (for the whole staff if possible, but repeating it for every row or every measure would be feasible too in a plugin) programatically, which would allow me to really convert notes to this klavar-like notation at a single click.
I've checked the XML source code of a file with an added line and found the following:
However, I've neither been able to create a "Spanner" element or anything of the above.
I've also checked the plugin reference and was asuming that "TextLine" https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/names… would be the correct element i need to create, so i've tried
var line = newElement(Element.TEXTLINE); line.color = "#000000"; note.add(line);
Similarly i've tried to add this at a cursor position, but without effect. I'm probably going in an entirely wrong direction here, but this program seems to be a little to complex here for me to understand from the references. I haven't found any plugin that creates lines or slurs to copy from, so I'm stuck. Any ideas?