OLD | NEW |
1 @c -*- coding: utf-8; mode: texinfo; -*- | 1 @c -*- coding: utf-8; mode: texinfo; -*- |
2 @ignore | 2 @ignore |
3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH | 3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH |
4 | 4 |
5 When revising a translation, copy the HEAD committish of the | 5 When revising a translation, copy the HEAD committish of the |
6 version that you are working on. For details, see the Contributors' | 6 version that you are working on. For details, see the Contributors' |
7 Guide, node Updating translation committishes.. | 7 Guide, node Updating translation committishes.. |
8 @end ignore | 8 @end ignore |
9 | 9 |
10 @c \version "2.12.0" | 10 @c \version "2.12.0" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 @rlsr{Simultaneous notes}. | 79 @rlsr{Simultaneous notes}. |
80 | 80 |
81 | 81 |
82 @node Chord repetition | 82 @node Chord repetition |
83 @unnumberedsubsubsec Chord repetition | 83 @unnumberedsubsubsec Chord repetition |
84 | 84 |
85 In order to save typing, a shortcut can be used to repeat the preceding | 85 In order to save typing, a shortcut can be used to repeat the preceding |
86 chord. The chord repetition symbol is @code{q}: | 86 chord. The chord repetition symbol is @code{q}: |
87 | 87 |
88 @lilypond[verbatim,quote,relative=1] | 88 @lilypond[verbatim,quote,relative=1] |
89 <c e g> q q q | 89 <c e g>4 q q q |
90 @end lilypond | 90 @end lilypond |
91 | 91 |
92 As in the case of regular chords, the chord repetition symbol can be | 92 As in the case of regular chords, the chord repetition symbol can be |
93 followed by a duration and articulations. Only the pitches of the | 93 followed by a duration and articulations. Only the pitches of the |
94 previous chord are duplicated; articulations, dynamics, etc, are not | 94 previous chord are duplicated; articulations, dynamics, etc, are not |
95 repeated. | 95 repeated. |
96 | 96 |
97 @lilypond[verbatim,quote,relative=1] | 97 @lilypond[verbatim,quote,relative=1] |
98 <c e g>8\p q q4-| q8.^"text" q16 q4-| | 98 <c e g>8\p q q4-| q8.^"text" q16 q4-| |
99 @end lilypond | 99 @end lilypond |
(...skipping 25 matching lines...) Expand all Loading... |
125 The following examples show simultaneous expressions on one staff: | 125 The following examples show simultaneous expressions on one staff: |
126 | 126 |
127 @lilypond[quote,verbatim,relative=2] | 127 @lilypond[quote,verbatim,relative=2] |
128 \new Voice { % explicit single voice | 128 \new Voice { % explicit single voice |
129 << { a4 b g2 } { d4 g c,2 } >> | 129 << { a4 b g2 } { d4 g c,2 } >> |
130 } | 130 } |
131 @end lilypond | 131 @end lilypond |
132 | 132 |
133 @lilypond[quote,verbatim,relative=2] | 133 @lilypond[quote,verbatim,relative=2] |
134 % single first note | 134 % single first note |
135 a << { a4 b g } { d4 g c, } >> | 135 a4 << { a4 b g } { d4 g c, } >> |
136 @end lilypond | 136 @end lilypond |
137 | 137 |
138 This can be useful if the simultaneous sections have identical | 138 This can be useful if the simultaneous sections have identical |
139 rhythms, but attempts to attach notes with different durations | 139 rhythms, but attempts to attach notes with different durations |
140 to the same stem will cause errors. | 140 to the same stem will cause errors. |
141 | 141 |
142 The following example shows how simultaneous expressions can | 142 The following example shows how simultaneous expressions can |
143 generate multiple staves implicitly: | 143 generate multiple staves implicitly: |
144 | 144 |
145 @lilypond[quote,verbatim,relative=2] | 145 @lilypond[quote,verbatim,relative=2] |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 @funindex \oneVoice | 228 @funindex \oneVoice |
229 @funindex oneVoice | 229 @funindex oneVoice |
230 | 230 |
231 @strong{@i{Explicitly instantiating voices}} | 231 @strong{@i{Explicitly instantiating voices}} |
232 | 232 |
233 The basic structure needed to achieve multiple independent | 233 The basic structure needed to achieve multiple independent |
234 voices in a single staff is illustrated in the following example: | 234 voices in a single staff is illustrated in the following example: |
235 | 235 |
236 @lilypond[quote,relative=3,verbatim] | 236 @lilypond[quote,relative=3,verbatim] |
237 \new Staff << | 237 \new Staff << |
238 \new Voice = "first" | 238 \new Voice = "first" { |
239 { \voiceOne r8 r16 g e8. f16 g8[ c,] f e16 d } | 239 \voiceOne |
240 \new Voice= "second" | 240 r8 r16 g e8. f16 g8[ c,] f e16 d |
241 { \voiceTwo d16 c d8~ d16 b c8~ c16 b c8~ c16 b8. } | 241 } |
| 242 \new Voice= "second" { |
| 243 \voiceTwo |
| 244 d16 c d8~ d16 b c8~ c16 b c8~ c16 b8. |
| 245 } |
242 >> | 246 >> |
243 @end lilypond | 247 @end lilypond |
244 | 248 |
245 @noindent | 249 @noindent |
246 Here, voices are instantiated explicitly and are given names. The | 250 Here, voices are instantiated explicitly and are given names. The |
247 @code{\voiceOne} ... @code{\voiceFour} commands set up the voices | 251 @code{\voiceOne} ... @code{\voiceFour} commands set up the voices |
248 so that first and third voices get stems up, second and fourth | 252 so that first and third voices get stems up, second and fourth |
249 voices get stems down, third and fourth voice note heads are | 253 voices get stems down, third and fourth voice note heads are |
250 horizontally shifted, and rests in the respective voices are | 254 horizontally shifted, and rests in the respective voices are |
251 automatically moved to avoid collisions. The @code{\oneVoice} | 255 automatically moved to avoid collisions. The @code{\oneVoice} |
252 command returns all the voice settings to the neutral default | 256 command returns all the voice settings to the neutral default |
253 directions. | 257 directions. |
254 | 258 |
255 @strong{@i{Temporary polyphonic passages}} | 259 @strong{@i{Temporary polyphonic passages}} |
256 | 260 |
257 A temporary polyphonic passage can be created with the following | 261 A temporary polyphonic passage can be created with the following |
258 construct: | 262 construct: |
259 | 263 |
260 @example | 264 @example |
261 << @{ \voiceOne ... @} | 265 << |
262 \new Voice @{ \voiceTwo ... @} | 266 @{ |
263 >> \oneVoice | 267 \voiceOne |
| 268 ... |
| 269 @} |
| 270 \new Voice @{ |
| 271 \voiceTwo |
| 272 ... |
| 273 @} |
| 274 >> |
| 275 \oneVoice |
| 276 ... |
264 @end example | 277 @end example |
265 | 278 |
266 @noindent | 279 @noindent |
267 Here, the first expression within a temporary polyphonic passage is | 280 Here, the first expression within a temporary polyphonic passage is |
268 placed into the @code{Voice} context which was in use immediately | 281 placed into the @code{Voice} context which was in use immediately |
269 before the polyphonic passage, and that same @code{Voice} context | 282 before the polyphonic passage, and that same @code{Voice} context |
270 continues after the temporary section. Other expressions within | 283 continues after the temporary section. Other expressions within |
271 the angle brackets are assigned to distinct temporary voices. | 284 the angle brackets are assigned to distinct temporary voices. |
272 This allows lyrics to be assigned to one continuing voice before, | 285 This allows lyrics to be assigned to one continuing voice before, |
273 during and after a polyphonic section: | 286 during and after a polyphonic section: |
274 | 287 |
275 @lilypond[quote, verbatim, relative=2] | 288 @lilypond[quote, verbatim, relative=2] |
276 << | 289 << |
277 \new Voice = "melody" { | 290 \new Voice = "melody" { |
278 a4 | 291 a4 |
279 << | 292 << |
280 { | 293 { |
281 \voiceOne | 294 \voiceOne |
282 g f | 295 g f |
283 } | 296 } |
284 \new Voice { | 297 \new Voice { |
285 \voiceTwo | 298 \voiceTwo |
286 d2 | 299 d2 |
287 } | 300 } |
288 >> | 301 >> |
289 \oneVoice | 302 \oneVoice |
290 e4 | 303 e4 |
291 } | 304 } |
292 \new Lyrics \lyricsto "melody" { | 305 \new Lyrics \lyricsto "melody" { |
293 This is my song. | 306 This is my song. |
294 } | 307 } |
295 >> | 308 >> |
296 @end lilypond | 309 @end lilypond |
297 | 310 |
298 @noindent | 311 @noindent |
299 Here, the @code{\voiceOne} and @code{\voiceTwo} commands are | 312 Here, the @code{\voiceOne} and @code{\voiceTwo} commands are |
300 required to define the settings of each voice. | 313 required to define the settings of each voice. |
301 | 314 |
302 @strong{@i{The double backslash construct}} | 315 @strong{@i{The double backslash construct}} |
303 | 316 |
(...skipping 21 matching lines...) Expand all Loading... |
325 @code{\voiceOne} ... @code{\voiceFour} commands, in the order in | 338 @code{\voiceOne} ... @code{\voiceFour} commands, in the order in |
326 which they appear in the code. | 339 which they appear in the code. |
327 | 340 |
328 In the following example, the intermediate voice has stems up, | 341 In the following example, the intermediate voice has stems up, |
329 therefore we enter it in the third place, so it becomes voice | 342 therefore we enter it in the third place, so it becomes voice |
330 three, which has the stems up as desired. Spacer rests are | 343 three, which has the stems up as desired. Spacer rests are |
331 used to avoid printing doubled rests. | 344 used to avoid printing doubled rests. |
332 | 345 |
333 @lilypond[quote,relative=3,verbatim] | 346 @lilypond[quote,relative=3,verbatim] |
334 << | 347 << |
335 { r8 g g g g f16 ees f8 d } | 348 { r8 g g g g f16 ees f8 d } |
336 \\ | 349 \\ |
337 { ees,8 r ees r d r d r } | 350 { ees,8 r ees r d r d r } |
338 \\ | 351 \\ |
339 { d'8 s c s bes s a s } | 352 { d'8 s c s bes s a s } |
340 >> | 353 >> |
341 @end lilypond | 354 @end lilypond |
342 | 355 |
343 In all but the simplest works it is advisable to create explicit | 356 In all but the simplest works it is advisable to create explicit |
344 @code{Voice} contexts as explained in @rlearning{Contexts and engravers} and | 357 @code{Voice} contexts as explained in @rlearning{Contexts and engravers} and |
345 @rlearning{Explicitly instantiating voices}. | 358 @rlearning{Explicitly instantiating voices}. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 same note head and opposite stem direction are automatically | 481 same note head and opposite stem direction are automatically |
469 merged, but notes with different note heads or the same stem | 482 merged, but notes with different note heads or the same stem |
470 direction are not. Rests opposite a stem in a different voice | 483 direction are not. Rests opposite a stem in a different voice |
471 are shifted vertically. The following example shows three | 484 are shifted vertically. The following example shows three |
472 different circumstances, on beats 1 and 3 in bar 1 and beat 1 | 485 different circumstances, on beats 1 and 3 in bar 1 and beat 1 |
473 in bar 2, where the automatic merging fails. | 486 in bar 2, where the automatic merging fails. |
474 | 487 |
475 @lilypond[quote,verbatim,relative=2] | 488 @lilypond[quote,verbatim,relative=2] |
476 << | 489 << |
477 { | 490 { |
478 c8 d e d c d c4 | 491 c8 d e d c d c4 | g'2 fis | |
479 g'2 fis | |
480 } \\ { | 492 } \\ { |
481 c2 c8. b16 c4 | 493 c2 c8. b16 c4 | e,2 r | |
482 e,2 r | |
483 } \\ { | 494 } \\ { |
484 \oneVoice | 495 \oneVoice |
485 s1 | 496 s1 | e8 a b c d2 | |
486 e8 a b c d2 | |
487 } | 497 } |
488 >> | 498 >> |
489 @end lilypond | 499 @end lilypond |
490 | 500 |
491 Notes with different note heads may be merged, with the | 501 Notes with different note heads may be merged, with the |
492 exception of half-note heads and quarter-note heads, as shown | 502 exception of half-note heads and quarter-note heads, as shown |
493 below. Here the note heads on beat 1 of bar 1 are now merged: | 503 below. Here the note heads on beat 1 of bar 1 are now merged: |
494 | 504 |
495 @lilypond[quote,verbatim,relative=2] | 505 @lilypond[quote,verbatim,relative=2] |
496 << | 506 << |
497 { | 507 { |
498 \mergeDifferentlyHeadedOn | 508 \mergeDifferentlyHeadedOn |
499 c8 d e d c d c4 | 509 c8 d e d c d c4 | g'2 fis | |
500 g'2 fis | |
501 } \\ { | 510 } \\ { |
502 c2 c8. b16 c4 | 511 c2 c8. b16 c4 | e,2 r | |
503 e,2 r | |
504 } \\ { | 512 } \\ { |
505 \oneVoice | 513 \oneVoice |
506 s1 | 514 s1 | e8 a b c d2 | |
507 e8 a b c d2 | |
508 } | 515 } |
509 >> | 516 >> |
510 @end lilypond | 517 @end lilypond |
511 | 518 |
512 Note heads with different dots as shown in beat 2 of bar 1 may be | 519 Note heads with different dots as shown in beat 2 of bar 1 may be |
513 also be merged: | 520 also be merged: |
514 | 521 |
515 @lilypond[quote,relative=2,verbatim] | 522 @lilypond[quote,relative=2,verbatim] |
516 << | 523 << |
517 { | 524 { |
518 \mergeDifferentlyHeadedOn | 525 \mergeDifferentlyHeadedOn |
519 \mergeDifferentlyDottedOn | 526 \mergeDifferentlyDottedOn |
520 c8 d e d c d c4 | 527 c8 d e d c d c4 | g'2 fis | |
521 g'2 fis | |
522 } \\ { | 528 } \\ { |
523 c2 c8. b16 c4 | 529 c2 c8. b16 c4 | e,2 r | |
524 e,2 r | |
525 } \\ { | 530 } \\ { |
526 \oneVoice | 531 \oneVoice |
527 s1 | 532 s1 | e8 a b c d2 | |
528 e8 a b c d2 | |
529 } | 533 } |
530 >> | 534 >> |
531 @end lilypond | 535 @end lilypond |
532 | 536 |
533 | 537 |
534 The half note and eighth note at the start of the second measure | 538 The half note and eighth note at the start of the second measure |
535 are incorrectly merged because the automatic merge cannot | 539 are incorrectly merged because the automatic merge cannot |
536 successfully complete the merge when three or more notes line up in | 540 successfully complete the merge when three or more notes line up in |
537 the same note column, and in this case the merged note head is | 541 the same note column, and in this case the merged note head is |
538 incorrect. To allow the merge to select the correct note head | 542 incorrect. To allow the merge to select the correct note head |
539 a @code{\shift} must be applied to the note that should not be | 543 a @code{\shift} must be applied to the note that should not be |
540 merged. Here, @code{\shiftOn} is applied to move the top | 544 merged. Here, @code{\shiftOn} is applied to move the top |
541 @notation{g} out of the column, and @code{\mergeDifferentlyHeadedOn} | 545 @notation{g} out of the column, and @code{\mergeDifferentlyHeadedOn} |
542 then works properly. | 546 then works properly. |
543 | 547 |
544 @lilypond[quote,relative=2,verbatim] | 548 @lilypond[quote,relative=2,verbatim] |
545 << | 549 << |
546 { | 550 { |
547 \mergeDifferentlyHeadedOn | 551 \mergeDifferentlyHeadedOn |
548 \mergeDifferentlyDottedOn | 552 \mergeDifferentlyDottedOn |
549 c8 d e d c d c4 | 553 c8 d e d c d c4 | |
550 \shiftOn | 554 \shiftOn |
551 g'2 fis | 555 g'2 fis | |
552 } \\ { | 556 } \\ { |
553 c2 c8. b16 c4 | 557 c2 c8. b16 c4 | e,2 r | |
554 e,2 r | |
555 } \\ { | 558 } \\ { |
556 \oneVoice | 559 \oneVoice |
557 s1 | 560 s1 | e8 a b c d2 | |
558 e8 a b c d2 | |
559 } | 561 } |
560 | 562 |
561 >> | 563 >> |
562 @end lilypond | 564 @end lilypond |
563 | 565 |
564 The @code{\shiftOn}, @code{\shiftOnn}, and @code{\shiftOnnn} | 566 The @code{\shiftOn}, @code{\shiftOnn}, and @code{\shiftOnnn} |
565 commands specify the degree to which chords of the current voice | 567 commands specify the degree to which chords of the current voice |
566 should be shifted. The outer voices (normally: voices one and | 568 should be shifted. The outer voices (normally: voices one and |
567 two) have @code{\shiftOff}, while the inner voices (three and | 569 two) have @code{\shiftOff}, while the inner voices (three and |
568 four) have @code{\shiftOn}. @code{\shiftOnn} and | 570 four) have @code{\shiftOn}. @code{\shiftOnn} and |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 \partcombine @var{musicexpr1} @var{musicexpr2} | 653 \partcombine @var{musicexpr1} @var{musicexpr2} |
652 @end example | 654 @end example |
653 | 655 |
654 The following example demonstrates the basic functionality of the | 656 The following example demonstrates the basic functionality of the |
655 part combiner: putting parts on one staff and setting stem | 657 part combiner: putting parts on one staff and setting stem |
656 directions and polyphony. The same variables are used for the | 658 directions and polyphony. The same variables are used for the |
657 independent parts and the combined staff. | 659 independent parts and the combined staff. |
658 | 660 |
659 @lilypond[quote,verbatim] | 661 @lilypond[quote,verbatim] |
660 instrumentOne = \relative c' { | 662 instrumentOne = \relative c' { |
661 c4 d e f | 663 c4 d e f | R1 | d'4 c b a | b4 g2 f4 | e1 | |
662 R1 | |
663 d'4 c b a | |
664 b4 g2 f4 | |
665 e1 | |
666 } | 664 } |
667 | 665 |
668 instrumentTwo = \relative g' { | 666 instrumentTwo = \relative g' { |
669 R1 | 667 R1 | g4 a b c | d4 c b a | g4 f( e) d | e1 | |
670 g4 a b c | |
671 d c b a | |
672 g f( e) d | |
673 e1 | |
674 } | 668 } |
675 | 669 |
676 << | 670 << |
677 \new Staff \instrumentOne | 671 \new Staff \instrumentOne |
678 \new Staff \instrumentTwo | 672 \new Staff \instrumentTwo |
679 \new Staff \partcombine \instrumentOne \instrumentTwo | 673 \new Staff \partcombine \instrumentOne \instrumentTwo |
680 >> | 674 >> |
681 @end lilypond | 675 @end lilypond |
682 | 676 |
683 The notes in the third measure appear only once, although they were | 677 The notes in the third measure appear only once, although they were |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 c'2 c'2 | | 778 c'2 c'2 | |
785 | 779 |
786 % Bar 2 | 780 % Bar 2 |
787 r8 a'16 d'' f'' a' d'' f'' r8 a'16 d'' f'' a' d'' f'' | | 781 r8 a'16 d'' f'' a' d'' f'' r8 a'16 d'' f'' a' d'' f'' | |
788 r16 d'8.~ d'4 r16 d'8.~ d'4 | | 782 r16 d'8.~ d'4 r16 d'8.~ d'4 | |
789 c'2 c'2 | | 783 c'2 c'2 | |
790 | 784 |
791 } | 785 } |
792 \new StaffGroup << | 786 \new StaffGroup << |
793 \new Staff << \voiceA \\ \voiceB >> | 787 \new Staff << \voiceA \\ \voiceB >> |
794 \new Staff { \clef bass \voiceC } | 788 \new Staff { \clef "bass" \voiceC } |
795 >> | 789 >> |
796 @end lilypond | 790 @end lilypond |
797 | 791 |
798 Relative mode may be used. Note that the @code{\relative} command | 792 Relative mode may be used. Note that the @code{\relative} command |
799 is not used inside @code{\parallelMusic} itself. The notes are | 793 is not used inside @code{\parallelMusic} itself. The notes are |
800 relative to the preceding note in the voice, not to the previous | 794 relative to the preceding note in the voice, not to the previous |
801 note in the input -- in other words, relative notes for | 795 note in the input -- in other words, relative notes for |
802 @code{voiceA} ignore the notes in @code{voiceB}. | 796 @code{voiceA} ignore the notes in @code{voiceB}. |
803 | 797 |
804 @lilypond[quote,verbatim] | 798 @lilypond[quote,verbatim] |
805 \parallelMusic #'(voiceA voiceB voiceC) { | 799 \parallelMusic #'(voiceA voiceB voiceC) { |
806 % Bar 1 | 800 % Bar 1 |
807 r8 g16 c e g, c e r8 g,16 c e g, c e | | 801 r8 g16 c e g, c e r8 g,16 c e g, c e | |
808 r16 e8.~ e4 r16 e8.~ e4 | | 802 r16 e8.~ e4 r16 e8.~ e4 | |
809 c2 c | | 803 c2 c | |
810 | 804 |
811 % Bar 2 | 805 % Bar 2 |
812 r8 a,16 d f a, d f r8 a,16 d f a, d f | | 806 r8 a,16 d f a, d f r8 a,16 d f a, d f | |
813 r16 d8.~ d4 r16 d8.~ d4 | | 807 r16 d8.~ d4 r16 d8.~ d4 | |
814 c2 c | | 808 c2 c | |
815 | 809 |
816 } | 810 } |
817 \new StaffGroup << | 811 \new StaffGroup << |
818 \new Staff << \relative c'' \voiceA \\ \relative c' \voiceB >> | 812 \new Staff << \relative c'' \voiceA \\ \relative c' \voiceB >> |
819 \new Staff \relative c' { \clef bass \voiceC } | 813 \new Staff \relative c' { \clef "bass" \voiceC } |
820 >> | 814 >> |
821 @end lilypond | 815 @end lilypond |
822 | 816 |
823 This works quite well for piano music. This example maps four | 817 This works quite well for piano music. This example maps four |
824 consecutive measures to four variables: | 818 consecutive measures to four variables: |
825 | 819 |
826 @lilypond[quote,verbatim] | 820 @lilypond[quote,verbatim] |
827 global = { | 821 global = { |
828 \key g \major | 822 \key g \major |
829 \time 2/4 | 823 \time 2/4 |
(...skipping 19 matching lines...) Expand all Loading... |
849 \new PianoStaff << | 843 \new PianoStaff << |
850 \new Staff { | 844 \new Staff { |
851 \global | 845 \global |
852 << | 846 << |
853 \relative c'' \voiceA | 847 \relative c'' \voiceA |
854 \\ | 848 \\ |
855 \relative c' \voiceB | 849 \relative c' \voiceB |
856 >> | 850 >> |
857 } | 851 } |
858 \new Staff { | 852 \new Staff { |
859 \global \clef bass | 853 \global \clef "bass" |
860 << | 854 << |
861 \relative c \voiceC | 855 \relative c \voiceC |
862 \\ | 856 \\ |
863 \relative c \voiceD | 857 \relative c \voiceD |
864 >> | 858 >> |
865 } | 859 } |
866 >> | 860 >> |
867 } | 861 } |
868 @end lilypond | 862 @end lilypond |
869 | 863 |
870 | 864 |
871 @seealso | 865 @seealso |
872 Learning Manual: | 866 Learning Manual: |
873 @rlearning{Organizing pieces with variables}. | 867 @rlearning{Organizing pieces with variables}. |
874 | 868 |
875 Snippets: | 869 Snippets: |
876 @rlsr{Simultaneous notes}. | 870 @rlsr{Simultaneous notes}. |
OLD | NEW |