lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to detect SpanBar from inside a make-bar-line definition?


From: Thomas Morley
Subject: How to detect SpanBar from inside a make-bar-line definition?
Date: Wed, 13 Mar 2024 22:35:09 +0100

Hi,

currently I'm attempting to improve dashed/dotted bar lines wrt to
changed staff-space and span bars.
We use both definitions for BarLine _and_ SpanBar, but then SpanBar is
frequently a little off.
It would be nice to have a possibility to detect whether a definition
is used for span bars.
But how to?

Her some code to play with, `grob::make-span-bar?' should become
something else ofcourse...

#(define (make-test-bar-line grob extent)
  (let ((grob::make-span-bar? #f))
    (if grob::make-span-bar?
        ((@@ (lily) make-simple-bar-line) grob extent)
        ((@@ (lily) make-dotted-bar-line) grob extent))))

#(add-bar-glyph-print-procedure "t" make-test-bar-line)
#(define-bar-line "t" "t" "t" "t")

tst = { s1 \bar "t" s }

\new StaffGroup
<<
  \new Staff \tst
  \new Staff \tst
>>

Thanks,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]