|
From: | Lukas-Fabian Moser |
Subject: | Re: Combine Text/Lyrics with bass figures |
Date: | Fri, 26 Jun 2020 13:14:52 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
Hi Urs,
thanks for the improvements to my code! (I tend to stop thinking
about it as soon as it works for my case, which always leaves lots
of room for improvement.)
This exceeds my current understanding of LilyPond coding, I'm afraid.The only remedy I can see right now would be to deal with this in an after-line-breaking stencil. From there we could iterate over the whole system and check the maximum number of actually used layers. The result should be cached so this process is done only once per system. However, this won't always work because the context may not have been pushed sufficiently far down in situations like the attached example.
Yes, thank you - I only wanted to "quickly re-use the existing code" without bothering about possible shortcuts.I've made a number of improvements to your code: 1) reverseFigures creates a new music _expression_, from which you later retrieve the 'elements, which is unnecessary. (I renamed it to parse- signature
2) The figures do have their durations included, so we can retrieve them *here* and reuse that information later when generating the BassFigureEvent for the bass step markup.
Yes, that occurred to me later. However, I think there is still a problem (I was working on a similar problem when your code arrived):
2a) Instead of \none I rewrote \scaledeg to accept either a figure signature or a duration. This gives a nice interface where you can just specify a duration for an empty figure.
<<
\new Staff { \clef bass c2 d4 e4~ e f2 g4 }
\figures {
\scaledeg 1 <5 3>2
\scaledeg 2 <6>4
\scaledeg 3 2
\scaledeg 4 <6 5> % Here the user would expect to get a
duration of 2, but gets 4
\scaledeg 4 <6 5>4
}
>>
The parser does not seem to take notice of durations when they are used as function parameters. I do not know how to handle this - it comes down to the question: How to read/write the "current assumed duration" from the parser?
As for lobbying with the music theory folks:
Best
Lukas
[Prev in Thread] | Current Thread | [Next in Thread] |