Create horizontal Line (TextLine)

• Jul 18, 2022 - 09:28

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:
          <Spanner type="TextLine">

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"… would be the correct element i need to create, so i've tried

                                      var line = newElement(Element.TEXTLINE);
                                      line.color = "#000000";

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?


See attached for a different approach in creating the combined staff; by combining three staves in an instrument and using fixed spacers on them. Due to a bug in the spacing logic, you have to disable "vertical justification" of the score for those spacers to take effect.

I'm not sure whether this approach would be any more "automatable" via a plugin or not, but I just wanted to offer you a different angle to the problem in case you needed one.

Turn on unprintable and invisible items and inspect the (advanced) staff properties for each staff.

Attachment Size
333634-dekker_notation.mscz 7.91 KB

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