[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: define-music-function question
From: |
Nicolas Sceaux |
Subject: |
Re: define-music-function question |
Date: |
Thu, 12 Aug 2010 22:13:28 +0200 |
Le 12 août 2010 à 02:33, Ian Hulin a écrit :
> Hi all,
>
> In a recent piece I've had occasion to produce a trill mark with an
> accidental above, and stealing from the manual, I came up with
>
> g4(^\markup{
> \tiny \center-column {
> \flat \musicglyph #"scripts.trill" }
>
> for example.
>
> As this cropped up more than once I thought it would be a good idea to
> write a music function:
>
> trillflat = #(define-music-function
> (parser location note) (ly:music?)
> #{$note^\markup{
> \tiny\center-column{ \flat \musicglyph #"scripts.trill" }} )
What you want to do looks very like the example from the manual:
<http://lilypond.org/doc/v2.13/Documentation/extending/adding-articulation-to-notes-_0028example_0029>
>
> But the parser/lexer gets upset with the ^ and I suspect it doesn't like
> the # between the '#{' and '#}'.
No, it's just that \variable ^\markup ... is not permitted.
Nicolas