4 texidoc = "@code{make-relative} is a Scheme utility macro mainly
5 useful for creating music functions accepting pitches as arguments.
6 Its purpose is to make music functions taking pitch arguments for
7 producing complex music fragments integrate nicely within a
8 @code{\\relative} section. This regtest typesets a short music
9 fragment twice, once without using @code{\\relative}, once using it.
10 The fragment should appear identical in both cases."
14 \layout { ragged-right= ##t }
17 #(define-music-function (parser location p1 p2 p3 p4 p5)
18 (ly:pitch? ly:pitch? ly:pitch? ly:pitch? ly:pitch?)
19 (make-relative (p1 p2 p3 p4 p5) (make-event-chord (list p1 p2 p3 p4 p5))
21 \repeat unfold 2 { $p1 2 } |
22 \repeat unfold 2 { r16 $p2 8. ~ $p2 4 } |
23 \repeat unfold 2 { r8 $p3 16 $p4 $p5 $p3 $p4 $p5 } |
26 \parallelMusic #'(low middle high)
29 R1*7 | \skip 1*7 | \oneVoice R1*7 \voiceOne |
31 \voiceTwo | \change Staff = "down" \voiceOne | \oneVoice |
33 \oneVoice R1*21 \voiceTwo | \skip 1*21 | R1*21 |
35 c,2~ 2 | r16 c8. ~ 4 ~ 2
36 | r8 f16 a c' f' c' a c' a f a f d f d |
37 c,2~ 2 | r16 b,8. ~ 4 ~ 2
38 | r8 g'16 b' d'' f'' d'' b' d'' b' g' b' d' f' e' d' |
39 c,1\fermata | c1 | <e' g' c''>1\fermata \bar "|." |
46 << \high \\ \middle >>
55 \parallelMusic #'(low middle high)
58 R1*7 | \skip 1*7 | \oneVoice R1*7 \voiceOne |
60 \voiceTwo | \change Staff = "down" \voiceOne | \oneVoice |
62 \oneVoice R1*21 \voiceTwo | \skip 1*21 | R1*21 |
64 c2~ 2 | r16 c'8. ~ 4 ~ 2
65 | r8 f16 a c f c' a c a f a f d f d |
66 c,,2~ 2 | r16 b'8. ~ 4 ~ 2
67 | r8 g'16 b d f d b d b g b d f e d |
68 c,,1\fermata | c'1 | <e' g c>1\fermata \bar "|." |
75 << \high \\ \middle >>