> here my factious approach: [...] Thanks a lot! Attached is the same sample code as with Aaron's solution. Do you see a possibility to make leading skips work in the second argument of \clefTst?
Werner
\version "2.19.82" \layout { \context { \Voice \name "ClefVoice" \alias "Voice" \consists "Clef_engraver" clefGlyph = #"clefs.F" middleCPosition = #6 clefPosition = #-8 explicitClefVisibility = ##(#f #t #t) \override Clef.full-size-change = ##t \override Clef.font-size = #-4 \override Clef.space-alist.next-note = #'(fixed-space . 2) \override Clef.after-line-breaking = #(lambda (grob) (let ((col (ly:item-get-column grob))) (if (eqv? (ly:item-break-dir grob) 1) (ly:grob-translate-axis! grob (cdr (ly:grob-extent col col X)) X)))) } %% probably let ClefVoice be accepted by other contexts too \context { \Staff \accepts "ClefVoice" } } clefTst = #(define-music-function (m1 m2) (ly:music? ly:music?) #{ << $m1 \context ClefVoice = "ClefVoice" { \voiceTwo %% Mmmh, this is a Score-override, may cause problems ... \temporary \override Score.BreakAlignment.before-line-breaking = #(lambda (grob) (if (eqv? (ly:item-break-dir grob) 0) (ly:grob-set-property! grob 'break-align-orders (make-vector 3 '(span-bar breathing-sign staff-bar key-cancellation key-signature time-signature clef))))) \set forceClef = ##t $m2 \revert Score.BreakAlignment.before-line-breaking } >> #}) \new PianoStaff << \new Staff = "right" { \repeat unfold 8 { c'8_[ b''' b''' c'] } | } \new Staff = "left" \relative c'' { c8 g'' a g,, \clefTst { <fis ais cis> g } { c,,,4 } a'''8 g | \clefTst { <fis ais cis>8 g } { s cis,,,8 } a'''8 g c g a g | \break \clefTst { <fis ais cis>8 g } { c,,,4 } a'''8 g c g a g | c8 g'' a g,, \clefTst { <fis ais cis> g } { s ces,,,8 } a'''8 g | } >>
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user