[icon]

GNU LilyPond

Welcome to the home of the GNU Music Typesetter

What is LilyPond
General information
Simple examples
Complex examples
Download
GNU/Linux binaries
Windows
Source code
Documentation
Tutorial
Manual
Glossary
other ...

Support
Mailing lists
Search
WikiWiki
FAQs

External sites
lilypond.org/development
lilypond.org/stable
ftp.lilypond.org
Mutopia
Other music online

Node:The full score, Next:, Up:An orchestral score



The full score

The second file, os-score.ly reads the definitions of the first (os-music.ly), and defines the \score block for the full conductor's score.

% os-score.ly
\include "os-music.ly"
\include "paper13.ly"

#(set! point-and-click line-column-location)
#(define text-flat '((font-relative-size . -2)
         (music "accidentals--1")))

\score {
  <
    \global
    \property Score.BarNumber \override #'padding = #3
    \context StaffGroup = woodwind <
      \context Staff = flauti <
        \property Staff.midiInstrument = #"flute"
        \property Staff.instrument = "2 Flauti"
        \property Staff.instr = "Fl."
        \Key
        \context Voice=one { \voiceOne \flautoI }
        \context Voice=two { \voiceTwo \flautoII }
      >
    >
    \context StaffGroup = timpani <
      \context Staff = timpani <
        \property Staff.midiInstrument = #"timpani"
        \property Staff.instrument = #'(lines "Timpani" "(C-G)")
        \property Staff.instr = #"Timp."
        \clef bass
        \Key
        \timpani
      >
    >
    \context StaffGroup = brass <
      \context Staff = trombe <
  	\property Staff.midiInstrument = #"trumpet"
        \property Staff.instrument = #`(lines "2 Trombe" "(C)")
        \property Staff.instr = #`(lines "Tbe." "(C)")
        \Key
        \context Voice=one \partcombine Voice
          \context Thread=one \tromboI
          \context Thread=two \tromboII
      >
      \context Staff = corni <
        \property Staff.midiInstrument = #"french horn"
        \property Staff.instrument = #`(lines "Corno"
          (columns "(E" ,text-flat ")"))
        \property Staff.instr = #`(lines "Cor."
          (columns "(E" ,text-flat ")"))
        \property Staff.transposing = #3
        \notes \key bes \major
        \context Voice=one \corno
      >
    >
  >
  \paper {
    indent = 15 * \staffspace
    linewidth = 60 * \staffspace
    textheight = 90 * \staffspace
    \translator{
      \HaraKiriStaffContext
    }
  }
  \midi {
    \tempo 4 = 75
  }
}
Zo, goed lieverd?

How's, this babe?
Opus 1.
LAID BACK

[picture of music]

***


\include "os-music.ly"
First, we need to include the music definitions we made in os-music.ly.

***


#(set! point-and-click line-column-location)
In a large orchestral score like this you're bound to make some small mistakes, so we enable point and click (See Point and click) editing.

***


#(define text-flat '((font-relative-size . -2)
         (music "accidentals--1")))

When naming the tuning of the french horn, we'll need a piece of text with a flat sign. LilyPond has a mechanism for font selection and kerning called Scheme markup text (See Text markup). The flat sign is taken from the music font, and its name is accidentals--1 (The sharp sign is called accidentals-1). The default font is too big for text, so we select a relative size of -2.

***


  <
    \global
Of course, all staffs are simultaneous and use the same global settings.

***


    \property Score.BarNumber \override #'padding = #3
LilyPond prints bar numbers at the start of each line, but unfortunately, they end up a bit too close to the staff in this example. A bar number internally is a Grob called BarNumber. BarNumber Grobs can be manipulated through their side-position-interface. One of the properties of a side-position-interface that can be tweaked is the padding: the amount of extra space that is put between this Grob and other Grobs. We set the padding to three staff spaces.

You can find information on all these kind of properties in LilyPond's automatically generated documentation in LilyPond Internals.

***


    \context StaffGroup = woodwind <
      \context Staff = flauti <
A new notation context: the StaffGroup. StaffGroup can hold one or more Staffs, and will print a big bracket at the left of the score. Start a new staff group for the woodwind section (just the flutes in this case). Immediately after that, we start the staff for the two flutes, that also play simultaneously.

***


        \property Staff.midiInstrument = #"flute"
Specify the instrument for MIDI output (see MIDI instrument names).

***


        \property Staff.instrument = "2 Flauti"
        \property Staff.instr = "Fl."
And define the instrument names to be printed in the margin, instrument for the first line of the score, instr for the rest of the score.

***


        \Key
The flutes play in the default key.

***


        \context Voice=one { \voiceOne \flautoI }
        \context Voice=two { \voiceTwo \flautoII }
Last come the actual flute parts. Remember that we're still in simultaneous mode. We name both voices differently, so that LilyPond will actually create two Voice contexts. The flute parts are simple, so we specify manually which voice is which: \voiceOne forces the direction of stems, beams, slurs and ties up, \voiceTwo sets directions down.

***


      >
    >
Close the flutes staff and woodwind staff group.

***


        \property Staff.instrument = #'(lines "Timpani" "(C-G)")
The timpani staff only shows a new piece of scheme markup, it sets two lines of text.

***


        \context Voice=one \partcombine Voice
          \context Thread=one \tromboI
          \context Thread=two \tromboII
You have seen the notation contexts Staff and Voice, but here's a new one: Thread. One or more Threads can be part of a Voice. The Thread takes care of note heads and rests, the Voice combine note heads onto a stem.

For the trumpets we use the automatic part combiner (see Automatic part combining) to combine the two simultaneous trumpet parts onto the trumpet staff. Each trumpet gets its own Thread context, which must be named one and two). The part combiner makes these two threads share a Voice when they're similar, and splits the threads up when they're different.

***


      	\property Staff.instrument = #`(lines "Corno"
          (columns "(E" ,text-flat ")"))
The french horn has the most complex scheme markup name, made up of two lines of text. The second line has three elements (columns), the (E, the flat sign text-flat that we defined before and a final ")". Note that we use a backquote instead of an ordinary quote at the beginning of the Scheme expression to be able to access the text-flat identifier, `unquoting' it with a ,.

***


        \property Staff.transposing = #3
The french horn is to be tuned in E-flat, so we tell the MIDI backend to transpose this staff by three steps.

Note how we can choose different tuning for entering, printing and playing, using \transpose and the MIDI Staff property transposing.

***


        \notes \key bes \major
Therefore, it has a different key.

***


    indent = 15 * \staffspace
    linewidth = 60 * \staffspace
We specify a big indent for the first line and a small linewidth for this tutorial.

***

Usually, LilyPond's predefined setup of notation contexts (Thread, Voice, Staff, Staffgroup, Score) is just fine. But in this case, we want a different type of Staff context.

    \translator{
      \HaraKiriStaffContext
    }

In orchestral scores, it often happens that one instrument has only rests during one line of the score. The HaraKiriStaffContext can be used as a regular StaffContext drop-in and will take care of the automatic removing of empty staffs.

Go back to index of LilyPond.

Please send GNU LilyPond questions and comments to lilypond-user@gnu.org.

Please send comments on these web pages to lilypond@packages.debian.org

Copyright (c) 1997--2001 Han-Wen Nienhuys and Jan Nieuwenhuizen.

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.


This page was built from LilyPond-1.4.12 (stable-branch) by

Anthony Fok <lilypond@packages.debian.org>, Tue Mar 12 01:35:39 2002 HKT.