lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help debugging music function


From: David Kastrup
Subject: Re: Help debugging music function
Date: Mon, 05 Nov 2012 23:23:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Vivian Barty-Taylor <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]