]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/fundamental.itely
c84530e064ed419501f92a34254acbb9fe1fd319
[lilypond.git] / Documentation / user / fundamental.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @c This file is part of lilypond-learning.tely
3
4 @node Fundamental concepts
5 @chapter Fundamental concepts
6
7 @menu
8 * How LilyPond files work::     
9 * Voices contain music::        
10 * TODO new sec fundamental::    
11 * Extending the templates::     
12 * Scores and parts::            
13 @end menu
14
15
16 @node How LilyPond files work
17 @section How LilyPond files work
18
19 The LilyPond input format is quite free-form, giving experienced
20 users a lot of flexibility to structure their files however they
21 wish.  However, this flexibility can make things confusing for new
22 users.  This section will explain some of this structure, but may
23 gloss over some details in favor of simplicity.  For a complete
24 description of the input format, see @ruser{File structure}.
25
26 @menu
27 * Introduction to the LilyPond file structure::  
28 * Score is a (single) compound musical expression::  
29 @end menu
30
31 @node Introduction to the LilyPond file structure
32 @subsection Introduction to the LilyPond file structure
33
34 A basic example of a lilypond input file is
35
36 @example
37 \version "2.11.23"
38 \score @{
39   @var{...compound music expression...}  % all the music goes here!
40   \header @{ @}
41   \layout @{ @}
42   \midi @{ @}
43 @}
44 @end example
45
46 @noindent
47 There are many variations of this basic pattern, but this
48 example serves as a useful starting place.
49
50 At this point, you may be confused, since you have never seen a
51 @code{\score@{@}} before.  This is because LilyPond automatically
52 adds the extra commands when you give it simple input.  LilyPond
53 treats input like this:
54
55 @example
56 \relative c'' @{
57   c4 a d c
58 @}
59 @end example
60
61 @noindent
62 as shorthand for this:
63
64 @example
65 \score @{
66   \relative c'' @{
67     c4 a b c
68   @}
69   \layout @{ @}
70 @}
71 @end example
72
73 In other words, if the input contains a single music expression,
74 LilyPond will interpret the file as though the music expression
75 was wrapped up inside a @code{\score@{@}}.
76
77 @smallspace
78
79 A @code{\score} must begin with a compound music expression.
80 Remember that a music expression could be anything from a single
81 note to a huge
82
83 @example
84 @{
85   \new GrandStaff <<
86     @var{...insert the whole score of a Wagner opera in here...}
87   >>
88 @}
89 @end example
90
91 @noindent
92 Since everything is inside @code{@{ ... @}}, it counts
93 as one music expression.
94
95 As we saw previously, the @code{\score} can contain other things,
96 such as
97
98 @example
99 \score @{
100   @{ c'4 a b c' @}
101   \header @{ @}
102   \layout @{ @}
103   \midi @{ @}
104 @}
105 @end example
106
107 @noindent
108 Some people put some of those commands outside the @code{\score}
109 block -- for example, @code{\header} is often placed above the
110 @code{\score}.  That's just another shorthand that LilyPond
111 accepts.
112
113 @smallspace
114
115 @cindex variables
116
117 Another great shorthand is the ability to define variables.  All
118 the templates use this
119
120 @example
121 melody = \relative c' @{
122   c4 a b c
123 @}
124
125 \score @{
126   @{ \melody @}
127 @}
128 @end example
129
130 When LilyPond looks at this file, it takes the value of
131 @code{melody} (everything after the equals sign) and inserts it
132 whenever it sees @code{\melody}.  There's nothing special about
133 the names -- it could be @code{melody}, @code{global},
134 @code{pianorighthand}, or @code{foofoobarbaz}.  You can use
135 whatever variable names you want.  For more details, see
136 @ruser{Saving typing with variables and functions}.
137
138
139 @seealso
140
141 For a complete definition of the input format, see @ruser{File
142 structure}.
143
144
145 @node Score is a (single) compound musical expression
146 @subsection Score is a (single) compound musical expression
147
148 @cindex Compound music expression
149 @cindex Music expression, compound
150
151 We saw the general organization of LilyPond input files in the
152 previous section, @ref{How LilyPond files work}.  But we seemed to
153 skip over the most important part: how do we figure out what to
154 write after @code{\score}?
155
156 We didn't skip over it at all.  The big mystery is simply that
157 there @emph{is} no mystery.  This line explains it all:
158
159 @quotation
160 @emph{A @code{\score} must begin with a compound music expression.}
161 @end quotation
162
163 @noindent
164 You may find it useful to review @ruser{Music expressions
165 explained}.  In that section, we saw how to build big music
166 expressions from small pieces -- we started from notes, then
167 chords, etc.  Now we're going to start from a big music expression
168 and work our way down.
169
170 @example
171 \score @{
172   @{ % this brace begins the overall compound music expression
173     \new GrandStaff <<
174       @var{...insert the whole score of a Wagner opera in here...}
175     >>
176   @} % this brace ends the overall compound music expression
177   \layout @{ @}
178 @}
179 @end example
180
181 A whole Wagner opera would easily double the length of this
182 manual, so let's just add a singer and piano.  We don't need a
183 @code{GrandStaff} for this ensemble, so we shall remove it.  We
184 @emph{do} need a singer and a piano, though.
185
186 @example
187 \score @{
188   @{
189     <<
190       \new Staff = "singer" <<
191       >>
192       \new PianoStaff = piano <<
193       >>
194     >>
195   @}
196   \layout @{ @}
197 @}
198 @end example
199
200 Remember that we use @code{<<} and @code{>>} to show simultaneous
201 music.  And we definitely want to show the vocal part and piano
202 part at the same time, not one after the other!
203
204 @example
205 \score @{
206   @{
207     <<
208       \new Staff = "singer" <<
209         \new Voice = "vocal" @{ @}
210       >>
211       \new Lyrics \lyricsto vocal \new Lyrics @{ @}
212       \new PianoStaff = "piano" <<
213         \new Staff = "upper" @{ @}
214         \new Staff = "lower" @{ @}
215       >>
216     >>
217   @}
218   \layout @{ @}
219 @}
220 @end example
221
222 Now we have a lot more details.  We have the singer's staff: it
223 contains a @code{Voice} (in LilyPond, this term refers to a set of
224 notes, not necessarily vocal notes -- for example, a violin
225 generally plays one voice) and some lyrics.  We also have a piano
226 staff: it contains an upper staff (right hand) and a lower staff
227 (left hand).
228
229 At this stage, we could start filling in notes.  Inside the curly
230 braces next to @code{\new Voice = vocal}, we could start writing
231
232 @example
233 \relative c'' @{
234   a4 b c d
235 @}
236 @end example
237
238 But if we did that, the @code{\score} section would get pretty
239 long, and it would be harder to understand what was happening.  So
240 let's use variables instead.
241
242 @example
243 melody = @{ @}
244 text = @{ @}
245 upper = @{ @}
246 lower = @{ @}
247 \score @{
248   @{
249     <<
250       \new Staff = "singer" <<
251         \new Voice = "vocal" @{ \melody @}
252       >>
253       \new Lyrics \lyricsto vocal \new Lyrics @{ \text @}
254       \new PianoStaff = "piano" <<
255         \new Staff = "upper" @{ \upper @}
256         \new Staff = "lower" @{ \lower @}
257       >>
258     >>
259   @}
260   \layout @{ @}
261 @}
262 @end example
263
264 @noindent
265 Remember that you can use almost any name you like.  The
266 limitations on variable names are detailed in @ruser{File
267 structure}.
268
269 When writing (or reading) a @code{\score} section, just take it
270 slowly and carefully.  Start with the outer layer, then work on
271 each smaller layer.  It also really helps to be strict with
272 indentation -- make sure that each item on the same layer starts
273 on the same horizontal position in your text editor.
274
275
276 @node Voices contain music
277 @section Voices contain music
278
279 TODO: something cheesy and vaguely witty about voices being the
280 fundamental thing that includes music in lilypond.
281
282 @menu
283 * I'm seeing Voices::           
284 * Explicitly instantiating voices::  
285 * Voices and vocals::           
286 @end menu
287
288 @c too cheesy?  I'm not certain.  -gp
289 @node I'm seeing Voices
290 @subsection I'm seeing Voices
291
292 @cindex polyphony
293
294 TODO: add intro about voices vs. layers vs. whatever.
295
296 TODO: sex this up with colors and stuff.  -gp 
297
298 TODO: actually, a general rewrite is needed.  -gp
299
300
301 The easiest way to enter fragments with more than one voice on a
302 staff is to enter each voice as a sequence (with @code{@{...@}}),
303 and combine them simultaneously, separating the voices with
304 @code{\\}
305
306 @funindex \\
307
308 @lilypond[quote,verbatim,fragment]
309 \new Staff \relative c' {
310   c16 d e f
311   <<
312     { g4 f e | d2 e2 } \\
313     { r8 e4 d c8 ~ | c b16 a b8 g ~ g2 } \\
314     { s2. | s4 b4 c2 }
315   >>
316 }
317 @end lilypond
318
319 @cindex layers
320
321 The separator causes @internalsref{Voice}
322 contexts@footnote{Polyphonic voices are sometimes
323 called @q{layers} in other notation packages} to be instantiated.
324 They bear the names @code{"1"}, @code{"2"}, etc.  In each of these
325 contexts, vertical direction of slurs, stems, etc., is set
326 appropriately.
327
328 These voices are all separate from the voice that contains the
329 notes just outside the @code{<< \\ >>} construct.  This should be
330 noted when making changes at the voice level.  This also means
331 that slurs and ties cannot go into or out of a @code{<< \\ >>}
332 construct.  Conversely, parallel voices from separate @code{<< \\
333 >>} constructs on the same staff are the same voice.  Here is the
334 same example, with different noteheads and colors for each voice.
335 Note that the change to the note-head style in the main voice does
336 not affect the inside of the @code{<< \\ >>} constructs.  Also,
337 the change to the second voice in the first @code{<< \\ >>}
338 construct is effective in the second @code{<< \\ >>}, and the
339 voice is tied across the two constructs.
340
341 @cindex note heads, styles
342
343 @lilypond[quote,verbatim,fragment]
344 \new Staff \relative c' {
345   \override NoteHead #'style = #'cross
346   \override NoteHead #'color = #red
347   c16 d e f
348   <<
349     { g4 f e } \\
350     { \override NoteHead #'style = #'triangle
351       \override NoteHead #'color = #blue
352     r8 e4 d c8 ~ }
353   >> |
354   <<
355     { d2 e2 } \\
356     { c8 b16 a b8 g ~ g2 } \\
357     { \override NoteHead #'style = #'slash 
358       \override NoteHead #'color = #green
359       s4 b4 c2 }
360   >>
361 }
362 @end lilypond
363
364 Polyphony does not change the relationship of notes within a
365 @code{\relative @{ @}} block.  Each note is calculated relative to
366 the note immediately preceding it.
367
368 @example
369 \relative @{ noteA << noteB \\ noteC >> noteD @}
370 @end example
371
372 @code{noteC} is relative to @code{noteB}, not @code{noteA};
373 @code{noteD} is relative to @code{noteC}, not @code{noteB} or
374 @code{noteA}.
375
376
377 @node Explicitly instantiating voices
378 @subsection Explicitly instantiating voices
379
380 TODO: more colors and stuff.
381
382 @internalsref{Voice} contexts can also be instantiated manually
383 inside a @code{<< >>} block to create polyphonic music, using
384 @code{\voiceOne}, up to @code{\voiceFour} to assign stem
385 directions and a horizontal shift for each part.
386
387 Specifically,
388 @example
389 << \upper \\ \lower >>
390 @end example
391
392 @noindent
393 is equivalent to
394
395 @example
396 <<
397   \new Voice = "1" @{ \voiceOne \upper @}
398   \new Voice = "2" @{ \voiceTwo \lower @}
399 >>
400 @end example
401
402 The @code{\voiceXXX} commands set the direction of stems, slurs,
403 ties, articulations, text annotations, augmentation dots of dotted
404 notes, and fingerings.  @code{\voiceOne} and @code{\voiceThree}
405 make these objects point upwards, while @code{\voiceTwo} and
406 @code{\voiceFour} make them point downwards.  The command
407 @code{\oneVoice} will revert back to the normal setting.
408
409 An expression that appears directly inside a @code{<< >>} belongs
410 to the main voice.  This is useful when extra voices appear while
411 the main voice is playing.  Here is a more correct rendition of
412 the example from the previous section.  The crossed colored
413 noteheads demonstrate that the main melody is now in a single
414 voice context.
415
416 @lilypond[quote,ragged-right,verbatim]
417 \new Staff \relative c' {
418   \override NoteHead #'style = #'cross
419   \override NoteHead #'color = #red
420   c16 d e f
421   \voiceOne
422   <<
423     { g4 f e | d2 e2 }
424     \new Voice="1" { \voiceTwo
425       r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2
426       \oneVoice
427     }
428     \new Voice { \voiceThree
429       s2. | s4 b4 c2
430       \oneVoice
431     }
432   >>
433   \oneVoice
434 }
435 @end lilypond
436
437 The correct definition of the voices allows the melody to be
438 slurred.
439
440 @lilypond[quote,ragged-right,verbatim]
441 \new Staff \relative c' {
442   c16^( d e f
443   \voiceOne
444   <<
445     { g4 f e | d2 e2) }
446     \context Voice="1" { \voiceTwo
447       r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2
448       \oneVoice
449     }
450     \new Voice { \voiceThree
451       s2. s4 b4 c2
452       \oneVoice
453     }
454   >>
455   \oneVoice
456 }
457 @end lilypond
458
459 Avoiding the @code{\\} separator also allows nesting polyphony
460 constructs, which in some case might be a more natural way to
461 typeset the music.
462
463 @lilypond[quote,ragged-right,verbatim]
464 \new Staff \relative c' {
465   c16^( d e f
466   \voiceOne
467   <<
468     { g4 f e | d2 e2) }
469     \context Voice="1" { \voiceTwo
470       r8 e4 d c8 ~ |
471       <<
472         {c8 b16 a b8 g ~ g2}
473         \new Voice { \voiceThree
474           s4 b4 c2
475           \oneVoice
476         }
477       >>
478     \oneVoice
479     }
480   >>
481   \oneVoice
482 }
483 @end lilypond
484
485
486 @node Voices and vocals
487 @subsection Voices and vocals
488
489 Vocal music presents a special difficulty: we need to combine two
490 expressions -- notes and lyrics.
491
492 You have already seen the @code{\lyricsAdd@{@}} command, which
493 handles simple cases for you.  However, @code{\lyricsAdd@{@}} is
494 very limited.  For most music, you must explicitly link the lyrics
495 to the notes with @code{\lyricsTo@{@}}
496
497 @lilypond[quote,verbatim,fragment]
498 <<
499   \new Voice = "one" \relative c'' {
500     \autoBeamOff
501     \time 2/4
502     c4 b8. a16 g4. f8 e4 d c2
503   }
504   \new Lyrics \lyricsto "one" {
505     No more let sins and sor -- rows grow.
506   }
507 >>
508 @end lilypond
509
510 TODO: get some vocal person to write more.
511
512
513 @node TODO new sec fundamental
514 @section TODO new sec fundamental
515
516 blh blah
517
518
519 @menu
520 * On the un-nestedness of brackets and ties::  
521 * Up and down::                 
522 * Distances and measurements MAYBE MOVE::  
523 @end menu
524
525 @c my name start sucking the more docs I write. -gp
526 @node On the un-nestedness of brackets and ties
527 @subsection On the un-nestedness of brackets and ties
528
529 Different kinds of brackets and ties may be mixed freely,
530
531 TODO: improve this example
532
533 @lilypond[quote,verbatim,fragment,ragged-right]
534 {
535   r16[ g16 \times 2/3 {r16 e'8] }
536   g16( a \times 2/3 {b d e') }
537   g8[( a \times 2/3 {b d') e'~]}
538   \times 4/5 {e'32\( a b d' e'} a'4.\)
539 }
540 @end lilypond
541
542 TODO... add more info?  Fluff up the first sentence?
543
544
545 @node Up and down
546 @subsection Up and down
547
548 TODO: everything
549
550 By default, lilypnod does a pretty jazz'n job of picking
551 directions.  But in some cases, it may be desirable to force a
552 direction.
553
554 @verbatim
555 -
556 ^ _
557 @end verbatim
558
559
560 @node Distances and measurements MAYBE MOVE
561 @subsection Distances and measurements MAYBE MOVE
562
563 DISCUSS after working on other sections.
564
565 TODO: staff spaces, #UP #DOWN #LEFT #RIGHT.  Maybe move into tweaks?
566
567
568
569 @node Extending the templates
570 @section Extending the templates
571
572 You've read the tutorial, you know how to write music.  But how can you
573 get the staves that you want?  The templates are ok, but what if you
574 want something that isn't covered?
575
576 @menu
577 * Soprano and cello::           
578 * TODO another example of extending templates::  
579 @end menu
580
581 @node Soprano and cello
582 @subsection Soprano and cello
583
584 Start off with the template that seems closest to what you want to end
585 up with.  Let's say that you want to write something for soprano and
586 cello.  In this case, we would start with @q{Notes and lyrics} (for the
587 soprano part).
588
589 @example
590 \version "2.11.23"
591 melody = \relative c' @{
592   \clef treble
593   \key c \major
594   \time 4/4
595
596   a4 b c d
597 @}
598
599 text = \lyricmode @{
600   Aaa Bee Cee Dee
601 @}
602
603 \score@{
604   <<
605     \new Voice = "one" @{
606       \autoBeamOff
607       \melody
608     @}
609     \new Lyrics \lyricsto "one" \text
610   >>
611   \layout @{ @}
612   \midi @{ @}
613 @}
614 @end example
615
616 Now we want to add a cello part.  Let's look at the @q{Notes only} example:
617
618 @example
619 \version "2.11.23"
620 melody = \relative c' @{
621   \clef treble
622   \key c \major
623   \time 4/4
624
625   a4 b c d
626 @}
627
628 \score @{
629 \new Staff \melody
630 \layout @{ @}
631 \midi @{ @}
632 @}
633 @end example
634
635 We don't need two @code{\version} commands.  We'll need the @code{melody}
636 section.  We don't want two @code{\score} sections -- if we had two
637 @code{\score}s, we'd get the two parts separately.  We want them together,
638 as a duet.  Within the @code{\score} section, we don't need two
639 @code{\layout} or @code{\midi}.
640
641 If we simply cut and paste the @code{melody} section, we would end up with
642 two @code{melody} sections.  So let's rename them.  We'll call the section
643 for the soprano @code{sopranoMusic} and the section for the cello
644 @code{celloMusic}.  While we're doing this, let's rename @code{text}
645 to be @code{sopranoLyrics}.  Remember to rename both instances of all
646 these names -- both the initial definition (the
647 @code{melody = relative c' @{ } part) and the name's use (in the
648 @code{\score} section).
649
650 While we're doing this, let's change the cello part's staff -- celli
651 normally use bass clef.  We'll also give the cello some different
652 notes.
653
654 @example
655 \version "2.11.23"
656 sopranoMusic = \relative c' @{
657   \clef treble
658   \key c \major
659   \time 4/4
660
661   a4 b c d
662 @}
663
664 sopranoLyrics = \lyricmode @{
665   Aaa Bee Cee Dee
666 @}
667
668 celloMusic = \relative c @{
669   \clef bass
670   \key c \major
671   \time 4/4
672
673   d4 g fis8 e d4
674 @}
675
676 \score@{
677   <<
678     \new Voice = "one" @{
679       \autoBeamOff
680       \sopranoMusic
681     @}
682     \new Lyrics \lyricsto "one" \sopranoLyrics
683   >>
684   \layout @{ @}
685   \midi @{ @}
686 @}
687 @end example
688
689 This is looking promising, but the cello part won't appear in the
690 score -- we haven't used it in the @code{\score} section.  If we
691 want the cello part to appear under the soprano part, we need to add
692
693 @example
694 \new Staff \celloMusic
695 @end example
696
697 @noindent
698 underneath the soprano stuff.  We also need to add @code{<<} and
699 @code{>>} around the music -- that tells LilyPond that there's
700 more than one thing (in this case, @code{Staff}) happening at once.  The
701 @code{\score} looks like this now
702
703 @example
704 \score@{
705   <<
706     <<
707       \new Voice = "one" @{
708         \autoBeamOff
709         \sopranoMusic
710       @}
711       \new Lyrics \lyricsto "one" \sopranoLyrics
712     >>
713     \new Staff \celloMusic
714   >>
715   \layout @{ @}
716   \midi @{ @}
717 @}
718 @end example
719
720 @noindent
721 This looks a bit messy; the indentation is messed up now.  That is
722 easily fixed.  Here's the complete soprano and cello template.
723
724 @lilypond[quote,verbatim,ragged-right]
725 \version "2.11.23"
726 sopranoMusic = \relative c' {
727   \clef treble
728   \key c \major
729   \time 4/4
730
731   a4 b c d
732 }
733
734 sopranoLyrics = \lyricmode {
735   Aaa Bee Cee Dee
736 }
737
738 celloMusic = \relative c {
739   \clef bass
740   \key c \major
741   \time 4/4
742
743   d4 g fis8 e d4
744 }
745
746 \score{
747   <<
748     <<
749       \new Voice = "one" {
750         \autoBeamOff
751         \sopranoMusic
752       }
753       \new Lyrics \lyricsto "one" \sopranoLyrics
754     >>
755     \new Staff \celloMusic
756   >>
757   \layout { }
758   \midi { }
759 }
760 @end lilypond
761
762
763 @node TODO another example of extending templates
764 @subsection TODO another example of extending templates
765
766 TODO: somebody else fill this in.  You guys like vocal stuff,
767 right?  Get to it.  :)  -gp
768
769
770
771 @node Scores and parts
772 @section Scores and parts
773
774 TODO: this is really old stuff from the really old tutorial.
775 Rewrite, fix, etc.  Or maybe delete entirely.  -gp
776
777 In orchestral music, all notes are printed twice.  Once in a part for
778 the musicians, and once in a full score for the conductor.  Variables can
779 be used to avoid double work.  The music is entered once, and stored in
780 a variable.  The contents of that variable is then used to generate
781 both the part and the full score.
782
783 It is convenient to define the notes in a special file.  For example,
784 suppose that the file @file{horn-music.ly} contains the following part
785 of a horn/@/bassoon duo
786
787 @example
788 hornNotes = \relative c @{
789   \time 2/4
790   r4 f8 a cis4 f e d
791 @}
792 @end example
793
794 @noindent
795 Then, an individual part is made by putting the following in a file
796
797 @example
798 \include "horn-music.ly"
799 \header @{
800   instrument = "Horn in F"
801 @}
802
803 @{
804  \transpose f c' \hornNotes
805 @}
806 @end example
807
808 The line
809
810 @example
811 \include "horn-music.ly"
812 @end example
813
814 @noindent
815 substitutes the contents of @file{horn-music.ly} at this position in
816 the file, so @code{hornNotes} is defined afterwards.  The command
817 @code{\transpose f@tie{}c'} indicates that the argument, being
818 @code{\hornNotes}, should be transposed by a fifth upwards.  Sounding
819 @samp{f} is denoted by notated @code{c'}, which corresponds with the
820 tuning of a normal French Horn in@tie{}F.  The transposition can be seen
821 in the following output
822
823 @lilypond[quote,ragged-right]
824 \transpose f c' \relative c {
825   \time 2/4
826   r4 f8 a cis4 f e d
827 }
828 @end lilypond
829
830 In ensemble pieces, one of the voices often does not play for many
831 measures.  This is denoted by a special rest, the multi-measure
832 rest.  It is entered with a capital @samp{R} followed by a duration
833 (@code{1}@tie{}for a whole note, @code{2}@tie{}for a half note,
834 etc.).  By multiplying the
835 duration, longer rests can be constructed.  For example, this rest
836 takes 3@tie{}measures in 2/4 time
837
838 @example
839 R2*3
840 @end example
841
842 When printing the part, multi-rests
843 must be condensed.  This is done by setting a run-time variable
844
845 @example
846 \set Score.skipBars = ##t
847 @end example
848
849 @noindent
850 This command sets the property @code{skipBars} in the
851 @code{Score} context to true (@code{##t}).  Prepending the rest and
852 this option to the music above, leads to the following result
853
854 @lilypond[quote,ragged-right]
855 \transpose f c' \relative c {
856   \time 2/4
857   \set Score.skipBars = ##t
858   R2*3
859   r4 f8 a cis4 f e d
860 }
861 @end lilypond
862
863
864 The score is made by combining all of the music together.  Assuming
865 that the other voice is in @code{bassoonNotes} in the file
866 @file{bassoon-music.ly}, a score is made with
867
868 @example
869 \include "bassoon-music.ly"
870 \include "horn-music.ly"
871
872 <<
873   \new Staff \hornNotes
874   \new Staff \bassoonNotes
875 >>
876 @end example
877
878 @noindent
879 leading to
880
881 @lilypond[quote,ragged-right]
882 \relative c <<
883   \new Staff {
884     \time 2/4 R2*3
885     r4 f8 a cis4 f e d
886   }
887   \new Staff {
888     \clef bass
889     r4 d,8 f | gis4 c | b bes |
890     a8 e f4 | g d | gis f
891   }
892 >>
893 @end lilypond
894
895
896