lilypond-user
[Top][All Lists]
Advanced

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

Re: Music function that attaches text to a music argument


From: Marc Hohl
Subject: Re: Music function that attaches text to a music argument
Date: Tue, 04 May 2010 08:11:13 +0200
User-agent: Thunderbird 2.0.0.24 (X11/20100317)

Nathan Reed schrieb:
Hello all,

I would like to write a music function that takes a single-note music
expression and attaches some markup text to it.  I tried to write:

\version "2.12.3"
myfunc = #(define-music-function (parser location mymusic) (ly:music?)
        #{ $mymusic ^"Hello, world!" #}
)
\relative c' {
        \myfunc c1
}

Hi Nathan,

have you read

http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Adding-articulation-to-notes-_0028example_0029#Adding-articulation-to-notes-_0028example_0029

?

I think you can use the information here as a starting point.

Marc
But Lilypond chokes with a syntax error on the ^.  Similarly it does
not work to take a music expression and attach an articulation,
dynamic, etc.  I guess this is because a music expression can
potentially be a whole series of notes, and I need to somehow unpack
it using Scheme and get to the single note inside it.  Can anyone
help?

Thanks,
Nathan Reed


_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user






reply via email to

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