1\header 2{ 3 4texidoc = "Music functions are generic music transformation functions, 5which can be used to extend music syntax seamlessly. Here we 6demonstrate 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 12myBar = #(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 23