Grouping contexts: Difference between revisions

m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
In polyphonic notation, many voices can share a staff: In this situation, the accidentals and staff are shared, but the stems, slurs, beams, etc., are private to each voice. Hence, engravers should be grouped. The engravers for note head, stems, slurs, etc., go into a group called “Voice context”, while the engravers for key, accidental, bar, etc., go into a group called “Staff context”. In the case of polyphony, a single Staff context contains more than one Voice context. Similarly, more Staff contexts can be put into a single Score context.
In polyphonic notation, many voices can share a staff: In this situation, the accidentals and staff are shared, but the stems, slurs, beams, etc., are private to each voice. Hence, engravers should be grouped. The engravers for note head, stems, slurs, etc., go into a group called “Voice context”, while the engravers for key, accidental, bar, etc., go into a group called “Staff context”. In the case of polyphony, a single Staff context contains more than one Voice context. Similarly, more Staff contexts can be put into a single Score context.


<lilypond version="2.24" full>
<lilypond version="2.24">
%% http://lsr.di.unimi.it/LSR/Item?id=108
 
\layout {
  indent = 0
}
 
topVoice = \relative c' {
topVoice = \relative c' {
   \key d\major
   \key d\major
Line 46: Line 40:


\score {
\score {
   \context Staff << \topVoice \\ \botVoice >>
   \new Staff << \topVoice \\ \botVoice >>
}
}


\score {
\score {
Line 56: Line 49:
   >>
   >>
}
}
\paper { tagline = ##f }
</lilypond>
</lilypond>


Line 63: Line 54:
[[Category:Contexts and engravers]]
[[Category:Contexts and engravers]]
[[Category:Real music]]
[[Category:Real music]]
[[Category:Snippet]]