lilypond-user
[Top][All Lists]
Advanced

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

Re: tags


From: David Kastrup
Subject: Re: tags
Date: Mon, 26 Apr 2021 11:02:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Gianmaria Lari <gianmarialari@gmail.com> writes:

> Be patient with me.
>
> I expect this to generate {a~a} but it generates {a a} . Why?
>
> \version "2.23.2"
> music = {a \tag#'here a}
> {\pushToTag #'here ~ \music }
>
> The \displayLilyMusic output looks "correct".
>
>
> { { a4 \tag #'here { ~ } a4 } }

How is { ~ } correct?  ~ is not standalone music.

At any rate, \pushToTag's documentation states:

       Sometimes you want to splice some music at a particular place in an
    existing music expression.  You can use ‘\pushToTag’ and ‘\appendToTag’
    for adding material at the front or end of the ‘elements’ of an existing
    music construct.  Not every music construct has ‘elements’, but
    sequential and simultaneous music are safe bets:

But you are not pushing to sequential or simultaneous music but rather
to the second a , a single note.  This needs to be a sequential music
expression.

So what you can push is <>~ though the tie event needs to occur at the
first note rather than the second.

So:

\version "2.23.2"
music = {\tag#'here {a} a}
{\pushToTag #'here <>~ \music }

-- 
David Kastrup

reply via email to

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