Next: , Previous: Staff symbol, Up: Modifying single staves


Ossia staves

Ossia staves can be set by creating a new simultaneous staff in the appropriate location:

     
     \new Staff \relative c'' {
       c4 b d c
       <<
         { c4 b d c }
         \new Staff { e4 d f e }
       >>
       c4 b c2
     }

[image of music]

However, the above example is usually not the desired result. To create ossia staves that are above the original staff, have no time signature or clef, and have a smaller font size, tweaks must be used. The Learning Manual describes a specific technique to achieve this goal, beginning with Nesting music expressions.

The following example uses the alignAboveContext property to align the ossia staff. This method is most appropriate when only a few ossia staves are needed.

     
     \new Staff = main \relative c'' {
       c4 b d c
       <<
         { c4 b d c }
     
         \new Staff \with {
           \remove "Time_signature_engraver"
           alignAboveContext = #"main"
           fontSize = #-3
           \override StaffSymbol #'staff-space = #(magstep -3)
           \override StaffSymbol #'thickness = #(magstep -3)
           firstClef = ##f
         }
         { e4 d f e }
       >>
       c4 b c2
     }

[image of music]

If many isolated ossia staves are needed, creating an empty Staff context with a specific context id may be more appropriate; the ossia staves may then be created by calling this context and using \startStaff and \stopStaff at the desired locations. The benefits of this method are more apparent if the piece is longer than the following example.

     
     <<
       \new Staff = ossia \with {
         \remove "Time_signature_engraver"
         \remove "Clef_engraver"
         fontSize = #-3
         \override StaffSymbol #'staff-space = #(magstep -3)
         \override StaffSymbol #'thickness = #(magstep -3)
       }
       { \stopStaff s1*6 }
     
       \new Staff \relative c' {
         c4 b c2
         <<
           { e4 f e2 }
           \context Staff = ossia {
             \startStaff e4 g8 f e2 \stopStaff
           }
         >>
         g4 a g2 \break
         c4 b c2
         <<
           { g4 a g2 }
           \context Staff = ossia {
             \startStaff g4 e8 f g2 \stopStaff
           }
         >>
         e4 d c2
       }
     >>

[image of music]

Using the \RemoveEmptyStaffContext command to create ossia staves may be used as an alternative. This method is most convenient when ossia staves occur immediately following a line break. In this case, spacer rests do not need to be used at all; only \startStaff and \stopStaff are necessary. For more information about \RemoveEmptyStaffContext, see Hiding staves.

     
     <<
       \new Staff = ossia \with {
         \remove "Time_signature_engraver"
         \remove "Clef_engraver"
         fontSize = #-3
         \override StaffSymbol #'staff-space = #(magstep -3)
         \override StaffSymbol #'thickness = #(magstep -3)
       }
       \new Staff \relative c' {
         c4 b c2
         e4 f e2
         g4 a g2 \break
         <<
           { c4 b c2 }
           \context Staff = ossia {
             c4 e8 d c2 \stopStaff
           }
         >>
         g4 a g2
         e4 d c2
       }
     >>
     
     \layout {
       \context {
         \RemoveEmptyStaffContext
         \override VerticalAxisGroup #'remove-first = ##t
       }
     }

[image of music]

Selected Snippets

Vertically aligning ossias and lyrics

This snippet demonstrates the use of the context properties alignBelowContext and alignAboveContext to control the positioning of lyrics and ossias.

     
     \paper {
       ragged-right = ##t
     }
     
     \relative c' <<
       \new Staff = "1" { c4 c s2 }
       \new Staff = "2" { c4 c s2 }
       \new Staff = "3" { c4 c s2 }
       { \skip 2
         <<
           \lyrics {
             \set alignBelowContext = #"1"
             lyrics4 below
           }
           \new Staff \with {
             alignAboveContext = #"3"
             fontSize = #-2
             \override StaffSymbol #'staff-space = #(magstep -2)
             \remove "Time_signature_engraver"
           } {
             \times 4/6 {
               \override TextScript #'padding = #3
               c8^"ossia above" d e d e f
             }
           }
         >>
       }
     >>

[image of music]

See also

Music Glossary: ossia, staff, Frenched staff.

Learning Manual: Nesting music expressions, Size of objects, Length and thickness of objects.

Notation Reference: Setting the staff size.

Snippets: Staff notation.

Internals Reference: StaffSymbol.

Esta página corresponde a LilyPond-2.11.58 (rama de desarrollo).

Informe de los fallos a través de la lista en español lilypond-es, o en inglés a través de http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.

Se agradecen las sugerencias para la documentación.