11 |
* Suggestions for writing LilyPond files:: |
* Suggestions for writing LilyPond files:: |
12 |
* Single staff:: |
* Single staff:: |
13 |
* Piano templates:: |
* Piano templates:: |
14 |
* Small ensembles:: |
* String quartet:: |
15 |
* Vocal ensembles:: |
* Vocal ensembles:: |
16 |
* Ancient notation templates:: |
* Ancient notation templates:: |
17 |
* Jazz combo:: |
* Jazz combo:: |
428 |
@end lilypond |
@end lilypond |
429 |
|
|
430 |
|
|
431 |
@node Small ensembles |
@node String quartet |
432 |
@section Small ensembles |
@section String quartet |
433 |
@subsection String quartet |
@subsection String quartet |
434 |
|
|
435 |
This template demonstrates a string quartet. It also uses a @code{\global} |
This template demonstrates a string quartet. It also uses a @code{\global} |
436 |
section for time and key signatures. |
section for time and key signatures. |
437 |
|
|
438 |
@lilypond[quote,verbatim,raggedright] |
@lilypond[quote,verbatim,raggedright] |
439 |
\version "2.4.0" |
version "2.4.0" |
|
global = { |
|
|
\time 4/4 |
|
|
\key c \major |
|
|
} |
|
440 |
|
|
441 |
violinOne = \relative c''{ |
global= { |
442 |
\set Staff.instrument = "Violin 1 " |
\time 4/4 |
443 |
c2 d |
\key c \major |
|
e1 |
|
444 |
} |
} |
445 |
|
|
446 |
violinTwo = \relative c''{ |
Violinone = \new Voice { \relative c''{ |
447 |
\set Staff.instrument = "Violin 2 " |
\set Staff.instrument = "Violin 1 " |
|
g2 g |
|
|
g1 |
|
|
} |
|
448 |
|
|
449 |
viola = \relative c'{ |
c2 d e1 |
|
\set Staff.instrument = "Viola " |
|
|
\clef alto |
|
|
e2 d |
|
|
c1 |
|
|
} |
|
450 |
|
|
451 |
cello = \relative c'{ |
\bar "|." }} |
452 |
\set Staff.instrument = "Cello " |
Violintwo = \new Voice { \relative c''{ |
453 |
\clef bass |
\set Staff.instrument = "Violin 2 " |
454 |
c2 g |
|
455 |
c,1 |
g2 f e1 |
456 |
} |
|
457 |
|
\bar "|." }} |
458 |
|
Viola = \new Voice { \relative c' { |
459 |
|
\set Staff.instrument = "Viola " |
460 |
|
\clef alto |
461 |
|
|
462 |
|
e2 d c1 |
463 |
|
|
464 |
|
\bar "|." }} |
465 |
|
Cello = \new Voice { \relative c' { |
466 |
|
\set Staff.instrument = "Cello " |
467 |
|
\clef bass |
468 |
|
|
469 |
|
c2 b a1 |
470 |
|
|
471 |
|
\bar "|."}} %********************************** |
472 |
|
|
473 |
\score { |
\score { |
474 |
\new StaffGroup << |
\new StaffGroup << |
483 |
@end lilypond |
@end lilypond |
484 |
|
|
485 |
|
|
486 |
|
@subsection String quartet parts |
487 |
|
|
488 |
|
The previous example produces a nice string quartet, but what if you |
489 |
|
needed to print parts? This template demonstrates how to use the |
490 |
|
@code{\tag} feature to easily split a piece into individual parts. |
491 |
|
|
492 |
|
You need to split this template into separate files; the filenames |
493 |
|
are contained in comments at the beginning of each file. @code{piece.ly} |
494 |
|
contains all the music definitions. The other files -- @code{score.ly}, |
495 |
|
@code{vn1.ly}, @code{vn2.ly}, @code{vla.ly}, and |
496 |
|
@code{vlc.ly} -- produce the appropiate part. |
497 |
|
|
498 |
|
@verbatim |
499 |
|
%%%%% piece.ly |
500 |
|
\version "2.4.0" |
501 |
|
|
502 |
|
global= { |
503 |
|
\time 4/4 |
504 |
|
\key c \major |
505 |
|
} |
506 |
|
|
507 |
|
Violinone = \new Voice { \relative c''{ |
508 |
|
\set Staff.instrument = "Violin 1 " |
509 |
|
|
510 |
|
c2 d e1 |
511 |
|
|
512 |
|
\bar "|." }} %********************************* |
513 |
|
Violintwo = \new Voice { \relative c''{ |
514 |
|
\set Staff.instrument = "Violin 2 " |
515 |
|
|
516 |
|
g2 f e1 |
517 |
|
|
518 |
|
\bar "|." }} %********************************* |
519 |
|
Viola = \new Voice { \relative c' { |
520 |
|
\set Staff.instrument = "Viola " |
521 |
|
\clef alto |
522 |
|
|
523 |
|
e2 d c1 |
524 |
|
|
525 |
|
\bar "|." }} %********************************* |
526 |
|
Cello = \new Voice { \relative c' { |
527 |
|
\set Staff.instrument = "Cello " |
528 |
|
\clef bass |
529 |
|
|
530 |
|
c2 b a1 |
531 |
|
|
532 |
|
\bar "|."}} %********************************** |
533 |
|
|
534 |
|
music = { |
535 |
|
<< |
536 |
|
\tag #'(score vn1) \new Staff { << \global \Violinone >> } |
537 |
|
\tag #'(score vn2) \new Staff { << \global \Violintwo>> } |
538 |
|
\tag #'(score vla) \new Staff { << \global \Viola>> } |
539 |
|
\tag #'(score vlc) \new Staff { << \global \Cello>> } |
540 |
|
>> |
541 |
|
} |
542 |
|
|
543 |
|
|
544 |
|
|
545 |
|
%%%%% score.ly |
546 |
|
\version "2.4.0" |
547 |
|
\include "piece.ly" |
548 |
|
#(set-global-staff-size 14) |
549 |
|
\score { |
550 |
|
\new StaffGroup \keepWithTag #'score \music |
551 |
|
\layout { } |
552 |
|
\midi { \tempo 4 = 60 } |
553 |
|
} |
554 |
|
|
555 |
|
|
556 |
|
%%%%% vn1.ly |
557 |
|
\version "2.4.0" |
558 |
|
\include "piece.ly" |
559 |
|
\score { |
560 |
|
\keepWithTag #'vn1 \music |
561 |
|
\layout { } |
562 |
|
} |
563 |
|
|
564 |
|
|
565 |
|
%%%%% vn2.ly |
566 |
|
\version "2.4.0" |
567 |
|
\include "piece.ly" |
568 |
|
\score { |
569 |
|
\keepWithTag #'vn2 \music |
570 |
|
\layout { } |
571 |
|
} |
572 |
|
|
573 |
|
|
574 |
|
%%%%% vla.ly |
575 |
|
\version "2.4.0" |
576 |
|
\include "piece.ly" |
577 |
|
\score { |
578 |
|
\keepWithTag #'vla \music |
579 |
|
\layout { } |
580 |
|
} |
581 |
|
|
582 |
|
|
583 |
|
%%%%% vlc.ly |
584 |
|
\version "2.4.0" |
585 |
|
\include "piece.ly" |
586 |
|
\score { |
587 |
|
\keepWithTag #'vlc \music |
588 |
|
\layout { } |
589 |
|
} |
590 |
|
@end verbatim |
591 |
|
|
592 |
|
|
593 |
@node Vocal ensembles |
@node Vocal ensembles |
594 |
@section Vocal ensembles |
@section Vocal ensembles |
595 |
|
|
1275 |
(@code{taor}, @code{grip}, @code{thrd}, etc), which can be reused easily. |
(@code{taor}, @code{grip}, @code{thrd}, etc), which can be reused easily. |
1276 |
|
|
1277 |
@c TODO - replace Bagpipe template with Andrew McNabb's work? |
@c TODO - replace Bagpipe template with Andrew McNabb's work? |
1278 |
|
@c http://www.mcnabbs.org/andrew/linux/lilypond-ghb/ |
1279 |
|
|
1280 |
@lilypond[quote,verbatim] |
@lilypond[quote,verbatim] |
1281 |
taor = { \grace { g32[ d' g e'] } } |
taor = { \grace { g32[ d' g e'] } } |