Next: , Previous: Piano templates, Up: Example templates



3.4 Small ensembles

3.4.1 String quartet

This template demonstrates a string quartet. It also uses a \global section for time and key signatures.

     \version "2.3.22"
     global = {
        \time 4/4
        \key c \major
     }
     
     violinOne = \relative c''{
        \set Staff.instrument = "Violin 1  "
        c2 d
        e1
     }
     
     violinTwo = \relative c''{
        \set Staff.instrument = "Violin 2  "
        g2 g
        g1
     }
     
     viola = \relative c'{
        \set Staff.instrument = "Viola  "
        \clef alto
        e2 d
        c1
     }
     
     cello = \relative c'{
        \set Staff.instrument = "Cello  "
        \clef bass
        c2 g
        c,1
     }
     
     \score {
        \new StaffGroup <<
           \new Staff << \global \violinOne >>
           \new Staff << \global \violinTwo >>
           \new Staff << \global \viola >>
           \new Staff << \global \cello >>
        >>
        \layout { }
        \midi { \tempo 4=60}
     }

[image of music]

This page is for LilyPond-2.4.5 (stable-branch).

Report errors to <bug-lilypond@gnu.org>.

Other languages: English.
Using automatic language selection.