X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=input%2Fregression%2Fmusic-function.ly;h=8f4da124fa0d81f6864b40a96f1b5adb7d9e897d;hb=d275ca42d6f29579aa3abe7ef1978e3916f5cdb2;hp=b62a5faad4fbf947c80fe9c03e1479c1a9b114ea;hpb=06b1da466f99f6c4a01ee6a3e611d25bd5359d4c;p=lilypond.git diff --git a/input/regression/music-function.ly b/input/regression/music-function.ly index b62a5faad4..8f4da124fa 100644 --- a/input/regression/music-function.ly +++ b/input/regression/music-function.ly @@ -1,25 +1,22 @@ \header { -texidoc = "Music function are generic music transformation functions, -which can be used to extend music syntax seamlessly." + +texidoc = "Music functions are generic music transformation functions, +which can be used to extend music syntax seamlessly. Here we +demonstrate a @code{\\myBar} function, which works similar to +@code{\\bar}, but is implemented completely in Scheme." } -\version "2.3.17" +\version "2.17.5" + +myBar = #(define-music-function (parser location bar-type) (string?) + (context-spec-music + (context-spec-music (make-property-set 'whichBar bar-type) 'Timing) + 'Score)) -#(define myBar - (ly:make-music-function - (list string?) - (lambda (where type) - (context-spec-music - (context-spec-music (make-property-set 'whichBar type) 'Timing) - 'Score)) - - )) +\layout { ragged-right = ##t } -\score{ - { - d4 \myBar #"|:" d4 - - } +{ + d4 \myBar ".|:" d4 }