User:Crantila/FSC/Typesetting/LilyPond Orchestral

Working on an Large Ensemble Score
Part of: Joseph Haydn's "Sinfonia No. 92: Oxford," first movement.

!! For readers who want to input this while following the tutorial, I'll have to provide the resulting PDF output from LilyPond as their basis for input.
 * you shouldn't look at the source file until after inputting it yourself

Starting the Score
!! You added an additional staff for the 2nd oboe, which isn't in some of these instructions


 * 1) 'LilyPond > Setup New Score'
 * 2) "Titles and Headers" Tab:
 * 3) * Dedication: Comte d'Ogny and Prince Oettingen-Wallerstein
 * 4) * Title: Sinfonia No. 92
 * 5) * Subtitle: "Oxford"
 * 6) * Composer: Haydn, Joseph
 * 7) * all the rest are blank
 * 8) "Parts" Tab:
 * 9) * Flute, 2 of Oboe, Bassoon
 * 10) * Horn in F, Trumpet in C
 * 11) * Timpani
 * 12) * Violin, Violin, Viola, Cello, Contrabass
 * 13) "Score settings" Tab:
 * 14) * Key signature: G Major
 * 15) * Time signature: 3/4
 * 16) * Tempo indication: Adagio
 * 17) * other settings as desired; I recommend not remocing bar numbers, and removing the default tagline
 * 18) Click "Try" to see if it works.
 * 19) * It should, but the instrument names are not correct as per the score; we'll adjust this later.
 * 20) Click "OK" to generate the score.

Adjusting Frescobaldi's Output
These steps are useful in establishing a consistent input style for LilyPond. The things suggested here are also useful for getting used to working with large scores, which can be a challenge in any text editor. Thankfully, careful (and consistent!) code organization goes a long way in helping you to quickly find your way around your files. Setting up files the right way to begin with makes this much easier in the end.

When you first setup the score, Frescobaldi will have created many sections for you by default. The program avoids making too many stylistic choices for you, which allows you to create your own style. It also sets up the default sections in a logical way: version header widely-used settings like tempoMark and "global" individual parts score formatting The specific ordering will become more obvious to you as you get used to LilyPond.

Here are some of the things that I do before inputting notes:  Use section-dividers (like  for individual parts) to demarcate sections. Use different levels of dividers (like  for the oboe) to show sub-sections Add blank lines between large sections, to separate them more obviously Begin braces on new lines, like \header { title = "Symphony" ... } instead of on the same line, like \header { title = "Symphony" ... } This is simply a matter of personal taste, resulting from prior experience with C and C-like programming languages. Familiarize myself with the sections and commands created by Frescobaldi, getting a sense of what the section/command does (even if I don't understand what each specific command does). This makes it easier to sort out problems and customization down the road. Sometimes, when the setup is quite complex, I make comments about what seems to be going on.

Change the instrument names to replicate what my score indicates. You don't necessarily need to do this, so long as the people using your score will understand what the instruments are. Since my goal is to replicate this Dover edition score, I will change the names.  In the "PARTS" section, each xPart section has an "instrumentName = "something"" field. We'll be changing those to the following Italian names: <ul> Flute --> Flauto</li> Oboe I --> I Oboe</li> Oboe II --> II Oboe</li> Bassoon --> 2 Fagotti</li> Horn in F --> 2 Corni in Sol (NB: these would have been "natural horns")</li> Trumpet in C --> 2 Clarini in Do (NB: a clarino is a kind of trumpet)</li> Violin I --> Violino I</li> Violin II --> Violino II</li> Cello --> Violoncello obligato</li> Contrabass --> Basso</li> </ul></li> Now we have to change the horns' transposition to match the name. This is because Frescobaldi added a "Horn in F" part, which is the most common horn transposition. However, Haydn's score uses horns in G (or "Sol" in Italian).</li> Scroll up to the "hornF" section under the NOTES marker. Change the line  to  .</li> As it turns out, transposition can be a little more complicated than that. We'll deal with that when we get there.</li> </ol></li> </ul>

Inputting the Slow Introduction
Unlike the piano piece, this tutorial offers step-by-step instructions representing one way to input the score. Only the slow introduction (the part before "Allegretto") will be inputted. The rest is left to you.

Starting with the Easy Part
The best way to get started on large scores is to just start with something easy. Nothing can be easier than doing nothing, so let's first input the multi-measure rests in the wind sections and timpani. <ol> Count the number of measures of rests. In this case, all of the winds and the timpani have thirteen or more measures of rests before their first entrance.</li> Let's put in those thirteen measures first. <ol> In the NOTES section, find the flute section, and put in .</li> <li>Here is an explanation of R</li> <li>here is an explanation of |</li> <li>Copy and past that into the rest of the winds and the timpani.</li> </ol></li> <li>The timpani and trumpet/clarini parts have six further full measures of rest, before the measure with a fermata. The fermata can't be included in the multi-measure rest, so we'll treat it separately. Add  to the timpani and trumpets parts.</li> <li>The horns, bassoons, and second oboe have one further measure of rests, so add  to those parts. We won't use  because yadda.</li> </ol>

Continuing with the Wind and Timpani Parts
<ol> <li>Now we need to start adding notes. We'll start with the parts that have only rests: <ol> <li>The trumpets and timpani have no notes in the slow introduction, so all they need is the three-beat measure with a fermata on the third beat.</li> <li>Rests are notated as though they were a pitch called "r". That is to say, if you want to input a rest, then you input the pitch r. This three-quarter-rest measure will be notated as. Put this into the trumpets and timpani parts. Remember: it's always a good idea to indicate the duration at the beginning of a measure, but it's not necessary to indicate a repeated duration.</li> <li>Frescobaldi allows you to insert common musical signs with the "Quick Insert" tab on the left of the screen. It may be hidden; to show it, click "Quick Insert" on the left-most edge of the Frescobaldi window.</li> <li>We need a regular fermata on the third quarter rest of this measure. So, place the text-input caret just after the third quarter rest, and click the fermata symbol in the "Quick Insert" toolbar-thing.</li> <li>You should end up with .</li> <li>While the word for a fermata symbol is easy to remember, other symbols have less-obvious LilyPond notations, so the "Quick Insert" toolbar-thing is very handy.</li> <li>Copy this measure to the other part.</li> </ol></li> <li>The next easiest part is the bassoons: <ol> <li>We've already input the bassoons' full-measure rests, so we can start with the first measure in which they play. It should be notated as. Input this, and preview the score to see what happens.</li> <li>Success! When first starting an instrument, it's important to check that the notes begin in the right register. If they don't, it can be adjusted easily by changing the pitch indication that follows the  declaration. In this case, the bassoon happened to be in the right register for us by default.</li> <li>The next measure is. Remember to indicate "cis" twice. Put it in and check that it's correct.</li> <li>It is, but we're still missing some formatting. Use the "Quick Insert" toolbar-thing to add staccato markings to the first measure. You can add a staccato to the eighth-rest, but this doesn't make sense, so you shouldn't.</li> <li>Slurs begin at ( and end at ). Add a slur from the g to c-sharp.</li> <li>Preview the score to make sure that you entered these articulations correctly. Your code should be: r8 d-. g-. bes-. d-. bes-. | g8( cis) cis4 r | </li> </ol></li> <li>Now to add the "forte" marking. You can add text (or any object, for that matter) onto a note (or rest, etc.) with one of these three symbols: <ul> <li>^ meaning "put this above the object"</li> <li>- meaning "put this above or below, as you think is best"</li> <li>_ meaning "put this below the object"</li> </ul> As you saw earlier, Frescobaldi attached our staccato markings with the "as you think best" symbol, which is almost always the right choice for articulations. By convention, dynamic markings always go below the staff to which they apply, so we won't want to give LilyPond so much freedom, this time.</li> <li>The easiest way to add (unformatted) text to a note is to simply attach it in quotation marks. For the "forte" marking, put this on the eighth-rest: </li> <li>When you preview this, you'll notice that the result is thoroughly underwhelming. It looks quite unlike a "forte" marking, and people reading the score would probably be confused, if just momentarily.</li> <li>Thankfully, LilyPond provides a very easy and elegant way to input well-formatted dynamic markings. Change the eighth-rest to this: </li> <li>When you preview this, you will see that it now looks exactly like a typical "forte" marking. Not all dynamic markings have these short-forms, but most do.</li> <li>The "a 2" marking, meaning "to be played by two players," does need the text-in-quotes format, however. Put that marking above the d following the eighth rest.</li> <li>Those two measures should now look like this: r8\f d-.^"a 2" g-. bes-. d-. bes-. | g8( cis) cis4 r | Note that  gives the same result as  </li> </ol>

Oboe and Horn Parts
<ol> <li>You now know enough to complete the oboe parts, and the flute part. Give it a try. Here are some tips, in case you get stuck: <ul> <li>You will need to adjust the range of the flute and oboe, to read  and  </li> <li>You may want to use [ and ] to control eighth-note beaming in the Oboe I and Flauto parts. You may not</li> <li>The Flauto will need more multi-measure rests with R, after some of the notes are inputted.</li> <li>All of the parts will end with the same three-quarter-note-rests-with-fermata measure.</li> </ul></li> <li>And now for the horns part. Transposing instruments pose a small problem for LilyPond, as with any human or computerized engraving tool. These steps first ensure that the transposition is set correctly.</li> <li>The "hornF" section should already have a  segment from earlier. This tells LilyPond that the following notes are not in concert pitch, but rather are "in G." A transposition statement tells LilyPond, in absolute pitch, which pitch actually sounds when the player plays a written c'. In this case, the sound pitch is a perfect fourth below c'. If we wanted it to be a perfect fifth higher, then we would need to write, but that's not accurate for this case.</li> <li>Our next obstacle is not actually a problem with LilyPond, but with how Frescobaldi set up the score for us. The score that we wish to notate does not have a written key signature for the horn, but the "global" section (near the top of the file) includes one: G Major. If this score were particularly complicated, or if it contained a large number of transposing instruments, then it would be best to remove the  declration from the "global" section (and including it in every instrument as necessary). However, since there is only one transposing instrument, we might be better off simply removing the global from the horn.</li> <li>do the rest of this stuff to get that done right</li> <li>make a note in the global section of which instruments don't use it</li> <li>While you're at it, do the same for the trumpets and timpani parts, which also do not use a printed key signature.</li> <li>The other issue with the horn part is that two pitches are to be played at once, and they are both notated in the same voice. This is solved in the piano example like this:. You can copy-and-paste this as needed.</li> <li>You can now finish inputting the horn part.</li> </ol>

Moving on to the Strings
After correctly finishing all of the wind and timpani parts, you can move on to the strings. <ul> <li>Input all of the pitches and note lengths first, then return to fill in the other markings.</li> <li>If you get stuck, then put in some filler notes, and finish the rest of that part. Make a note for yourself, as a comment in the source file, so that you know to return later to finish the part.</li> <li>If twenty measures at once is too many, then break it into smaller chunks and input those.</li> <li>Here are some tips to help you through this passage. Use the LilyPond help files if you need further assistance. <ul> <li>Tuplets (Triplets): <ul> <li>To write any tuplet, use the formula, where x is the number of notes actually space to use, and y is the number of notes to let you display.</li> <li>For an eighth-note triplet that takes up one beat, you might use this:, because in the space of 2 eighth notes you want to fit three instead.</li> <li>This is much more powerful than it seems at first. You might want to make it seem as though the measures have stopped being marked, and write something like, which will allow you to fit forty of something into the number of beat usually occupied by four of them. This is especially useful with cadenzas, and cadenza-like passages.</li> </ul></li> <li>Short-term Polyphonic Input (Divisi): <ul> <li>Anything between < > is interpreted by LilyPond as happening together. If you take a look at the "score" section at the bottom of the file, you will see that all of the parts are listed in that kind of bracket. This ensures that they all happen simultaneously.</li> <li>For short-term polyphonic input, use the formula << { upper-voice notes } \\ { lower-voice notes } >>. Remember that the "upper voice" has upward-pointing stems, and the "lower voice" has downward-pointing stems.</li> </ul></li> <li>Ties: These can be written by adding ~ to the end of the note beginning the tie: c4~ c8 </li> <li>Grace Notes: These take up no logical time, and are smaller than ordinary notes. Any notes appearing  would be considered grace notes.</li> <li>Crescendo and Diminuendo Markings: <ul> <li>These are added like other dynamic markings, attached with a backslash to the note where they begin. A crescendo is triggered with \< and a diminuendo with \>.</li> <li>The left-most point of the marking (its beginning) is indicated by where you put \< or \></li> <li>The right-most (or end-)point is indicated by either another dynamic marking of any sort, or the special cancellation character .</li> </ul></li> <li>Italic "staccato" Text: </li> <li>Source File Measure Numbers: One of the techniques that can be used when inputting larger scores is writing measure numbers into the source file as comments. I usually write measure numbers every five measures, but it depends on the speed of the music, and what seems like it's useful.</li> </ul></li> </ul>

Moving into the Fast Section
If you want to finish inputting the first movement, as an exercise, then you will also need to know how to write a tempo-change in an orchestral score: <ol> <li>In order to continue, we'll need to include a special measure-line (barline) and a change-of-tempo indicator. This would be easy, and would display correctly, if we simply inputted the change in one particular voice. However, if we did that, the change would only appear in one of the orchestral parts exported from the score.</li> <li>We're going to define a new whatever-thing, like the "global" section created for us by Frescobaldi, and include it in all of the parts.</li> <li>The code needed for this is a little bit complicated, but you don't need to write it yourself: just take it from the "tempoMark" section created by Frescobaldi. All you need to do is change "Adagio" to "Allegro spiritoso," and add the barline indicator. This is also easy because of Frescobaldi: 'LilyPond > Bar Lines > Repeat start'</li> <li>You end up with startExposition = { \once \override Score.RehearsalMark #'self-alignment-X = #LEFT \once \override Score.RehearsalMark #'break-align-symbols = #'(time-signature key-signature) \mark \markup \bold "Allegro spiritoso" \bar "|:" } </li> <li>Add the reference to this in all of your parts. Because of how I named it, this also serves as a handy way to find your way through the LilyPond markup file. r4 r r\fermata | \startExposition R2.*4 | </li> <li>The barline and tempo-change will not appear unless you write some music after them, so put in some or all of the rests that follow, just to test it.</li> </ol>