[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More problems with hor. alignment of button numbers when misusing ly
From: |
David Nalesnik |
Subject: |
Re: More problems with hor. alignment of button numbers when misusing lyrics (for accordion) |
Date: |
Tue, 26 Jul 2016 12:52:36 -0500 |
On Tue, Jul 26, 2016 at 12:47 PM, David Nalesnik
<address@hidden> wrote:
> Hi Mojca,
>
> On Tue, Jul 26, 2016 at 7:44 AM, Mojca Miklavec
> <address@hidden> wrote:
>
>> To summarise again: I want to add button numbers (and optional finger
>> numbers) on top of pitches (usually one to three buttons at the same
>> time) to aid diatonic accordion players.
>>
>> Following David's advice I'm currently misusing the lyrics for that.
>> But apart from a bug in vertical alignment when the "first syllable"
>> in the top row is missing (the only workaround I found so far was to
>> use "-" as the first syllable instead of an empty space), there's
>> another problem that I just discovered.
>>
>> Namely, when one chord is played with more buttons/fingers than other
>> chords inside the same "bar", LilyPond tries to be smart and aligns
>> the top positions towards other chords where there is presumably more
>> space. But at the end this looks ugly.
>>
>
> Frankly, this looks like a bug. It seems that the property
> 'self-alignment-X is not always respected.
Yup. Changing the callback to print out the self-alignment-X, we get (!)
3 B4 shift: 0.0 self-align: -1
2 B3 shift: -1.42092227559055 self-align: 0
1 B2 shift: -1.42092227559055 self-align: 0
A5 shift: 0.0 self-align: -1
A4 shift: -0.594124708661417 self-align: 0
B4 shift: -0.594124708661417 self-align: 0
Here's the revised testing code:
\layout {
ragged-right = ##f
\context {
\Lyrics
%\override LyricText.self-alignment-X = #LEFT
\override LyricText.after-line-breaking =
#(lambda (grob)
(format #t "~a shift: ~a self-align: ~a~%"
(markup->string (ly:grob-property grob 'text))
(ly:grob-property grob 'X-offset)
(ly:grob-property grob 'self-alignment-X)))
}
}
Same results when explicitly overriding self-alignment-X to CENTER:
\override LyricText.self-alignment-X = #CENTER
Something is messed up.
DN
- More problems with hor. alignment of button numbers when misusing lyrics (for accordion), Mojca Miklavec, 2016/07/26
- Re: More problems with hor. alignment of button numbers when misusing lyrics (for accordion), David Nalesnik, 2016/07/26
- Re: More problems with hor. alignment of button numbers when misusing lyrics (for accordion),
David Nalesnik <=
- Re: More problems with hor. alignment of button numbers when misusing lyrics (for accordion), David Nalesnik, 2016/07/26
- Re: More problems with hor. alignment of button numbers when misusing lyrics (for accordion), David Nalesnik, 2016/07/26
- Re: More problems with hor. alignment of button numbers when misusing lyrics (for accordion), David Nalesnik, 2016/07/26
- Re: More problems with hor. alignment of button numbers when misusing lyrics (for accordion), Mojca Miklavec, 2016/07/27
- Re: More problems with hor. alignment of button numbers when misusing lyrics (for accordion), David Nalesnik, 2016/07/27