Hi, this question is related to my last merge request https://gitlab.com/lilypond/lilypond/-/merge_requests/1611. To my surprise, there seem to be strong objections against it, despite being an improvement in all tests. I wanted to know more about penalties in slur-configuration.cc in general. The idea for tweaking the penalty in the case of the presence of dots is not mine at all. In the function score_edges, amongst others, we find that the penalty (named "demerit" here) for a specific case involving stems is tweaked so (line 464 of current master):
Real demerit = factor * dy; if (state.extremes_[d].stem_ && state.extremes_[d].stem_dir_ == state.dir_ // TODO - Stem::get_beaming() should be precomputed. && !Stem::get_beaming (state.extremes_[d].stem_, -d)) * demerit /= 5;* To me this signals that the programmer is aware that there isn't a magical formula to imitate hand engraving and particular cases will need a different penalty. Is there something I'm missing? Is the penalty reduced here in this particular case to fulfill a higher purpose or is that a case of "last resort fix"? This kind of "tweaking" is all over the code, so it's difficult not to interpret that as something that is a natural part of the way penalties are handled. For any information in this regard that helps me understand the code better I'm thankful. Regards, Martín. -- www.martinrinconbotero.com