Multiple text elements are added on a chord

• Jul 22, 2019 - 09:57
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.


Comments

Frequency Once Few
Reproducibility Always Once
Severity S3 - Major S5 - Suggestion
Status active closed
Type Functional musescore.org
Reported version 3.2 3.x-dev

Boring

Reproducibility Once Always
Severity S5 - Suggestion S3 - Major
Type musescore.org Functional
Reported version 3.x-dev 3.2

pardon?

Title Multiple dynamics are added on a chord Multiple text elements are added on a chord
Regression Yes No
Priority P2 - Medium

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.

Status active needs info

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.

Status needs info active

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.

Fix version
3.5.0