lilypond-user
[Top][All Lists]
Advanced

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

Custom Spanner with variable length sections


From: Dimitris Marinakis
Subject: Custom Spanner with variable length sections
Date: Thu, 14 Apr 2022 15:28:29 +0300

I need a custom spanner that has x sections with different symbols. This is going to be tricky so any help is appreciated.

I already have a hacky solution for fixed length spanners but it is pain to maintain it. I'd like a more usable solution that can handle variable lengths.

It would be nice to have control over the percentage that each section takes. e.g. #'(20 30 50)
results: --***#####

I imagine it would need to check the length of the section and divide it by the X-extent of the symbol and then round the number to get the number of symbols that fit inside the section.

The problem is that the code needs to check somehow if the surrounding sections don't fill up or overflow to avoid missing symbols or collisions between sections especially the inner ones. Trills are concatenated symbols so they aren't always 100% of the computed width. 

Maybe it would be useful to also allow separate symbols for each transition between sections. That would help in some cases.

Also line breaks are as always a problem. Not only the line breaks must work but also the pattern needs to apply for the whole spanner and not repeat for each broken part.

reply via email to

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