The Official Layout Improvements Feature Request Thread

• May 22, 2015 - 04:23

A couple of months ago, I posted a topic called "Smart" positioning , essentially asking for MuseScore to intelligently layout element to avoid collisions. I learned that this would be an incredibly complex task, but Marc Sabatella told me "I suspect we'll probably start small, looking for specific collisions that are considered especially likely or especially problematic, and then work out way from there to covering more cases over time."

Marc Sabatella, of course, has famously done some brilliant work improving MuseScore's layout algorithms: Improved Note / Accidental Layout In MuseScore 2.0 (and it turns out that in comments there that I had not previously read basically the same idea was brought up).

But, any task can be accomplished if you break it into small enough pieces. So, here's my idea: to have a series of very small, very specific requests to improve the layout of specific things. All added to this thread, hopefully discussed a little bit, and then filed in the Issue tracker . When one is taken care of, we move on to another.

So, I'll kick us off with one I mentioned once before.

Put a few Bs on a treble staff (the middle line). Tie a couple of them together, and then put an accent (a regular sforzato) on the note that starts that tie. The result does not look good at all:

AccentTie1.png

In sheet music I've seen, in this situation the accent is bumped up a space, actually to above the staff, so it looks like this:

AccentTie2.png

It should be noted that it's only the note on the middle line of a five-line staff that has the issue, but I hope it's fairly easy to teach MuseScore the solution.

I'd like to get some opinions before I file the request in the tracker. Any thoughts?


Comments

I like the idea of tackling some specific problems that can be solved without a complete overhaul of the layout system as some improvements might require.

The one you describe above is actually the sort of the thing that already is implemented to some extent - except not this particular case. Replace the accent mark with a staccato dot, and the tie with a slur, and you'll see we already do some special casing. The trick would be to add more without making making the code unsupportably fragile / hard to support. A complication is that the results differ according to note spacing - with looser spacing, the accent doesn't actually touch the tie and doesn't *need* adjsutment. Also, try adding another note to that chord - while still forcing the stem down - and you'll see the tie is repositioned and no longer presents a problem. So it's really a special case on top of a special case: only middle staff line, only when a single note, and not necessarily needed if the spacing is sufficiently loose; It's dealing with all those sorts of variables that starts moving this in the direction of things that really need a more general solution based on overlapping bboxes (see, there is a reason you needed to learn about them :-)

In reply to by Marc Sabatella

Matters could be simplified significantly if we didn't try to account for different spacing. For example, I don't think it's a problem at all to have
AccentTie4.png
instead of trying to maintain
AccentTie3.png
in cases of looser spacing. This is, in fact, exactly the way Sibelius does it; it's just hard-coded that, if there's an accent and a tie, and the note is on the middle line of the staff, things will always be placed this way, regardless of spacing.

By the way, I'd like to extend the request to slurs as well as ties.

Add extra vertical spacing when needed to avoid collisions between the markup of note on the upper staff and the notes on the lower staff. Example:

bug-vertical-spacing.png

To render this example properly I have to add vertical spacing, which is annoying because the spacing must be added each time this pattern appears.

In reply to by GEB

What about the notes themselves? If that low note were a bit lower, it also would overlap.

Right now we allow extra space for lyrics only. We don't track the space needed by notes/chords or elements attached to them. This also includes chord symbols and other text. I don't think I'd want space added always the way it is for lyrics - only if necessary. Make sense?

In reply to by GEB

FWIW, this type of enhancement is being looked at (by Werner). Right now spacing decisions are based on assuming elements attached to notes/chords have to lay out left to right. There there is no allowance for allowing them to overlap if they clear each other vertically. In theory, this is doable with only moderate effort.

Add rounded corners to ledger lines (like LilyPond does). In my opinion, ledger lines look better with rounded corners than with straight corners. In addition, rounded corners would be consistent with the rounded corners of the note stems.

Examples:

LilyPond

Musescore:

Well, clearly my idea wasn't very well developed, because we're getting one idea after another without discussing any of them in depth or filing feature requests before suggesting a new one, and the only person weighing in is Marc. So, do you think we should officially cancel the Official Layout Improvements Feature Request Thread?

I'll file feature requests for each of the things that have been brought up above. Thanks to all who brought their ideas.

In reply to by Isaac Weiss

I think continuing to list ideas here is good. Some don't really need much discussion, they just need to be done. One nice thing about having this thread rather than a bunch of separate feature requests is that once there are a bunch of suggestions, we can start talking about group related ones, prioritizing, etc.

I'll post this here but then add it to the tracker promptly.

Rehearsal mark at beginning of system should stay within margins

MuseScore positions certain things relative to the beginnings of measures, which makes sense. But with rehearsal marks, the specific way that MuseScore relates them to barlines leads to the following result if the rehearsal mark is at the beginning of a line:
a.png
The volta included in the picture is correctly positioned by default, and could be a model for the positioning of the rehearsal mark.

Here is a manually created example of correct positioning for the rehearsal mark in this circumstance (though the number of staff spaces of horizontal offset depends on the key signature):
b.png

Issue created at #63856: Rehearsal mark at beginning of system should stay within margins.

In reply to by Isaac Weiss

"Correct" is subjective. I much prefer the current layout to your proposed example.

Also, unlike the case with voltas, which are always positioned automatically with no user control over the defaults (except vertically), rehearsal mark normally respond to text style settings. And the default text style for rehearsal marks is centered. I'm not really comfortable with the idea of MuseScore deliberately ignoring the text style. We do it to override lyric alignment because there are pretty universal rules for when to center versus when to right align.

That said, a style option to control whether rehearsal marks align to the barline or some other point in a measure could make sense.

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