]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/using-tags-to-produce-mensural-and-modern-music-from-the-same-source.ly
LSR changes: mainly making line widths smaller for PDF docs
[lilypond.git] / Documentation / snippets / using-tags-to-produce-mensural-and-modern-music-from-the-same-source.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.19.22"
8
9 \header {
10   lsrtags = "ancient-notation, vocal-music"
11
12   texidoc = "
13 By using tags, it's possible to use the same music to produce both
14 mensural and modern music.  In this snippet, a function @code{menrest}
15 is introduced, allowing mensural rests to be pitched as in the
16 original, but with modern rests in the standard staff position.  Tags
17 are used to produce different types of bar line at the end of the
18 music, but tags can also be used where other differences are needed:
19 for example using @qq{whole measure rests} (R1, R\\breve etc.) in
20 modern music, but normal rests (r1, r\\breve, etc.) in the mensural
21 version.  Note that converting mensural music to its modern equivalent
22 is usually referred to as @code{transcription}.
23
24 "
25   doctitle = "Using tags to produce mensural and modern music from the same source"
26 } % begin verbatim
27
28 menrest = #(define-music-function (note)
29   (ly:music?)
30 #{
31     \tag #'mens $(make-music 'RestEvent note)
32     \tag #'mod $(make-music 'RestEvent note 'pitch '())
33 #})
34
35 MensStyle = {
36   \autoBeamOff
37   \override NoteHead #'style = #'petrucci
38   \override Score.BarNumber #'transparent = ##t
39   \override Stem.neutral-direction = #up
40 }
41
42 finalis = {
43   \once \override BreathingSign.stencil = #ly:breathing-sign::finalis
44   \once \override BreathingSign.Y-offset = #0
45   \once \override BreathingSign.minimum-X-extent = #'(-1.0 . 0.0)
46   \once \override BreathingSign.minimum-Y-extent = #'(-2.5 . 2.5)
47
48   \breathe
49 }
50
51 Music = \relative c'' {
52   \set Score.tempoHideNote = ##t
53   \key f \major
54   \time 4/4
55   g1 d'2 \menrest bes4 bes2 a2 r4 g4 fis2.
56   \tag #'mens { \finalis }
57   \tag #'mod { \bar "||" }
58 }
59
60 MenLyr = \lyricmode { So farre, deere life, deare life }
61 ModLyr = \lyricmode { So far, dear life, dear life }
62
63 \score {
64   \keepWithTag #'mens {
65     <<
66       \new MensuralStaff
67       {
68         \new MensuralVoice = Cantus \clef "mensural-c1" \MensStyle \Music
69       }
70       \new Lyrics \lyricsto Cantus \MenLyr
71     >>
72   }
73 }
74
75 \score {
76   \keepWithTag #'mod {
77     \new ChoirStaff <<
78       \new Staff
79       {
80         \new Voice = Sop \with {
81           \remove "Note_heads_engraver"
82           \consists "Completion_heads_engraver"
83           \remove "Rest_engraver"
84           \consists "Completion_rest_engraver" }
85         {
86           \shiftDurations #1 #0 { \autoBeamOff \Music }
87         }
88       }
89       \new Lyrics \lyricsto Sop \ModLyr
90     >>
91   }
92 }