Hello!

I'm trying to implement cross-staff stems that would not get
disconnected when the distance between staves changes.

Ideally, I need a function that would extend the stem from the note in
the lower staff exactly until it meets the stem of the note on the
staff above.

As a simpler solution, I want the stem length to be as long as
the distance between staves plus or minus a constant.

Since I need both the context and the particular note, I decided to go
with the \applyOutput approach and filter out non-stems.

That's where I got so far:

#(define (longerstem grob grob-origin context)
   (if (memq 'stem-interface (ly:grob-interfaces grob))
       (set! (ly:grob-property grob 'length)
             (cdr (assoc 'Y-extent (ly:context-grob-definition context
                     'VerticalAlignment))))))

<< \applyOutput #'Voice #longerstem c4 >>

I get this in the output:

programming error: no pure Y common refpoint

Does anyone have an idea how to deal with it?

-- 
Regards,
Pavel Roskin

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to