3

In Lilypond, I am trying to change the appearance of instrument names and staff group names. Below are two images; the first is what I currently have and the second is the look I am trying to achieve.

My current output

In my current output, the instrument names are all aligned with the staff group name (which is rotated).

The desired look

In the image of the look I want, the instrument names are "under" (to the right) of the staff group name and the staff group brace.

I have been unable to find where to change the look of these. Any help is greatly appreciated.

1 Answer 1

3

To get a simple square bracket you need to use:
\set StaffGroup.systemStartDelimiter = #'SystemStartSquare

But to get it the instrument names "under" you'll need to apply and extra-offset:
\override StaffGroup.SystemStartSquare.extra-offset = #'(-18 . 0)

To get vertical text you can use:
\rotate #90

There are some other tricks in the code below, and I'm sure you'll need to make some adjustments, but I hope you'll be able to manage from here.

Code

Something like this:

\version "2.21.0"

flute = {
    \new Staff {
        \set Staff.instrumentName = "Flute"
        \set Staff.midiInstrument = "flute"
        \clef "treble"
        \key aes \major
        \transposition c'
            aes''2. |
    }
}

altoSaxophone = {
    \new Staff {
        \set Staff.instrumentName = \markup {\concat{E\super\flat} Alto}
        \set Staff.midiInstrument = "alto sax"
        \clef "treble"
        \key f \major
        \transposition ees
            d'8 r8 r4 r4 |
    }
}

tenorSaxophone = {
    \new Staff {
        \set Staff.instrumentName = \markup {\concat{B\super\flat} Ten.}
        \set Staff.midiInstrument = "tenor sax"
        \clef "treble"
        \key bes \major
        \transposition bes,
            d''4 r4 r4 |
    }
}

baritoneSaxophone = {
    \new Staff {
        \set Staff.instrumentName = \markup {\concat{E\super\flat} Bar.}
        \set Staff.midiInstrument = "baritone sax"
        \clef "treble"
        \key f \major
        \transposition es,
            a'2 r4 |
    }
}

bassSaxophoneContrabassClarinet = {
    \new Staff {
        \set Staff.instrumentName =
            \markup {
                \center-column {
                    \line {\concat{B\super\flat} Bass /}
                    \line {C. Bs. Cl}
                }
            }
        \set Staff.midiInstrument = "clarinet"

        \clef "treble"
        \key bes \major
        \transposition bes,,
            d'4 r4 r4 |
    }
}

contents = {
    \time 3/4
    
    \new StaffGroup {
        <<
            \flute
            
            \new StaffGroup {
                \set StaffGroup.systemStartDelimiter = #'SystemStartSquare
                \override StaffGroup.SystemStartSquare.extra-offset = #'(-18 . 0)
                \set StaffGroup.instrumentName = \markup {\hspace #-12 \rotate #90 Sax.}
                <<
                    \altoSaxophone
                    \tenorSaxophone
                    \baritoneSaxophone
                    \bassSaxophoneContrabassClarinet
                >>
            }
        >>
    }
}

\score {
    \contents
    \layout {
        indent = 35
    }
}

\score {
    \contents
    \midi { }
}

image of LilyPond output PDF

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.