>>>> for a solitary bass note I want to have a bass clef, not >>>> affecting anything else in the staff. How can I fix the attached >>>> example? I guess I need a music function that adjusts the >>>> vertical note offset of the upper voice... >>> >>> Could you use an "ossia" that overlaps the staff? [...] >> >> A very nice idea, thanks! I admit that I would never have thought >> of that. Your example is almost perfect, except that I would like >> to avoid the horizontal gap caused by bass clef. What property >> controls that? I tried to modify some `Clef' properties given in >> `define-grobs.scm', but I didn't get the desired effect. > > Has the potential for overlapping ink, but try this: > > %%%% > \override Clef.X-extent = #'(1.5 . 1.5) > %%%%
Thanks, but this helps only partially. I've now extended the example, see the attached stuff. There are still two problems. * The overlay fails if used within a `PianoStaff' context. This is a showstopper. * The small bass clef is placed before a barline. Ideas? Werner
\version "2.19.83" % XXX hard-coded context `left' fakeBassClef = #(define-music-function (treble bass) (ly:music? ly:music?) #{ << { \voiceOne #treble \oneVoice } \new Staff \with { \remove "Time_signature_engraver" alignAboveContext = #"left" \override VerticalAxisGroup.default-staff-staff-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . -10) (stretchability . 0)) \omit StaffSymbol \override Clef.font-size = #-2 \override Clef.X-extent = #'(1.5 . 1.5) \override Clef.Y-offset = #(grob-transformer 'Y-offset (lambda (grob orig) (- orig 5))) } { \clef "bass" \voiceTwo #bass \oneVoice } >> #}) %%%%% \new Staff = "left" \relative c'' { c8 g a g \fakeBassClef { <fis ais cis> g } { c,,,4 } a'''8 g | \fakeBassClef { <fis ais cis>8 g } { c,,,4 } a'''8 g c g a g | \break \fakeBassClef { <fis ais cis>8 g } { c,,,4 } a'''8 g c g a g | c8 g a g \fakeBassClef { <fis ais cis> g } { c,,,4 } a'''8 g | } %%%%% \new PianoStaff { << \new Staff = "right" \relative c'' { c1 | c1 | c1 | c1 | } \new Staff = "left" \relative c'' { c8 g a g \fakeBassClef { <fis ais cis> g } { c,,,4 } a'''8 g | \fakeBassClef { <fis ais cis>8 g } { c,,,4 } a'''8 g c g a g | \break \fakeBassClef { <fis ais cis>8 g } { c,,,4 } a'''8 g c g a g | c8 g a g \fakeBassClef { <fis ais cis> g } { c,,,4 } a'''8 g | } >> }
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user