Indefinite pile-up of (tempo) text elements (with patch)

• Apr 28, 2018 - 16:20

Hi,
I noticed this unneeded & overly ugly pile-up of tempo texts when importing MIDI files with quite a number of tempo variations (see Screenshot...27.png below), and I thought this deserved a quick attempt/try for a fix -- indeed, I tracked down the issue into the very placement logic within Element::autoplaceSegmentElement(). AFAIU, starts from the minVerticalDistance() among the to-be-placed shape and the shape enclosing all that has been placed so far (in the measure I guess), which results in the unfortunate outcome you can see in the picture.
I patched the code by first checking whether the default "baseline" placement (close to the score) has any conflict with what placed so far, using the baseline placement if there's no conflict, whilst applying the aforementioned piling-up placement logic, in case of conflict only.
This results in the (better) placement that can be seen in the Screenshot...01.png.
This patch is included in my PianoTutor branch
https://github.com/tomcucinotta/MuseScore/commit/77eb72333dc3fb032ddf7c…
however, I can rebase on master if there's interest.


Comments

Is there any reason to keep all tempotext blocks visible? I would suggest users to make tempotext invisible in such cases because it doesn't affect engraving, but only the playback. Should you need to edit them, make them visible again. Does it make sense for your scenario?

In reply to by Anatoly-os

I agree there is no good reason for having all those tempo texts visible. I also agree it would be nice to improve the algorithm to handle this particular - artificial as it may be - in a more pleasing way. But I would still resign myself to the fact that there will likely be other cases that really just cannot be handled in this type of way, and just accept that sometimes human intervention will be necessary to find "creative" ways of resolving conflicts as opposed to "algorithmic" ones.

Do you still have an unanswered question? Please log in first to post your question.