X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=input%2Fregression%2Foptional-args.ly;h=8277ce28c040647e7b62662c22e3c0c335544b45;hb=97a0169312a260933246ab224e4f8b0969871dd5;hp=1fbce42da962db0ce46da318f5eb6099aa7ffe28;hpb=522f419e3ed3e09ecf834bbb5315ac1777ab13e0;p=lilypond.git diff --git a/input/regression/optional-args.ly b/input/regression/optional-args.ly index 1fbce42da9..8277ce28c0 100644 --- a/input/regression/optional-args.ly +++ b/input/regression/optional-args.ly @@ -1,4 +1,4 @@ -\version "2.16.0" +\version "2.19.22" \header{ texidoc= "Test optional music function arguments. @@ -10,24 +10,19 @@ the rest is skipped." \layout { ragged-right = ##t } -% Get following pitch into Scheme -pitch = #(define-scheme-function (parser location p) (ly:pitch?) p) -% The same with a duration -dur = #(define-scheme-function (parser location p) (ly:duration?) p) - % Just like \relative, but defaulting to f as reference, making the % first note of the music the same as if written as absolute pitch ablative = -#(define-music-function (parser location ref music) - ((ly:pitch? #{ \pitch f #}) ly:music?) +#(define-music-function (ref music) + ((ly:pitch? #{ f #}) ly:music?) #{ \relative $ref $music #}) % Let's take a duration and four pitches, defaulting to 2 c' d' e' zap = -#(define-music-function (parser location dur a b c d) - ((ly:duration? #{ \dur 2 #}) (ly:pitch? #{ \pitch c' #}) - (ly:pitch? #{ \pitch d' #}) (ly:pitch? #{ \pitch e' #}) +#(define-music-function (dur a b c d) + ((ly:duration? #{ 2 #}) (ly:pitch? #{ c' #}) + (ly:pitch? #{ d' #}) (ly:pitch? #{ e' #}) ly:music?) #{ $a $dur $b $c ^\markup{!} $d #}) -\new Voice { \relative c' e' \relative { e' } \ablative c' e' \ablative { e' } +\new Voice { \relative c' e' \relative { e'' } \ablative c' e' \ablative { e' } \zap 8. c'' d'' {e''4..} \zap f''8 g'' \zap 4 a'' b'' c''' d'''2 }