Copy bar with dynamic double up the dynamic.

• Mar 30, 2017 - 14:55
Reported version
2.1
Type
Functional
Severity
3
Status
active
Project

When you copy a bar that has a dynamic into a bar that already has a dynamic, the dynamic is doubled. If for example I am copying a few bars with lyrics into the identical score without lyrics, at the identical measure (when I am creating for example a version with dynamics disabled i.i. all set to 90) the dynamic from the source is copied into the target but does not remove the target, in other words the measure is not 'cleaned' before the copy is dumped.

GIT commit: 3c7a69d


Comments

That could only be considered a work around. If you copy and paste it is expected (normally) that the action will fully overwrite the target. And where exactly is this selection filter? If I select a bar by clicking it I see no filter. Crtl+C copies the bar and should replace everything in the target bar in my opinion.

Not sure about slurs, but for dynamics certainly is not a bug, if you copy a section including them and paste somewhere else, they are pasted. Either disable them in selection filter before copy or clean the target measure before paste.

Looks as if you have not understood the problem. Of course they are pasted - that is the expected action, but any EXISTING dynamics are not removed, i.e. the target measure is not cleaned which would be the expected action otherwise, if this paste was a merge, any existing notes would be retained, which they are not. Likewise any lyrics would also be merged, and are not. (And of course this is correct). That fact that the dynamics ARE merged and not replaced IS a bug.

Edit to add:
I hope this illustrates the problem. This is a couple of bars, each with dynamics.
before-paste.png

Now I click in measure 4 do Ctrl+C and paste into measure 1
after-paste.png

BOTH dynamics are now present but the notes have been correctly pasted overwriting the originals.

Attachment Size
after-paste.png 9.58 KB

Some elements, like notes and rests, get overwritten by a paste, some others, like dynamics, don't. Lyrics are attached to notes, so the get overwritten. The target measures is not cleared, and that indeed is by design. Clean the target measure before the paste, if that's what you want.

Severity
Status (old) by design active

I think there is more to this.

First, this *is* by design, but no, the design is not daft. Because while clearing out the existing dynamics might be what you would want in some cases, it is *not* what you'd want in other cases. Consider, what if the phrase you are copying does *not* contain dynamics, but the phrase you are replacing *does*. Chances are you'd want to *keep* those existing dynamics in that case - you'd be losing your only copy of the dynamics information.

Really, what makes the most sense in general to is replace dynamics on the *same* beat. So if there is a dynamic one beat one in both the source and destination, the one in the destination gets cleared to make room for the one in the source. But if there is only one in the destination, it stays right where it is. And if there is only one in the source, it gets copied.

This is exactly what we do for chord symbols. I think it would be good to do it for dynamics too. Slurs as well - see #45361: copy/paste and "R" do not delete slurs or lines in target measures. But this is trickier, because slurs have both start and end points and thus there are more cases to consider.

>>Really, what makes the most sense in general to is replace dynamics on the *same* beat.<<

Yes that would be acceptable and makes sense. Since the scenario you outline is not one I would use probably then this solution makes sense. What did NOT make sense was the situation where a dynamic on a beat could actually become two different dynamics if for example the beat had an ff and the one being copied in had a sfz. Both currently would be displayed on top of each other.

It's more clear for dynamics that you probably don't want two on the same beat. It's less clear for staff text - it's entirely possible you *would* want both staff texts, because they might be saying two entirely different things that are both relevant. So it isn't real;ly that black and white, which is why currently we don't try guessing but instead rely on the user to say via the Selection FIlter (see View menu) whether he wants the new dynamcis to be copied or not, or to delete the original contents first. Still, I would agree most of the time that for dynamics it does make sense for them to replace each other.

This is a poorly designed function. When you paste one fo two things happens, the paste is inserted (not applicable to MuseScore) or the destination replaced. That's how it is in EVERY other program but this one. If this is by design then someone else needs to design it.

See my comments above, though. Clearly, keeping the existing dynamics is desirable in the case where the passage being pasted doesn't already contain dynamics - otherwise, you'd need to re-enter the dynamics. That wouldn't benefit anyone. Similarly, what if the destination already has, say, a volta line, but the source does not - would you want the volta removed? Same with chord symbols, and in fact pretty much every *except* the notes and rests themselves. "EVERY other program" doesn't have all the special requirements of music notation to contend with, so they can more afford to be "all or nothing" with respect to the copy, but musicians will expect things to work more "intelligently". And keeping existing dynamics - as well as volta lines, chord symbols, and most other types of elements - is definitely what a musician would expect. So it is what we do.

But as mentioned, there is the special case where the source *does* have a dynamic of the same type at the same spot, and since the conventions of music normally call for only a single dynamic at a time, I agree it does make sense for the existing to be removed in this case and this case only.

BTW if a (de)crescendo is at the end of the measure you have to select it individually to delete it. It will copy with the entire measure but will not cut or delete unless specifically selected by itself. IT IS IMPOSSIBLE TO SIMPLY CLEAR THE MEASURE. This is still bad design I don't care whose idea it was.

Not sure what you are talking about here - dynamics or hairpins? These are totally different things. Hairpins don't go away when deleting the contents of a range. Perhaps they should indeed, that's worth discussing in the forum, but doesn't seem relevant to this issue.

I still maintain that often you don't *want* dynamics or hairpins cleared upon paste. Often you are pasting notes and want to keep the existing dynamics and hairpins. Having to reenter them would be bad design. As already acknowledged, ideally we'd notice when the source has dynamics or hairpins in the same location and in that case and that case only, delete the originals. It's a valid enhancement request.

I don't understand how personal attacks further the conversation, true. If you feel like providing more information, feel free, if not not, that's fine too.

Hi Marc. On reflection I actually cannot imagine a situation where you would wish to keep dynamics and other marks/text when you are copying and pasting. I have never had occasion yet to need this but perhaps I am too inexperienced a musician to have come across situations where you might need this. In 35 years as a programmer however I have never come across a situation where pasting - as opposed to merging - would retain any of the target contents. Perhaps Ctrl+C should do what most people would expect it to do which is to completely clear the target before pasting and some other combination such as Ctrl+Shift+C would merge the contents leaving dynamics and other marks or text in place as happens now (with the proviso that two dynamics cannot exist in one note position).

This kind of solution should keep everyone happy perhaps?

pasting also does not overwrite all voices (used in source, empty in target), and that much is indeed the desired behavoir. I'm using this a lot and would really hate to change the shortcut for this.
If I want to replace something, I empty the target first, then paste.

Maybe it could be something as simple as a setting then.

"Paste empties the target cell" Yes / No checkbox where Yes means it clears out everything and No means it behaves as now (with the changes that are needed we have discussed)

That should mean all camps are happy and the Ctrl+C does not change for you.

I come across this all the time. I have a passage that has dynamics and other markings already, I have another passage where I have entered notes only, and I want to copy theatter to the former. Happens often when working out ideas in a "scratch pad" - a separate score, a separate area of the original score, etc.

I would claim there are some notations you would almost never want cleared on paste. Voltas, for example. Key or time signature changes are another. Barline properties, line breaks, spacers, etc. Chord symbols are another, *unless* the source also contains them. It's true that most other types of programs don't make these kind of distinctions, because there is usually no *need* to. Music isn't text, and it isn't numbers, so analogies to word processors or spreadsheets are not always appropriate. We need to actually consider the special requirements of music and do what makes sense for the specific context. Bjt as these examples.show, it is a complex topic, not the simplistic "paste just clear everything like it does in a spreadsheet" you might at first think. Following that approach literally would do the wrong thing in many cases.

So again, I think the best thing is to keep existing dynamics *unless* the source being pasted contains it's own dynamics in the same exact locations. This will result in the least amount of surprise and lost work in the most cases.

So basically what you are saying Marc is that your will is to be imposed despite the fact that the behaviour of cut and paste is not agreeable to some?

Put in a setting that allows copy/Cut and Paste to clear the target completely, a setting that is off by default, and that keeps everyone happy. Is that being unreasonable? I would set it to ON for one as I never need the retain anything if I an pasting.

I have always wondered why "paste" does not remove all contents. The worst for me is the duplication of symbols (dynamics and slurs) upon pasting: A dynamic marking that is already there and is also in the pasted section will be superimposed on itself. The result is that it appears impossible to select. It won't turn blue when you try to select it. If you then press control X the symbol will remain but now it will turn blue when you select it because you removed the duplication.

Same for slurs as Mike 320 has pointed out.

Ideally I would wish for a behavior that selects only the elements that are present in the copied section and therefor leave the elements alone that happen to be present in the target measure(s) but not in the measures being pasted. I.e. if your scratch pad contains no dynamics the ones that are already in the "fair copy" will stay, otherwise they get removed. I think the idea to do it only if attached to the same note is too clever by more than half (see example in post #6). If you combine two sets of markings just because they happen to be on different notes you change the dynamic pattern. Changing a dynamic pattern is a separate mental operation and ought to be a separate operation in Musescore.

If you create a new dynamic on your scratch pad you will want that to be in the result, not some combination of that with what was there before.

such a setting might be an option, we know however that lasconic isn't a fan of additional options.

Superimposing one dynamic on top of another indeed is a bug, it should get overwritten rather than added on top. Not deleting dynamics in the target at places where the source had none is not a bug.

???? Not sure how you're getting that from what I am saying. i am explicitly acknowledging that what is being requested - dynamics in pasted regions replacing those in the destination - *does* make sense, and proposing a specific solution to incorporate that without breaking what is good good about the current system. Win/win. How can this be construed as a bad thing?

But in any case, I am not "imposing my will" - I am expressing an opinion. In doing so, I try to stick to facts and logic, not personal attacks. I am trying to arrive at a consensus, and then hopefully we can begin to implement it.

I was not attacking you. I was merely pointing out that you consider that retaining the current method, with the addition of removing duplications on the same note that we have agreed, should be what happens.

Perhaps 'imposing your will' was a little strong but the point is that you seem to be ignoring a body of opinion that agrees that full clearance of the target is what they expect.

In my opinion the current suggested solution is not win/win as you put it but a compromise. By having an option to clear the target it becomes win/win as all parties have what they need.

I don't know who 'lasconic' is but options are the lifeblood of software where systems need to be tweaked to suit different users requirements. There are already a huge number of options on the copy side - i.e. the selections, why not just one on the paste side as well? In fact in the selections might be the ideal place to set it if these are permanent until changed.

Well for me that settles it. Remove the bug and allow an option to clear all and the job is done. End Of..... Just hope the powers that be agree to such an option!

My two cents:

Insert in mike320 example in measure 1 an 8va line, in measure 2 an 8vb line, copy measure 1 into measure 2...

(the same as mentioned for system text or staff text, but also for crescendo lines or diminuendo lines and maybe other elements too).

I see three scenarios:

1. You've elements like notes, chord symbols...they will overwritten via copy and paste
2. You've elements like tempo text, rehearsal marks, Voltas they won't not be selected for copy and paste
3. You've elements like dynamics, hairpins, 8va line...they will double up via copy and paste

For me in scenario 1 and 2 I get a clear result. In the third case (for me and at time) it could be the best way that elements like that won’t be selected, copied and pasted and you've to add such elements manually.

<< it is a complex topic >>
Correct.
<< not the simplistic "paste just clear everything like it does in a spreadsheet" >>
Not correct.
Pasting in spreadsheet IS complex: Do you want to paste everything? Keep the formulas? Numbers only? Keep formatting? Formatting only?
Therefore, to support that, opening the paste menu in a spreadsheet shows several lines of options.
So could do the paste menu in MuseScore.

Everything that exists at a certain position in source should replace everything at the same position in target. That slur is a.good example of what should not get replaced even if in this particular case it might make sense to do so, but this would not be a replace of things at equal positions. The dynamic and the hairpin should indeed better get replaced rather than superimpose.

So this needs an improvement of the selection filter?

Using the example of the dynamics a better behavior should be:

With selecting dynamics in the selection filter the dynamics in the target will be replaced and with deselecting dynamics in the selection filter a maybe existing dynamic in the target will remain?

(But this should affect other elements as described too)

The selection filter coma on top and determines what gets copied. Still only existing elements on the same position should get overwritten, the others added.

You're right (my fallacy) elements should be replaced/overwritten or added unless they are deselected in the selection filter.

Some programs offer a "Paste Special..." command that opens a dialog to choose things like this. MuseScore kind of covers this from the other end with the Selection Filter, though.

As I have said multiple time, what is shown in comment #28 should be improved. We are all in 100% agreement on this. That is why I don't understand all the animosity here. I am agreeing this is not good. There is no one on this thread who has disagreed with that at any time.

As for the comment in #31, *that* is what I disagree with, and I think you will find the vast majority of users would feel the same way. Do you really want to see voltas removed if you paste a passage under them? You want to see time signature changes removes? Spacers? Double bars? Literally everything? I very much doubt that is what people want.

But feel free to start a discussion of that topic on the forum if you really are opposed to preserving any vestige whatsoever of the original contents of the destination.

So why Marc is it so difficult for you to agree to a simple option in settings that would allow this to work either way. You seem not to have any notion that others may want to clear the measure completely when pasting but it is fairly obvious that some, myself included, do.

The option satisfies all users.

I have no opinion on the question of adding an additional command or option to clear contents before pasting. Feel free to submit a feature request for it. I am simply responding to the bug report being discussed here, which has to do with doubling up of dynamics when they overlap.

In response to #33:

I disagree that there needs to be action only in case of direct overlap. I believe ideally dynamics--all of it--should be removed if the to be pasted material contains dynamics. Otherwise we get a mixed dynamic from two sources which I believe will rarely be what the user intended.

In the opposite case dynamics should stay. Staff text could be treated the same way.

Slurs are a little different. They are anchored to notes, belong to notes and follow them around in two dimensions. I don't see how they should stay under any conditions. I have had "orphan" slurs (unanchored) which stay in place while any formatting is going on and need to be deleted.

Finally one should keep in mind that whatever is finally decided the system will do the desired thing for some users but not for all of them. All one can aspire to is to make the happy users as large a majority as feasible. Under these conditions I share lasconic's aversion to too many options.

I don't know, I'd hate to lose 100 bars worth of dynamics on a paste because there was one dynamic hiding somewhere in bar 73 of the source region. But I agree there is to more to this than meets the eye. Which is why I encourage continued discussion of the topic.

For slurs, consider if you have a slur encompassing four measures, then you replace just the second measure with that region. Should that remove the entire slur? Or just if the pasted region contains the endpoints? What if it contains one endpoint but not the other? What if the pasted region is literally just the last note of the slur?

I encourage people to really think through these issues. If it were as straightforward as people are making it sound, it would have been done that way long ago. It's precisely because the topic does come up from time and there are discussions that show multiple aspects of what the desired behavior might be that we have implemented it the way we have, with some things cleared but not other things depending on various specifics, all caccortding to actual users requests over the last several years. I'm not saying it's perfect - this issues illustrates one improvement I think we can all agree on. I'm just saying, please don't just assume because one use case might be satisfied by some particular algorithm, that means this is the correct solution in all cases. It really is complex and there needs to be a lot of special casing to produce the results people actually expect.

I'd hate that too. But you will never know if an user wants to keep the dynamics or substitute the ones from the source region. And this is the reason a perfect solution is likely impossible without creating options (and probably even then there will be people who would like it different...).

I am dreaming of
1. A "normal" paste which may work as it does now or may work rather like the originator of this post wants (or like in version 1?).
2. An "advanced" paste. It would include by default notes, ties and accidentals in voice 1, clefs, time and key signatures. There would be a window with check boxes (probably checked for "include") that allow including or excluding voices 2 - 4, dynamics, slurs (and ties?), staff text, hairpins, ornaments and articulation, lyrics, chord symbols, figured bass and some of the lines (the ones that relate to the staff rather than the system). Elements included would then be overwritten regardless of exact position. Any element excluded would not be removed since it would not need to be overwritten.

Not being a programmer I don't know if this is better done at the "paste" or at the "copy" stage.

Slurs are a specially complicated business: You have a measure with four crotchets and a slur from 1 to 3 and paste the following:
1. 4 crotchets with slur from 2 - 4: Result: Two crossing slurs (likely a bug)
2. 2 minims: Result: Two minims slurred together (nobody knows if this is desired or not)
3. 1 minim and 1 half rest: Result: A minim with a slur connecting to a rest (definitely a bug!).
Seems to me that on balance slurs should be removed unless the rhythm does not change during paste. They certainly should be removed if they end up connecting to a rest.
What is clear to me is that slurs that stretch across the paste region need to stay since they are defined by their anchor points both of which are not affected by the post.

#38:
<< Do you really want to see voltas removed if you paste a passage under them? You want to see time signature changes removes? Spacers? Double bars? Literally everything? >>

You're totally right, and this is exactly why MuseScore needs an advanced paste (as spreadsheet programs do), to let the user decide for each of the possible options.

As far as I am concerned everything related to the system, system text, voltas, repeat signs, rehearsal marks, tempo etc. should not be affected by paste--even "normal" paste.

Re: " you will never know if an user wants to keep the dynamics or substitute the ones from the source region" - well, sure, that's why we have a Selection Filter. Of course, the user is welcome to clear the contents himself as well. And the new command "clear first before copying" could potentially be yet another way to get the job done. That's why the current behavior in this respect really does make the most sense to do by default.

Yes, system elements are good candidates to keep. But the more you actually look at real life examples, the more you see there are lots and lots of cases where one would generally want to keep things (chord symbols, staff text, spacers, etc) that are *not* system elements. It really does need to be thought through case by case, rather than blindly assuming some arbitrary rule derived from how a word processor or spreadsheet works will make sense here as well.

An "advanced paste" command is a possibility, feel free to start a discussion in the Technology Preview forum where others users can see it and contribute ideas as to how it might work.