lilypond-user
[Top][All Lists]
Advanced

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

Re: Help debugging music function


From: Thomas Morley
Subject: Re: Help debugging music function
Date: Mon, 5 Nov 2012 23:24:35 +0100

2012/11/5 Vivian Barty-Taylor <address@hidden>:
> 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  }}
>
>   #})
>
> When I process:
>
> \version "2.16.0"
>
> \include "header.ly"
>
>
> \score {
>
> \new Staff {
>
> c4_\arrow #'(10 . 0)
>
> }
> }
>
> I get output:
>
> Ontleden...
> arrowtest.ly:10:3: fout: music function cannot return (#<procedure 
> line-markup (layout props args)> ((#<procedure draw-line-markup (layout props 
> dest)> (10 . 0)) (#<procedure arrow-head-markup (layout props axis dir 
> filled)> 0 1 #t)))
> c4_
>    \arrow #'(10 . 0)
> Interpreting music...
> programmeerfout: Not a music type
>
> Thanks in advance,
>
> Vivian.
>
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user

Hi,

you could try:

\version "2.16.0"

arrow = #(define-music-function (parser location arg1) ( pair?)
(make-music
          'TextScriptEvent
          'text
          #{ \markup \line { \draw-line #arg1 \arrow-head #X #RIGHT ##t } #} ))


\new Staff { c4-\arrow #'(10 . 0) }


But see:
http://code.google.com/p/lilypond/issues/detail?id=2949
by David Kastrup
(5 minutes ago)


Cheers,
  Harm



reply via email to

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