Multiple text elements are added on a chord
Reported version
3.2
Priority
P2 - Medium
Type
Functional
Frequency
Few
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
Select the entire chord by pressing Shift+Down, and double click on a dynamic on the palettes. Several dynamics are attached (number equals to notes in chord), stacking in the same place.
This doesn't happen with articulations.
Fix version
3.5.0
Comments
Boring
pardon?
In reply to Boring by 19aadams
Don't spam...
And I'm sure it's a regression, this has been fixed before.
Well, 2.3.2 does have that issue too, so only a regression if some 3.x release had it fixed
In reply to Well, 2.3.2 does have that… by Jojo-Schmitz
I remember this was fixed in 3.0 or 3.1. Or wasn't? Because all others, including articulations, were fixed then, and I didn't notice an exception.
Ever since I can remember there have been some cases where we checked for duplicates and other cases where we didn't. I'm not aware of any recent changes involving dynamics here, and can't imagine why the necessary code would have been removed if it had been added at some point, but anyhow, I don't see any release that behaves differently. Probably it was never implemented and needs to be. Same for staff text, rehearsal marks, etc.
I'm not aware of any text except dynamics that can be added to a selected chord. Everything else either does nothing or displays an error.
Adding staff text and rehearsal marks by double-clicking the appropriate palette item "works" exactly the same as dynamics - you get multiple elements. Except it's more obvious that this happened, because autoplace separates them.
In reply to Adding staff text and… by Marc Sabatella
From what I've seen, autoplace doesn't separate them most of the time, they just stack together. They separate only if, (I don't know how to say it accurately) the place of attachment is... extremely weird?
Text other than dynamics are always separated. Dynamics aren't probably because of the code to automatically align them.
It seems to me, things like dynamics (but also Text and Tempo) are not related to the notes but to the moment in time, isn't it?
If is seen as time related instead of assigned to notes, the solution is pretty simple en even handles situations where a selection (whether a list or a range) contains multiple voices.
The dynamics are implemented as being attached to a note. This allow the user to have a dynamic for the 1st instrument on a staff as well as a different (or even same) dynamic on the second instrument written on the same staff. Though this is a good feature, adding 3 mf's to a chord of 3 notes is not. Users expect only one dynamic to be automatically added to a chord. Compare this to tempos, which are implemented as a point in time. If you add a tempo to the same point in time as an existing tempo, the original one is replaced.
I would like to clarify something:
Internally, dynamics are attached to the segment, not the note. In this respect they are just like tempo, also staff text and chord symbols. Tempo and staff text, BTW, have the same issue - and adding a tempo subsequently is not immune either, it does not replace the existing one. By contrast, fingerings really are literally attached to notes; lyrics and articulations are attached to chords.
Right now all of these fall through to the same catch-all in applyPaletteElement that notes of the chord and calls applyDrop() for each. What we should probably do is only do it for one not (the upNote(), say), for element types we decided shouldn't be added to each note. Probably that means, anything that qualifies as isTextBase(), except fingering.
Mike, Marc, thanks for your remarks, it was very helpful. Now it takes sense why my changes didn't completely worked as expected.
I'm now checking my updated patch, including its behavior with imploding en exploding staffs.
See https://github.com/musescore/MuseScore/pull/5437 (done by @njvdberg).
Reported again in #298955: Duplicate elements applied for each note in chord with range selection.
And another option to fix the issue: https://github.com/musescore/MuseScore/pull/5560.
See also #70371: Double-click Dynamics and Chord duplication and https://musescore.org/en/node/307229
https://github.com/musescore/MuseScore/pull/5560 has been merged, is the issue fixed then?
Or are we still needed https://github.com/musescore/MuseScore/pull/5437 to get merged too?
Seems fixed.
Automatically closed -- issue fixed for 2 weeks with no activity.