lilypond-user
[Top][All Lists]
Advanced

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

Re: How to control the placement of symbols (in \mark \markup)?


From: Mojca Miklavec
Subject: Re: How to control the placement of symbols (in \mark \markup)?
Date: Thu, 14 Jul 2016 11:08:11 +0200

Dear Simon,

On 13 July 2016 at 21:48, Simon Albrecht wrote:
> On 13.07.2016 08:31, Mojca Miklavec wrote:
>>
>> I want to put this sign as the first thing after the bar
>> (or potentially anywhere later between the pitches).
>
> Perhaps you’ll like this function, which I find very convenient:
>
> %%%%%%%%
> \version "2.19.45"
>
> after =
> #(define-music-function (t e m) (ly:duration? ly:music? ly:music?)
>    #{
>      \context Bottom <<
>        #m
>        { \skip $t <> -\tweak extra-spacing-width #empty-interval $e }
>      >>
>    #})
>
> { \after 2 \upbow c'1\downbow }
> %%%%%%%%%

Thank you very much for teaching me a neat trick. I would actually use it as

    \relative c'' {
        \after 64 \upbow a4 a a a
        \after 64 \downbow a a a a
    }

With 64 meaning: put as much to the left as possible.

See also
    https://lists.gnu.org/archive/html/lilypond-user/2009-10/msg00257.html

This approach is better than
    \mark \markup{ \musicglyph #"scripts.upbow" }
in the sense that it puts the glyph to the proper vertical location,
but I would prefer if the symbol was a tiny bit more to the left (to
the left of the pitch).

(Is there a way to put \upbow/\downbow on top of the bar? If not,
"\after 64 \upbow" can do the trick for now.)

I would only like to ask for a bit of explanation of the code to get a
better understanding (being new to the lilypond world).

1.) I understand "\skip $t": make an invisible skip for this duration.
But what is "<> -" following that? An empty chord? What about the
dash?

2.) How exactly does "\context Bottom" work? The best hit I could find was
    http://lilypond.org/doc/v2.19/Documentation/notation/contexts-explained
but that's not exactly it.

3.) How much "music" does the "m" variable from the \after function
"digest"? Just a single pitch?

Thank you,
    Mojca



reply via email to

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