You can add the following just before your \bar "|:" (I would rather
recommend you
to use the \repeat command to typeset the |: and :|, though and in
that case, the
following command should be just before the \repeat.)
\once \override Score.BarLine #'break-visibility =
#end-of-line-invisible
Below, you can find a complicated alternative solution that adds a new
bar type
with this behaviour, so you could say \bar "e|:".
\version "2.10.33"
#(define my-bar-glyph-alist
'((":|:" . (":|" . "|:"))
("||:" . ("||" . "|:"))
("dashed" . ("dashed" . '()))
("|" . ("|" . ()))
("||:" . ("||" . "|:"))
("|s" . (() . "|"))
("|:" . ("|" . "|:"))
("e|:" . (() . "|:"))
("|." . ("|." . ()))
;; hmm... should we end with a bar line here?
(".|" . ("|" . ".|"))
(":|" . (":|" . ()))
("||" . ("||" . ()))
(".|." . (".|." . ()))
("" . ("" . ""))
(":" . (":" . ""))
("." . ("." . ()))
("empty" . (() . ()))
("brace" . (() . "brace"))
("bracket" . (() . "bracket"))
))
#(define (index-cell cell dir)
(if (equal? dir 1)
(cdr cell)
(car cell)))
#(define (bar-line::my-calc-glyph-name grob)
(let* (
(glyph (ly:grob-property grob 'glyph))
(dir (ly:item-break-dir grob))
(result (assoc glyph my-bar-glyph-alist))
(glyph-name (if (= dir CENTER)
glyph
(if (and result (string? (index-cell (cdr
result) dir)))
(index-cell (cdr result) dir)
#f)))
)
glyph-name))
#(define-public (bar-line::my-calc-break-visibility grob)
(let* ((glyph (ly:grob-property grob 'glyph))
(result (assoc glyph my-bar-glyph-alist)))
(if result
(vector (string? (cadr result)) #t (string? (cddr result)))
#(#f #f #f))))
\layout{
\context{
\Score
\override BarLine #'glyph-name = #bar-line::my-calc-glyph-name
\override BarLine #'break-visibility =
#bar-line::my-calc-break-visibility
}
}
\relative c'{
e4 e e e | e e e \bar "e|:" \break e | e e e e |
}
/Mats
Dominic Neumann wrote:
Hi,
I´ve got a little problem. When I write music, sometimes it is
necessary to
insert a break where there´s a special barline, e.g. if you have
something like that:
e4 e e e | e e e \bar "|:" e | e e e e | ...
it would be nicer to insert a break at the "|:" barline. This works
great by writing
e4 e e e | e e e \bar "|:" \break e | e e e e | ...
but the problem is that I need an invisible barline before the break.
Lilypond
prints a normal barline there and that´s not what I want.
I also tried
e4 e e e | e e e \bar "" \break \bar "|:" e | e e e e | ...
but this didn´t work.
Could you please give me a hint?
Thanks, Dominic