On 2019-03-27 1:22 am, Werner LEMBERG wrote:
Folks,


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?

%%%%
\version "2.19.82"

\new Staff = "main" {
  \clef "treble"
  c''8 g' a' g'
  << { c''8 g' }
    \new Staff \with {
      \remove "Time_signature_engraver"
      alignAboveContext = #"main"
      \override VerticalAxisGroup.default-staff-staff-spacing =
        #'((basic-distance . 0) (minimum-distance . 0)
           (padding . -10) (stretchability . 0))
      \omit StaffSymbol
      \override Clef.font-size = #-3
      \override Clef.Y-offset = #(grob-transformer 'Y-offset
        (lambda (grob orig) (- orig 7/2)))
      \override NoteHead.font-size = #-3
      \override Stem.length = #(grob-transformer 'length
        (lambda (grob orig) (* 2/3 orig)))
    }
    { \clef "bass" c,4\laissezVibrer }
  >>
  a'8 g'

  c''8 g' a' g'
  << { c''8 g' }
    \new Staff \with {
      \remove "Time_signature_engraver"
      \remove "Clef_engraver"
      alignAboveContext = #"main"
      \override VerticalAxisGroup.default-staff-staff-spacing =
        #'((basic-distance . 0) (minimum-distance . 0)
           (padding . -10) (stretchability . 0))
      \omit StaffSymbol
      \override NoteHead.font-size = #-3
      \override Stem.length = #(grob-transformer 'length
        (lambda (grob orig) (* 2/3 orig)))
      \override OttavaBracket.font-size = #-3
    }
    { \clef "treble" \ottava #-2 c,4\laissezVibrer }
  >>
  a'8 g'
}
%%%%

Because of the non-standard positioning of the bass clef, I provided a version that uses an ottava bracket instead but keeps the note in the treble clef. In both cases, I shrank the note size as in keeping with cue notes.


-- Aaron Hill
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to