lilypond-user
[Top][All Lists]
Advanced

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

Re: piano pedal vertical alignment question


From: Neil Puttock
Subject: Re: piano pedal vertical alignment question
Date: Sun, 14 Sep 2008 18:44:21 +0100

2008/9/14 Kieren MacMillan <address@hidden>:

> But why wouldn't (i.e., doesn't) this work?
>
> \layout
> {
>        \context
>        {
>                \Score
>                pedalSustainStrings = #'("Ped." "*Ped." (markup #:lower 0.45
> "*") )
>        }
> }

Unfortunately, the strings in this list are only used to build up the
glyph names.  Whenever there's a match, the glyph is retrieved from
the font via lookup.  For example, in the case of "Ped.", the string
is parsed into "Ped" and ".", building up glyph names "pedal.Ped" and
"pedal.." (the individual glyphs for the letters for "Ped" aren't used
together since they have no kerning).

It's pretty straightforward to hack support for markup, but I suspect
the pedal code needs a complete rewrite to use markup exclusively.
Attached is a patch which allows markup to be used, though I'm not
sure that it's a satisfactory solution since it's a bit dubious having
to check whether something's a string before checking for markup.

The png was produced using the following override:

pedalSustainStrings = #(list
    "Ped"
    (markup  #:lower 0.45 (#:teeny #:musicglyph "pedal.*") #:bracket
#:musicglyph "pedal.Ped")
    (markup #:lower 0.45  #:huge #:musicglyph "pedal.*"))

Regards,
Neil

Attachment: 0001-Piano-pedal-markup-test.patch
Description: Text Data

Attachment: pedal_markup.png
Description: PNG image


reply via email to

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