Weird bug when setting style for pedal brackets

• Jun 20, 2021 - 18:33

When I hit that little "S" on the inspector to set the style for the pedal brackets, it oddly sets the "minimum distance" to -999.00. Even more odd, it sets the "minimum distance" when I hit the "S" for the "offset" style, not the "minimum distance" style. It only happens if I select all the brackets in the piece, not just one. Oddly, though, if I select one bracket and hit the "S" on the offset, it sets the minimum distance to a random number.
Rather than create another forum comment, let me mention another odd behavior that may or may not be a bug. When I adjust the offset, it overrides (doesn't pay attention to) the minimum distance setting. Then when I set the offset back to where it was, the pedal brackets do not go back to where they were.
Example:
I set the minimum distance to .80. I lower the Y offset from 2.5 to 2.0. Then when I raise the Y offset BACK to 2.5, the brackets do not return to where they were. I have to adjust the minimum distance setting to bring them back to where they were. Not a huge problem, but frustrating inconsistent behavior.
I think I am using the latest version: MuseScore version (64-bit): 3.6.2.548021803.
pedal style set.png


Comments

This would happen if you have dragged a pedal marking directly onto the staff, which does indeed set minimum distance that way. Is that what happened? If so, it;s normal/correct, and you should then set that as style also. Other values of minimum distance are used to allow collisions with other symbols but not actually place it on the staff. So if you're doing something highly unusual with your pedal markings, this would all be the normal result of those unusual things. But if none of that seems like it applies to what you are doing, best to attach your score so we can understand and assist better.

In reply to by Marc Sabatella

Yes, I can confirm that for dragged pedal markings, that is when the bug happens, not with double -clicked pedal markings. My score has both dragged and double-clicked pedal markings.
Let me make sure I understand you. You are saying if I dragged pedal markings onto the staff (which you say is a "highly unusual thing") then that is the way the minimum distance supposed to work. It supposed to change to -999.00 when you hit the style button - not the minimum distance style button - the offset style button.
Please explain WHY Musescore was programmed for the minimum distance to change to -999.00 when you hit the offset style button on pedal marking that were dragged onto the staff? Why would this be normal programming?

In reply to by odelphi231

Putting a pedal marking on the staff is highly unusual in published music, yes. The minimum distance is what controls how much distance autoplace will try to place between the marking and other markings - the collision avoidance that allows for professional results with little effort. If you want collisions - whether with the staff itself or with a dynamic marking or other symbol - then you need to have that minimum distance set to a negative value. This happens automatically when adjusting a symbol to create a collision. When creating collision with notes or other markings like dynamics, the minimum distance is set to just enough to allow the collision. This allows the markings to still "float" together if you then transpose the note etc - the pedal line you allowed to overlap it will move with the note and remain overlapping it by that same amount. But if you move a marking onto the staff, the minimum distance is set to -999. That way nothing else you do will cause the pedal marking to "float" away. It's an elegant solution to a complex problem.

So, as far as I can tell, that much is working as designed and how it needs to work in order to produce correct results. Which is to say, that much isn't a bug. if you believe some other apsect of this isn't working correctly, then, please attach your score and precise steps to reproduce the problem so we can understand and assist better.

In particular, hitting a set as style button won't suddenly change the minimum distance. But, it might "wake up" the Inspector, which might not have immediately updated to show the -999 after the drag. In other words, the drag is what set it to -999, but the Inspector won't necessarily show you that until you do something else - anything, really. You;d see the same if you clicked an empty area then reselected the marking.

In reply to by Marc Sabatella

I was able to reproduce the OP's problem. If I add a pedal marking (by any means), then change the value in the Y offset, and click set as style, the minimum distance updates to -999 as described. Doesn't seem to be right. Even if I update the default offsets by a tiny amount, it means the pedal marking ends up being drawn over the staff, which is unlikely to be what's wanted.

In reply to by Dylan Nicholson1

Playing around a bit more there's definitely some weird stuff going on with minimum distance, it often doesn't get updated immediately. Strangely if I make the y offset 1.26sp - you don't see the minimum offset change immediately but if you click away then back again it changes to -0.05, then if you make it 1.25sp, again, doesn't change immediately but if you click away then back it changes to -999.
But clicking "set as style" causes it to change to -999 even at any value under 2.00sp.

In reply to by Dylan Nicholson1

As I explained, the change to -999 is correct. The only bug is that the Inspector doesn't change to show the -999 immediately upon dragging even though it really does change to -999 immediately. That's only because there is code in the Inspector to prevent the controls in one part of the Inspector from updating other parts, and I have no idea why that code is there. Probably it's not relevant any more in the current master, since the Inspector is completely redesigned and reimplemented.

But again, it has nothing to do with set as style. After moving the line onto the staff, try simply deselecting the line and then reselecting it,. The minimum distance fields updates then as expected. Again, -999 is the correct value, and it is set immediately upon forcing the collision with the staff. it's just that the Inspector doesn't update itself immediately in all cases due to that specific limitation in how the current Inspector is designed.

EDIT: OK, I take part of that back, there is a strange occurrence if you don't actually drag the line onto the staff as I originally was describing, but instead just move it close enough that the minimum distance needs to be reduced to allow it, then set as style. There's probably a reason why we felt it useful to also set the minimum distance to -999 in that case as well, maybe something to do with making sure the alignment worked. To be honest I don't recall.

In reply to by Marc Sabatella

AH! You seem to get it now with your EDIT. It sets it to -999 even when the pedal marking is not on the staff or touching any notes. When I set the minimum distance to .8 distance away from the staff, then hit the style button, it changes it to -999. Also remember, the Y offset is LARGER than the minimum distance (2.50) when I do this. It has nothing to do with overlapping the staff or dragging it ONTO the staff. It can be UNDER the staff and it still sets it to -999. IMO, it is still a bug or at the very least a weird, clunky programming "workaround".
Also, you haven't addressed the issue where the minimum distance setting doesn't change until you hit the OFFSET style button, not the minimum distance style button. Seems the style buttons are cross programmed or something.

In reply to by odelphi231

-999 for the case when an element is dragged directly onto the staff was chosen for convenience to make sure there is no chance of further automatic displacement to make it visually obvious that this was happening. Using a "magic" value like this is a pretty standard way of doing such things both within MuseScore and elsewhere, but indeed, other ways could have been chosen as well. This feature was only added after the initial release of 3.0, however, and we needed to use a method that preserved compatibility with existing scores.

And yes, I did acknowledge that setting the style on the offset affects the minimum distance in this one special case you're describing. I cannot remember what the reason is for that particular behavior, but as I mentioned, it may somehow relate to the automatic aligning algorithm.

In reply to by Marc Sabatella

Except "set as style" is the only easy to get -999 in the minimum distance field for certain y offset values. At any rate it's likely it's all very different in MU4 as the inspector has been completely rewritten.
But FWIW I disagree that changing minimum distance to -999 is "elegant" or even necessary. At most it might need to be -5 for some y offsets.

In reply to by Dylan Nicholson1

Dylan, I agree with -999 not really being elegant. IMO, what the programming should have been is the Y Offset cannot be set below the minimum distance setting so it doesn't overlap the score. The button simply stops working if you try to set the Y offset to where it overlaps the score. Give me an example from a published score where you want the pedal markings to clash/overlap with the notes/ledger lines.

In reply to by odelphi231

No, that's exactly what we were fixing - the original 3.0 was inflexible and simply didn't allow items to be moved onto the staff or otherwise into a state of collision. There were constant and very strong complaints about this, so the individual "minimum distance" settings and the automatic management of them - including setting to -999 upon movement onto the staff - was devised to solve this problem,. Instantly the complaints disappeared and most people have been happy with automatic placement ever since, almost never needing to disable it any more.

In reply to by Marc Sabatella

OK, I understand now the difficult decision that was made to "split the baby" to correct a complaint. I still don't know why someone wants to put the pedal element on the staff. Why would someone complain about that? I have never seen music like that. I have seen the pedal put in the middle of a grand staff (I do it sometimes) but I don't consider that a "collision". However, as I stated before, the minimum distance is setting to -999 even when I am NOT putting the element on the staff. It is below the staff. Admittedly, maybe while adjusting it, it may have touched the staff but then I adjust it so that it is not touching BEFORE I hit the Style button.
Here is my theory about the complaints, though. People don't want the pedal element to collide with anything. What I think happened is the "anti-collision" method (if I may call it that) was TOOOO inflexible so that it didn't allow composers to place the pedal a user-defined distance from the staff that may have been less than the tool allowed. That would be frustrating. It should allow you to put it as close as you want (I like my pedal symbol to be very close but not touch) but "smart" enough to know if it is colliding with anything. I guess it wasn't robust enough.

In reply to by odelphi231

The improvements I am talking about are not just for pedal - in the original 3.0 it was impossible to place any element onto the staff if it was not explicitly designed for that. Also impossible to take an element that by default was placed further from the staff than another, and instead move it closer. No idea what "baby" you mean here, but adding this flexibilty was an important feature to add for a wide variety of purposes, not some corner case complain from one or two users.

But yes, as I have acknowledged several times, it does appear something odd is happening with pedal lines specifically where the -999 happens even when it shouldn't seem necessary. And I have also guessed several times this might somehow relate to the automatic alignment of pedal lines. I honestly don't recall, it's been years since this was all implemented.

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