]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/music-function.ly
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / input / regression / music-function.ly
1 \header
2 {
3
4 texidoc = "Music functions are generic music transformation functions,
5 which can be used to extend music syntax seamlessly.  Here we
6 demonstrate a @code{\\myBar} function, which works similar to
7 @code{\\bar}, but is implemented completely in Scheme."
8
9 }
10 \version "2.19.22"
11
12 myBar = #(define-music-function (bar-type) (string?)
13           (context-spec-music
14            (context-spec-music (make-property-set 'whichBar bar-type) 'Timing)
15            'Score))
16
17 \layout { ragged-right = ##t }
18
19 {
20     d4 \myBar ".|:" d4
21 }
22