lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: treble and bass clef simultaneously


From: Aaron Hill
Subject: Re: treble and bass clef simultaneously
Date: Wed, 27 Mar 2019 02:10:12 -0700
User-agent: Roundcube Webmail/1.3.8

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

Attachment: once-bass-clef.cropped.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]