As we all know, LilyPond is valuable software but it’s not perfect. Some people find text input inconvenient, others would like to have more realistic MIDI playback or advanced contemporary notation enhancements – there’ll always be features to implement and bugs to fix, and that’s normal.
Nevertheless, some things are more important than others – and I suggest to focus on the fundamental ones. After all, LilyPond’s goal is to provide automatic music engraving for everyone, with the highest quality possible, so let’s ensure that the most basic elements, which are common to all scores, are handled perfectly.
What are these? Noteheads, stems, flags, beams and rests – we have them covered. As well as augmentation dots, ledger lines, barlines, clefs, key and time signatures. There is one more element that is necessary for basic notation, something that appears in virtually every score: ties, which connect two notes of the same pitch to indicate that they should be played as one sound. Ties in LilyPond are quite far from being perfect – a couple examples is enough to demonstrate this:
Now, neither of the above two ties is wrong or horribly ugly – but why are they different at all? There is no reason for this inconsistency; both ties connect noteheads that stick out of the staff (i.e. there are no stafflines that could interfere with the ties) and the notes are spaced identically in each case – therefore both ties should look identical or at least very similar.
Here the tie is too flat and it’s ends are too far away from the noteheads. The first thing is bad because there is not enough clearance between the tie’s belly and the staffline, which results in unpleasant, obscure black clump instead of a clearly curved shape. As for the placement of the tips, I personally think that it’s better when they point directly into the noteheads, instead of “embracing” them. If the ends point into the noteheads, it’s harder to mistake a tie for a slur.
Now, you may think that fixing this is just a matter of adjusting some parameters that govern tie formatting, but I’m pretty sure this is not enough. Over the last two years I’ve collected scores of bad tie examples, and seen much more of them in various LilyPond-made scores – some were actually much worse than the above ones. I’ve also had the opportunity to see how LilyPond behaviour changes when some of the parameters are altered (thanks to Karol Majewski) – sometimes the results were better but still unsatisfactory. This evidence makes me sure that a major redesign of tie formatting code is necessary.
Therefore I announce the Tie Crusade (or, less poetically, the Tie Project): let’s improve tie formatting together!
The task is fairly big, so there’s plenty of space for many people to join. We need to look through tracker issues about ties, search for more examples in real-life scores, find patterns and thoroughly discuss what exactly the desired behaviour should be, before finally implementing it. A lot of work has already been done by me, so there is a solid starting point; together with my cousin Franek we recently begun reading through the current code. It would be very helpful to have more people analyse it (it’s written mostly in C++) and think about the task, so that we’ll have a good understanding of the current situation and a solid specification before we start changing things.
There are also purely engraving issues – sometimes I’m not sure what the desired formatting should be, so I welcome all experienced engravers with a keen eye for details to share their opinions with me.
Anyone interested in learning more is invited to contact me (through the contact form or personally) or the LilyPond developers mailing list; I’ll share my research with you so that you can see what problems we’re facing as well as my ideas for solving them. Currently I have all this stuff in a folder on Dropbox – I don’t think it would make sense to create a tracker issue for this, as the materials keep changing; as for now I’ll just share it with people who are interested.
I expect that with the help of several people we can do this in a few weeks and about 2000 lines of code.
Of course, LilyPond users providing examples of badly formatted ties are welcome as well! We don’t want to miss anything here 🙂