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