lilypond-user
[Top][All Lists]
Advanced

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

More problems with hor. alignment of button numbers when misusing lyrics


From: Mojca Miklavec
Subject: More problems with hor. alignment of button numbers when misusing lyrics (for accordion)
Date: Tue, 26 Jul 2016 14:44:41 +0200

Hi,

Sorry for a bit of "top-posting", but all I wanted was to include some
minor background (started in the thread "Vertical clash of contents").
You can ignore that if you want.

If replying, please CC me.

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.

A bit more background:

I would eventually like to be able to do the following:

- Export information (pitch/chord, duration, push/pull direction,
button, finger) from LilyPond input to some plain text (xml or
whatever) format; MIDI is ok to export pitch and duration, but
push/pull direction, button and finger number get lost

- I noticed that one particular school uses a different notation for
buttons. The most widely-spread notation uses A for the first row, B
for the second row, C for the third row. But that other school from
where I got a large collection of hand-written scores uses C for the
first row (for pitch "c"), F for the second row (for pitch "f") and B
for the third row (for "bes/hes"). I would eventually like to be able
to automatically convert from one notation to the other by changing a
single setting. I'm afraid that if button numbers are entered in
lyrics as "B4", it could get slightly more difficult to do the
auto-conversion to "F4".

- Do some consistency check in the same way as bars are entered and
then LilyPond complains loudly in case the durations don't match the
bars that the user entered explicitly. If button number and playing
direction is not consistent with the pitch, I would want a warning
from Lilypond.

- Do some [semi-]auto-conversion (in either direction) between button
numbers and pitches.

- Perhaps omit the staves and print just button numbers and fingers.

- When repeats with alternative endings are involved, I would want to
have the ability to print out the "expanded" version of button
numbers.

- Do other weird stuff with button numbers.

To make it clear: I don't need to do all of that now. Far from that.
But I would like to enter the information in such a way that I
wouldn't have to completely rewrite all the files I'm creating now in
the future when/if I manage to figure out how to do the things
mentioned above.

Until I get a better idea about scheme I started playing with pyPEG2
to parse lilypond input (a limited set of it), so that I could convert
between scores and button names (or reverse), but I'm still having
problems with certain aspects, so the code is not functional yet.

Simon mentioned creating FingeringLineSpanner, but I'm too green to
understand what exactly to do. David was also throwing me some bones
to help me with function to enter the button numbers more
consistently. It's just that this doesn't help me yet.

I don't mind if I get slightly ugly output at the moment that could be
corrected later by adding appropriate functions. But if I enter a
hundred scores now, I would like to be able to use some "magic wand"
to transpose/change/improve all of the scores in a single go a few
years from now. For this reason it is important to me to prepare the
most suitable input now.

Thank you,
    Mojca


On 19 July 2016 at 11:17, Mojca Miklavec wrote:
> On 18 July 2016 at 14:55, David Kastrup wrote:
>> Mojca Miklavec writes:
>>
>>> I also totally agree that the fingerings are *the most sensible* place
>>> where this information should be entered. (Placing the information
>>> inside the lyrics is "kind-of horrible" idea, but I don't know how to
>>> achieve the desired layout if I start from fingerings.)
>>
>> I thought that what made you go to lyrics etc was alignment: having
>> everything appear at one height.
>
> Indeed.
>
>>> I would really like all the buttons / fingers to be aligned
>>> vertically, otherwise it looks horrible (I can post the example
>>> again). But if someone can show me how to tweak the fingerings
>>> properly to satisfy my needs, I'll gladly use those instead.
>>
>> I don't think this will work according to your desires, namely providing
>> a semi-independently readable rendering of the button sequences.
>
>> "\\-" = #(define-event-function (m) (markup?)
>> #{ \tweak text \markup \normal-text #m -1 #})
>>
>> \relative c' { <f\-"2.B4" a\-"3.B5" c\-"4.B6"> <f\-"2.B4" f'\-"5.B7"> }
>
> Thank you very much for the snippet and for teaching me a new
> technique. This is in fact exactly the kind of input I would prefer to
> make (at least until I find a way to translate between buttons and
> pitches automatically).
>
> But from what I understand one would have to extend lilypond's
> functionality to vertically align that text.
>
> Mojca

Attachment: buttons-in-text.ly
Description: Binary data


reply via email to

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