From Fedora Project Wiki

< User:Crantila‎ | FSC

Revision as of 05:16, 30 July 2010 by Crantila (talk | contribs) (added DocBook address; hid addresses)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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:
    • Dedication: Comte d'Ogny and Prince Oettingen-Wallerstein
    • Title: Sinfonia No. 92
    • Subtitle: "Oxford"
    • Composer: Haydn, Joseph
    • all the rest are blank
  3. "Parts" Tab:
    • Flute, 2 of Oboe, Bassoon
    • Horn in F, Trumpet in C
    • Timpani
    • Violin, Violin, Viola, Cello, Contrabass
  4. "Score settings" Tab:
    • Key signature: G Major
    • Time signature: 3/4
    • Tempo indication: Adagio
    • other settings as desired; I recommend not remocing bar numbers, and removing the default tagline
  5. Click "Try" to see if it works.
    • It should, but the instrument names are not correct as per the score; we'll adjust this later.
  6. 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 %%%%%%%% NOTES %%%%%%%% for individual parts) to demarcate sections.
  • Use different levels of dividers (like %%%% OBOE %%%% 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.
    1. In the "PARTS" section, each xPart section has an "instrumentName = "something"" field.
    2. We'll be changing those to the following Italian names:
      • Flute --> Flauto
      • Oboe I --> I Oboe
      • Oboe II --> II Oboe
      • Bassoon --> 2 Fagotti
      • Horn in F --> 2 Corni in Sol (NB: these would have been "natural horns")
      • Trumpet in C --> 2 Clarini in Do (NB: a clarino is a kind of trumpet)
      • Violin I --> Violino I
      • Violin II --> Violino II
      • Cello --> Violoncello obligato
      • Contrabass --> Basso
    3. 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).
    4. Scroll up to the "hornF" section under the NOTES marker. Change the line \transposition f to \transposition g.
    5. As it turns out, transposition can be a little more complicated than that. We'll deal with that when we get there.

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.

  1. 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.
  2. Let's put in those thirteen measures first.
    1. In the NOTES section, find the flute section, and put in R2.*13 |.
    2. Here is an explanation of R
    3. here is an explanation of |
    4. Copy and past that into the rest of the winds and the timpani.
  3. 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 R2.*6 | to the timpani and trumpets parts.
  4. The horns, bassoons, and second oboe have one further measure of rests, so add R2. | to those parts. We won't use r2. | because yadda.

Continuing with the Wind and Timpani Parts

  1. Now we need to start adding notes. We'll start with the parts that have only rests:
    1. 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.
    2. 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 r4 r r |. 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.
    3. 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.
    4. 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.
    5. You should end up with r4 r r\fermata |.
    6. 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.
    7. Copy this measure to the other part.
  2. The next easiest part is the bassoons:
    1. 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 r8 d g bes d bes |. Input this, and preview the score to see what happens.
    2. 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 \relative declaration. In this case, the bassoon happened to be in the right register for us by default.
    3. The next measure is g8 cis cis4 r |. Remember to indicate "cis" twice. Put it in and check that it's correct.
    4. 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.
    5. Slurs begin at ( and end at ). Add a slur from the g to c-sharp.
    6. 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 |
  3. 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:
    • ^ meaning "put this above the object"
    • - meaning "put this above or below, as you think is best"
    • _ meaning "put this below the object"
    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.
  4. 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: r8_"f" etc.
  5. 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.
  6. Thankfully, LilyPond provides a very easy and elegant way to input well-formatted dynamic markings. Change the eighth-rest to this: r8\f etc.
  7. 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.
  8. 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.
  9. Those two measures should now look like this:
    r8\f d-.^"a 2" g-. bes-. d-. bes-. |
    g8( cis) cis4 r |
    
    Note that d-.^"a 2" gives the same result as d^"a 2"-.

Oboe and Horn Parts

  1. 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:
    • You will need to adjust the range of the flute and oboe, to read flute = \relative c and oboeI = \relative c
    • You may want to use [ and ] to control eighth-note beaming in the Oboe I and Flauto parts. You may not
    • The Flauto will need more multi-measure rests with R, after some of the notes are inputted.
    • All of the parts will end with the same three-quarter-note-rests-with-fermata measure.
  2. 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.
  3. The "hornF" section should already have a \transposition g 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 \transposition g', but that's not accurate for this case.
  4. 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 \key ... 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.
  5. do the rest of this stuff to get that done right
  6. make a note in the global section of which instruments don't use it
  7. While you're at it, do the same for the trumpets and timpani parts, which also do not use a printed key signature.
  8. 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: <g g'>. You can copy-and-paste this as needed.
  9. You can now finish inputting the horn part.

Moving on to the Strings

After correctly finishing all of the wind and timpani parts, you can move on to the strings.

  • Input all of the pitches and note lengths first, then return to fill in the other markings.
  • 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.
  • If twenty measures at once is too many, then break it into smaller chunks and input those.
  • Here are some tips to help you through this passage. Use the LilyPond help files if you need further assistance.
    • Tuplets (Triplets):
      • To write any tuplet, use the formula \times x/y { notes in here }, where x is the number of notes actually space to use, and y is the number of notes to let you display.
      • For an eighth-note triplet that takes up one beat, you might use this: \times 2/3 { c8 d e }, because in the space of 2 eighth notes you want to fit three instead.
      • 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 \times 4/40 { ... }, 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.
    • Short-term Polyphonic Input (Divisi):
      • Anything between << and >> 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.
      • 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.
    • Ties: These can be written by adding ~ to the end of the note beginning the tie:
      c4~ c8
    • Grace Notes: These take up no logical time, and are smaller than ordinary notes. Any notes appearing \grace { in here } would be considered grace notes.
    • Crescendo and Diminuendo Markings:
      • 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 \>.
      • The left-most point of the marking (its beginning) is indicated by where you put \< or \>
      • The right-most (or end-)point is indicated by either another dynamic marking of any sort, or the special cancellation character (\!).
    • Italic "staccato" Text: \markup { \italic { staccato } }
    • 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.

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:

  1. 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.
  2. 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.
  3. 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'
  4. 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 "|:"
    }
    
  5. 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 |
    
  6. 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.