Le 17/12/2021 à 16:22, Molly Preston a écrit :
Someone helped with fixing the 8va so it didn't repeat 8va after the
line break. However, it is producing a solid line where the 8va is,
but only in this one place:
\version "2.22.1"
upper = {
#(define (my-callback grob)
(let* (
; have we been split?
(orig (ly:grob-original grob))
; if yes, get the split pieces (our siblings)
(siblings (if (ly:grob? orig)
(ly:spanner-broken-into orig) '() )))
(if (and (>= (length siblings) 2)
(not (eq? (car siblings) grob)))
(ly:grob-set-property! grob 'text #f)
(ly:grob-set-property! grob 'stencil (ly:ottava-bracket::print
grob)))))
\time 5/4
\override Staff.OttavaBracket.after-line-breaking = #my-callback
dis'''8\( \ottava #1 <dis''' dis''''> 8 < ais'' ais''' >2 ~ <
ais'' ais''' >\) |
\ottava #0
\time 6/8
\tempo \markup { \concat { "Like a lullaby"
\hspace #0.75 \general-align #Y #DOWN \note {8} #UP
" = "
\hspace #0.5
ca. \hspace #0.5 "100"
}
}
% \once \override TextScript.Y-offset = #-5
\time 6/8
dis'''4. _\markup {\dynamic mp {\italic dolce } }
\( ~ dis'''8 gis''4 |
}
lower = {
\clef treble
<gis' cis'' dis'' e'' >2. ~ <gis' cis'' dis'' e'' > 2
\time 6/8
fis'8\( b ais dis' ais b \) |
}
\score {
\new PianoStaff {
<<
\set PianoStaff.instrumentName = #"Piano"
\new Staff = "upper"{ \upper \autoBeamOff }
\new Staff = " lower" \lower
>>
}
\layout {
}
}
I'm not sure if I need to later the scheme code in some way to make it
dotted again. Any suggestions?
This is an incarnation of
https://gitlab.com/lilypond/lilypond/-/issues/6067
You can work around it, and make the code more
generally clean, like this:
\version "2.22.1"
#(define (ottava-bracket::print-only-if-first grob)
(let* ((original (ly:grob-original grob))
(siblings (ly:spanner-broken-into original)))
(if (and (pair? siblings)
(eq? grob (car siblings)))
'()
(ly:ottava-bracket::print grob))))
upper = {
\time 5/4
\override Staff.OttavaBracket.stencil =
#ottava-bracket::print-only-if-first
dis'''8\( \ottava #1 <dis''' dis''''> 8 < ais'' ais''' >2 ~ <
ais'' ais''' >\) |
\ottava #0
\time 6/8
\tempo \markup { \concat { "Like a lullaby"
\hspace #0.75 \general-align #Y #DOWN \note {8} #UP
" = "
\hspace #0.5
ca. \hspace #0.5 "100"
}
}
% \once \override TextScript.Y-offset = #-5
\time 6/8
dis'''4. _\markup {\dynamic mp {\italic dolce } } ~
dis'''8 gis''4 |
}
lower = {
\clef treble
<gis' cis'' dis'' e'' >2. ~ <gis' cis'' dis'' e'' > 2
\time 6/8
fis'8\( b ais dis' ais b \) |
}
\score {
\new PianoStaff {
<<
\set PianoStaff.instrumentName = #"Piano"
\new Staff = "upper"{ \upper \autoBeamOff }
\new Staff = " lower" \lower
>>
}
\layout {
}
}
Regards,
Jean