Bonjour Martial,
Je ne pense pas qu'il existe de solution simple...
J'ai ça dans ma boîte-à-utiles :
\version "2.20.0"
%% Dashed spanBar defs:
#(define (make-round-filled-box x1 x2 y1 y2 blot-diameter)
(ly:make-stencil (list 'round-filled-box (- x1) x2 (- y1) y2 blot-diameter)
(cons x1 x2)
(cons y1 y2)))
#(define-public (make-dashed-system-start-bar grob extent thickness)
(let* ((blot (ly:output-def-lookup (ly:grob-layout grob) 'blot-diameter))
(line-thickness (ly:staff-symbol-line-thickness grob))
(staff-space (ly:staff-symbol-staff-space grob))
(height (interval-length extent))
(gap (ly:grob-property grob 'gap 0.5))
(dash-size (- 1.0 gap))
;(num (ceiling (/ (* 1.5 height) (+ dash-size staff-space))))
(num (ceiling height))
(factors
(map
(lambda (x) (* x dash-size))
(iota (* 2 (- num 2)))))
(scaling (/ (- (+ height line-thickness) (* 3.0 dash-size))
(car (reverse factors))))
(stencil
(ly:stencil-add
(ly:stencil-translate-axis
(make-round-filled-box 0 thickness
(/ dash-size -2) 0 blot)
(+ (interval-end extent)(* 0.5 line-thickness))
Y)
(ly:stencil-translate-axis
(make-round-filled-box 0 thickness 0
(/ dash-size 2) blot)
(- (interval-start extent) (* 0.5 line-thickness))
Y))))
(define (helper args)
(set! stencil
(ly:stencil-add
stencil
(ly:stencil-translate-axis
(make-round-filled-box 0 thickness
(car args) (cadr args) blot)
(+ (* 1.5 dash-size) (- (interval-start extent) (* 0.5 line-thickness)))
Y)))
(if (null? (cddr args))
stencil
(helper (cddr args))))
(set! factors (map (lambda (x) (* scaling x)) factors))
(if (zero? num)
empty-stencil
(helper factors))))
dashedStart =
\override Score.SystemStartBar.stencil =
#(lambda (grob)
(let*((stencil (ly:system-start-delimiter::print grob))
(stencil-y-extent (ly:stencil-extent stencil Y))
(line-thickness (ly:staff-symbol-line-thickness grob))
(new-stencil-extent (interval-widen stencil-y-extent (* -0.5
line-thickness)))
(thickness (ly:grob-property grob 'thickness))
(grob-thickness (* line-thickness thickness)))
(make-dashed-system-start-bar grob new-stencil-extent grob-thickness)))
%%%%%%%%% Test :
\score {
<<
<<
\relative c' { c1 e g c }
\addlyrics { a a a a }
>>
<<
\relative c' { \omit Staff.TimeSignature c1 e g c }
\addlyrics { b b b b }
>>
<<
\relative c' { \omit Staff.TimeSignature c1 e g c \bar ":|."}
\addlyrics { c c c c }
>>
>>
\layout { \dashedStart }
}
Cordialement,
Pierre