String quartet template with separate parts: Difference between revisions

m New category
Tags: Mobile edit Mobile web edit
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
The “String quartet template” snippet produces a nice string quartet, but what if you needed to print parts? This new template demonstrates how to use the <code>\tag</code> feature to easily split a piece into individual parts.
The [[String quartet template (simple)]] snippet produces a nice string quartet, but what if you need to print parts? This new template demonstrates how to use the <code>\tag</code> feature to easily split a piece into individual parts.


You need to split this template into separate files; the filenames are contained in comments at the beginning of each file. <code>piece.ly</code> contains all the music definitions. The other files – <code>score.ly</code>, <code>vn1.ly</code>, <code>vn2.ly</code>, <code>vla.ly</code>, and <code>vlc.ly</code> – produce the appropriate part.
For technical reasons, multiple output files cannot be shown here for a single snippet, which means that the template below unifies the code for separate files. The file names are contained in comments at the beginning of each file.
 
<code>piece.ly</code> contains all the music definitions. The other files – <code>score.ly</code>, <code>vn1.ly</code>, <code>vn2.ly</code>, <code>vla.ly</code>, and <code>vlc.ly</code> – produce the full score and the four parts.


Do not forget to remove specified comments when using separate files!
Do not forget to remove specified comments when using separate files!
Line 7: Line 9:
<lilypond version="2.24">
<lilypond version="2.24">
% piece.ly
% piece.ly
% (This is the global definitions file)
% (This is the global definitions file.)


global= {
global= {
Line 36: Line 38:
}
}


music = {
music = <<
  <<
  \tag #'score \tag #'vn1
    \tag #'score \tag #'vn1
  \new Staff \with { instrumentName = "Violin 1" }
    \new Staff \with { instrumentName = "Violin 1" }
     << \global \Violinone >>
     << \global \Violinone >>


    \tag #'score \tag #'vn2
  \tag #'score \tag #'vn2
    \new Staff \with { instrumentName = "Violin 2" }
  \new Staff \with { instrumentName = "Violin 2" }
     << \global \Violintwo >>
     << \global \Violintwo >>


    \tag #'score \tag #'vla
  \tag #'score \tag #'vla
    \new Staff \with { instrumentName = "Viola" }
  \new Staff \with { instrumentName = "Viola" }
     << \global \Viola >>
     << \global \Viola >>


    \tag #'score \tag #'vlc
  \tag #'score \tag #'vlc
    \new Staff \with { instrumentName = "Cello" }
  \new Staff \with { instrumentName = "Cello" }
     << \global \Cello >>
     << \global \Cello >>
  >>
>>
}
 


% These are the other files you need to save on your computer
% These are the other files you need to save on your computer


% score.ly
% score.ly
% (This is the main file)
% (This is the main file.)


% uncomment the line below when using a separate file
% Uncomment the line below when using a separate file.
%\include "piece.ly"
% \include "piece.ly"


#(set-global-staff-size 14)
#(set-global-staff-size 14)
Line 73: Line 74:




%{ Uncomment this block when using separate files
%{ Uncomment this block when using separate files.


% vn1.ly
% vn1.ly
% (This is the Violin 1 part file)
% (This is the Violin 1 part file.)


\include "piece.ly"
\include "piece.ly"
Line 85: Line 86:


% vn2.ly
% vn2.ly
% (This is the Violin 2 part file)
% (This is the Violin 2 part file.)


\include "piece.ly"
\include "piece.ly"
Line 94: Line 95:


% vla.ly
% vla.ly
% (This is the Viola part file)
% (This is the Viola part file.)


\include "piece.ly"
\include "piece.ly"
Line 103: Line 104:


% vlc.ly
% vlc.ly
% (This is the Cello part file)
% (This is the Cello part file.)


\include "piece.ly"
\include "piece.ly"
Line 114: Line 115:
</lilypond>
</lilypond>


[[Category:Preparing parts]]
[[Category:Template]]
[[Category:Template]]
[[Category:Unfretted strings]]
[[Category:Unfretted strings]]
[[Category:Preparing parts]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]
[[Category:Snippet]]