Vivian Barty-Taylor <belast...@vivbt.nl> writes: > Could someone with knowhow help me to debug this music function? I > want a function to create arrows in a Lilypond score: > > arrow = #(define-music-function (parser location arg1 ) ( pair?) > #{ > > \markup { \line \draw-line #arg1 \arrow-head #X #RIGHT ##t }} > > #})
A markup is not music, and a music function can only return music. In version 2.17.6, just using define-scheme-function instead of define-music-function should have been enough (apart from needing to match braces better). Turns out that this is not the case, but will be after issue 2949 <URL:http://code.google.com/p/lilypond/issues/detail?id=2949> passes. The nicest 2.16 approach would likely be using define-event-function here and writing #{ - \markup ... #} instead of just #{ \markup ... #}. In that case, you can use \arrow _only_ as a text script and not otherwise as text/markup. The "traditional" approach would rather use define-markup-command (different overall syntax, however), and would require using _\markup \arrow ... for calling this. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user