OLD | NEW |
1 \version "2.19.22" | 1 \version "2.19.22" |
2 | 2 |
3 \header { | 3 \header { |
4 texidoc = "@code{make-relative} can make relativization on music | 4 texidoc = "@code{make-relative} can make relativization on music |
5 function calls behave as one would expect from looking at the | 5 function calls behave as one would expect from looking at the |
6 function's arguments rather than at the actually resulting | 6 function's arguments rather than at the actually resulting |
7 expressions. This regtest defines an example function | 7 expressions. This regtest defines an example function |
8 @code{\\withOctave} which works equally well inside and outside of | 8 @code{\\withOctave} which works equally well inside and outside of |
9 @code{\\relative}." | 9 @code{\\relative}." |
10 } | 10 } |
11 | 11 |
12 withOctave = | 12 withOctave = |
13 #(define-music-function (music) | 13 #(define-music-function (music) |
14 (ly:music?) | 14 (ly:music?) |
15 (make-relative | 15 (make-relative |
16 (music) music | 16 (music) music |
17 #{ \context Bottom << $music \transpose c c' $music >> #})) | 17 #{ \context Bottom << $music \transpose c c' $music >> #})) |
18 | 18 |
19 mus = { | 19 mus = { |
20 \partial 4. c'8 e g | | 20 \partial 4. c'8 e g | |
21 c2 e,4 g | | 21 c2 e,4 g | |
22 c,8 c' b a <g d'> <f c'> <e b'> <d a'> | | 22 c,8 c' b a <g d'> <f c'> <e b'> <d a'> | |
23 <c g'>1 | \bar "|." | 23 <c g'>1 | \bar "|." |
24 } | 24 } |
25 | 25 |
26 << | 26 << |
27 \relative \new Staff { <>^"original" \mus } | 27 \relative \new Staff { <>^"original" \mus } |
28 \relative \new Staff { <>^\markup \typewriter "\\relative \\withOctave" | 28 \relative \new Staff { <>^\markup \typewriter "\\relative \\withOctave" |
29 \withOctave \mus } | 29 \withOctave \mus } |
30 \new Staff { <>^\markup \typewriter "\\withOctave \\relative" | 30 \new Staff { <>^\markup \typewriter "\\withOctave \\relative" |
31 \withOctave \relative \mus } | 31 \withOctave \relative \mus } |
32 >> | 32 >> |
OLD | NEW |