5

I'm learning BWV775 (Bach Invention IV - D Minor) and the score I'm working from has a small extra staff for a trill in measure 17

enter image description here

The treble & bass staves are easy enough in Lilypond, and for the trill mark, I've just used /trill in the treble voice

f-1[ g] g8.[ \trill f16]

which gives me

enter image description here

What's the best approach to add a staff at this measure? Create some sort of new staff with \context Staff in the voice at that point?

My piano scores have been pretty simple to date using

\score {
    \context GrandStaff <<
     \context Staff = "one" <<
       \voiceone
     >>
     \context Staff = "two" <<
       \voicetwo
     >>
   >>

1 Answer 1

7

The documentation calls this an "Ossia staff" (see here).

The main idea is to make a new staff \with an alignAboveContext that links it to the upper staff.

  • In the example in the documentation they use firstClef = ##f to hide the clef symbol in this new staff, but this isn't done in the image you are trying to replicate.

  • To hide the time signature use: \remove "Time_signature_engraver".

  • To scale the new staff use: \magnifyStaff #2/3
    This will also make the bar lines thinner, so you’ll want to revert them to their usual thickness by using:
    \revert BarLine.hair-thickness
    \revert BarLine.thick-thickness
    which prevents a misalignments issue with the normal bar lines.

  • You might also want to reduce the distance to the ossia staff with:
    \override VerticalAxisGroup.staff-staff-spacing.minimum-distance = 2
    \override VerticalAxisGroup.staff-staff-spacing.basic-distance = 8

  • To get the lower mordent symbol use \prall rather than trill.

You should get something like this:

%% GRAND STAFF
\new GrandStaff {
    <<
        %% UPPER STAFF
        \new Staff = "upper" {
            \key f \major
            \time 3/8
            f'16[ g']
            <<
                {
                    g'8.[\prall f'16] |
                }
                %% OSSIA
                \new Staff \with {
                    alignAboveContext = "upper"
                    %firstClef = ##f
                    \remove "Time_signature_engraver"
                    \magnifyStaff #2/3
                    \revert BarLine.hair-thickness
                    \revert BarLine.thick-thickness
                    \override VerticalAxisGroup.staff-staff-spacing.minimum-distance = 5
                    \override VerticalAxisGroup.staff-staff-spacing.basic-distance = 8
                } {
                    \key f \major
                    \tuplet 3/2 {a'32 g' a'} g'8 f'16 |
                }
            >>
            f'8
        }
        %% LOWER STAFF
        \new Staff = "lower" {
            \clef "bass"
            \key f \major
            \time 3/8
            d16 bes, c8 c, |
            f,16 g,
        }
    >>
}

Ossia staff

1
  • 2
    I can confirm that the trill is also added to the midi output!
    – timbo
    Mar 19, 2022 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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