Jump to content

String quartet template (simple): Difference between revisions

From LilyPond wiki
No edit summary
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
This template demonstrates a simple string quartet. It also uses a <code>\global</code> section for time and key signatures
This template demonstrates a simple string quartet. It also uses a <code>\global</code> section for time and key signatures.
 
See also snippet [[String quartet template with separate parts]].


<lilypond version="2.24">
<lilypond version="2.24">
Line 36: Line 38:
   \new StaffGroup <<
   \new StaffGroup <<
     \new Staff \with { instrumentName = "Violin 1" }
     \new Staff \with { instrumentName = "Violin 1" }
    << \global \violinOne >>
      << \global \violinOne >>
     \new Staff \with { instrumentName = "Violin 2" }
     \new Staff \with { instrumentName = "Violin 2" }
    << \global \violinTwo >>
      << \global \violinTwo >>
     \new Staff \with { instrumentName = "Viola" }
     \new Staff \with { instrumentName = "Viola" }
    << \global \viola >>
      << \global \viola >>
     \new Staff \with { instrumentName = "Cello" }
     \new Staff \with { instrumentName = "Cello" }
    << \global \cello >>
      << \global \cello >>
   >>
   >>
   \layout { }
   \layout { }
Line 49: Line 51:
</lilypond>
</lilypond>


[[Category:Really simple]]
[[Category:Template]]
[[Category:Template]]
[[Category:Unfretted strings]]
[[Category:Unfretted strings]]
[[Category:Really simple]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]][[Category:Snippet]]
[[Category:Snippet]]

Latest revision as of 16:54, 14 December 2025

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

See also snippet String quartet template with separate parts.

\version "2.24"

global= {
  \time 4/4
  \key c \major
}

violinOne = \new Voice \relative c'' {
  c2 d
  e1
  \bar "|."
}

violinTwo = \new Voice \relative c'' {
  g2 f
  e1
  \bar "|."
}

viola = \new Voice \relative c' {
  \clef alto
  e2 d
  c1
  \bar "|."
}

cello = \new Voice \relative c' {
  \clef bass
  c2 b
  a1
  \bar "|."
}

\score {
  \new StaffGroup <<
    \new Staff \with { instrumentName = "Violin 1" }
      << \global \violinOne >>
    \new Staff \with { instrumentName = "Violin 2" }
      << \global \violinTwo >>
    \new Staff \with { instrumentName = "Viola" }
      << \global \viola >>
    \new Staff \with { instrumentName = "Cello" }
      << \global \cello >>
  >>
  \layout { }
  \midi { }
}