Am Fr., 1. Feb. 2019 um 20:19 Uhr schrieb Malte Meyn <lilyp...@maltemeyn.de>: > > Am 01.02.19 um 18:42 schrieb Aaron Hill: > > On 2019-02-01 9:04 am, Malte Meyn wrote: > >> Am 01.02.19 um 16:53 schrieb Aaron Hill: > >>> "" is already a valid bar line that has an empty glyph, so just > >>> extend that one: > >>> > >>> %%%% > >>> \version "2.19.82" > >>> > >>> \defineBarLine "-span" #'("|" "|" "|") > >>> \layout { \context { \Score defaultBarType = "-span" } } > >>> \new StaffGroup << \new Staff \repeat unfold 12 b'4 > >>> \new Staff \repeat unfold 12 b'4 >> > >>> %%%% > >> > >> That’s not enough: #'("|" "|" "|") will make full bar lines at line > >> breaks. When I try #'("" "" "|") instead, no span bar is printed at > >> line end. But the following seems to work: > > > > I goofed when I posted my solution, as I had intended it to be #'("" "" > > "|"), since it was meant to be only the span bar. > > > >> • in the middle of a line, the staff bar is taken from the name "-m" > >> and the span bar from the third argument "|" > >> • at the begin of a line, the second argument is used: "" is an empty > >> staff bar *with empty span bar* (default for "" bar lines) > >> • at the end of a line, the first argument is used: "" is not > >> sufficient here, because the span bar is taken from the "" definition > >> instead of the third argument; setting the first argument to "-m" > >> looks into the third argument of this definition. > > > > That very much sounds like a bug and should be reported. The final > > argument is the span setting which should be agnostic of start and end > > styles and vice versa. > Hm … I don’t think that this is correct: How about > \defineBarLine ".|:-||" #'("||" ".|:" ".|") > ? If the span bar ".|" would be used at all positions, the output at > line breaks wouldn’t be correct: the "||" bar at the line end would have > a ".|" span bar too …
I don't see any bug, neither I understand: > But I don’t know why we have the span bar argument at all then … Anyway, if a new barline is wished (with a new glyph, like "m"), it needs to be defined from scratch. The NR says: "If additional elements are needed, LilyPond provides a simple way to define them. For more information on modifying or adding bar lines, see file ‘scm/bar-line.scm’." Well, this is not very verbose ... lol ... but to explain it, would beyond the Notation _Reference_, rather the Extending Manual could be amended. We have ‘bar-line-define-bar-glyph.ly’ in the regtests, though. lilypond.org/doc/v2.19/input/regression/8d/lily-e521e794.ly (This example avoids caring about span-bars, though, setting span-bars to "") In short: A barline-printing-procedure, with the required arguments 'grob' and 'extent' needs to be assigned to a glyph (of string-length 1) via 'add-bar-glyph-print-procedure'. Then the new barline could be defined via '\defineBarLine' or it's scheme-equivalent 'define-bar-line' An example: \version "2.19.82" #(define (make-foo-bar-line grob extent) (let* ((stil (box-stencil (grob-interpret-markup grob (make-vcenter-markup "FOO")) 0.2 0.1)) (stil-x-extent (ly:stencil-extent stil X))) ;; To get span-bars correct, some moving is needed (ly:stencil-translate-axis (ly:make-stencil (ly:stencil-expr stil) stil-x-extent extent) (interval-center extent) Y))) #(add-bar-glyph-print-procedure "f" make-foo-bar-line) #(define-bar-line "f" "f" "f" "f") \score { \new StaffGroup \with { \override SpanBar.color = #red } << \repeat unfold 10 R1 \repeat unfold 10 R1 { R1 \bar "f" r1^\markup \raise #20 \null \repeat unfold 8 R1 } >> \layout { \context { \Score defaultBarType = "f" } } } For the topic of Mensurstriche, Malte already pointed out the howto: \defineBarLine "-m" #'("-m" "" "|") Which does not need a new printing procedure, but is an alternative to ""-bar. Cheers, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user