Copy and paste honoring actual time signatures of selection

• May 2, 2012 - 16:48
Reported version
3.0
Type
Ergonomical (UX)
Frequency
Many
Severity
S5 - Suggestion
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

1. Open Attached score (created in 1.2)
2. Select all staves of bars 3 -4
3. Copy
4. Select bar 6
5. Paste

Expected result: Section pastes overwriting the actual time signatures in the target measures with those in the selection.
Actual result: The actual time signatures present in the target measures are retained resulting in this corruption of the score.
mess

Anyone working in unmeasured music is going to find this a real pain!

Marked as critcal due to the corruption

MuseScore R5592/Windows XP Pro SP3

Attachment Size
Easter6B-Alleluias.mscz 5.39 KB

Comments

On this issue tracker we usually use the word "corruption" to mean that a measure has more or less notes than required by the key signature and the corruption is likely to cause a crash down the road (since MuseScore is not built to handle this).

Could you explain what you meant when you used the word "corruption" in the above bug report? As far as I can tell MuseScore is working correctly. (That isn't to say that support for pasting time signatures would be very useful for certain situations. Of course pasting without time signatures is also very useful.)

To me, this sounds like an enhancement request, albeit a very useful one that I would prioritize highly. And not just for "actual" time signature. Copy and paste doesn't copy the "nominal" time signatures either. Sometimes, I suppose we wouldn't want it to, but often we would. I would put this under the more general category of saying we need more control over exactly what is copied and what is not in any copy / paste operation.

Ah! I thought the paste had corrupted the last bar, but on counting up the quavers, I now see that they are in agreement with the actual time signature.

There is, however, the known issue of the beamed quavers crossing the new line boundary, which I have found in the past corrupts things if not remedied.

I'm perfectly happy for this to be downgraded if you think it necessary.

I also want to echo Marc's request for more control over copy/paste operations.

Finale has a 2 dialogues in which you can tick the elements of the selection that you want copied (and thus pasted)
pic1
pic2

Maybe this would be the way forward in MuseScore??

Status (old) needs info active

Turning this one into a feature request as Marc has recommended.

Also downgraded to normal from critical

And changed to active - if you need more info feel free to change it back, but let me know what it is :)

Please keep in mind, it is always better for software to restrict pasting of certain elements rather than restrict coping of certain elements.

If you paste something and discover that you used the wrong kind of paste, it is nicer to just change the type of paste (1 step) than to change the type of copy, reselect the area to copy, recopy, reselect the area to paste, and finally paste (5 steps).

Despite the ChurchOrganist's wording, Finale's "Filter" applies to pasting only, not copying. Microsoft Word has another variation on this model: it offers multiple types of paste for text (i.e. "source formatting", "match destination formatting", "plain text", etc.) but only one copy.

I'm upping priority to critical, sorry if that's pushy but hey it seems to let me do it!

Time signature information is a critical part of measure information so to lose it in a multi-measure copy-paste is disastrous.

I propose one of the following:
1) Ape Sibelius' "measure-mode" selection, where the selection marquee becomes a double-line and all information is copied.
2) Simply detect that entire measures are selected, and include critical structural measure-related information, namely time signature (including nominal). Barline information is probably applicable as well.

I argue this should not be postponed into a grand new filter pallete but be treated as a high-priority bug to be fixed. Conversely would be happy to look at fixing myself if my proposal (esp. #2) finds agreement.

I do not agree with this. There are times when you might want to copy from one time signature to another. Take the simple example of copying 4/4 to 2/4 or vice versa.

The optional paste solutions are much more appropriate.

Critical is reserved for crashes and corruptions. This is an enhancement request, nothing more. As mentioned, in some cases you explicitly don't *want* the time signatures copies. And in the cases where you do, there is nothing "disastrous" about time signatures not being preserved. You can simply recreate them in the target, before or after the copy. So at worst it's a small amount of lost time when copying mixed-meter passages - a minor inconvenience.

That said, there is work on making selection / copy / paste more flexible in the future, so I wouldn't be surprised to see this some day.

This has hoisted me, too. I simply wanted to copy a section of score and append it to the end of a (in this case, the same) score, and because of rhythm changes, there was no way, other than the highly-error-prone process of preparing each measure with the proper time-signature first.

The "reflow" feature is tremendously useful, and utterly necessary, but let me add my voice to the opinion that a "just copy my stuff, damn it!" feature is no less necessary. All applications that edit documents, be they text, music scores, graphics, ... whatever ... need a way to "just copy my stuff, damn it." Although how useful it is depends upon what kind of music you edit (the chant-based music in the example is a fine one), when you need it, nothing else will really do.

Copying pieces of one score into another is a perfectly fine use. Maybe the current lack of a feature discourages plagiarism :). Feature needed.

>> "just copy my stuff, damn it!"

But copying from different time signatures is not so straight forward when the source & dest measures are different time signatures. And what if source selection has more/less staffs than dest? And what if pasting to somewhere mid-measure?

That being said, I do think there needs to be (and I desperately want) a "copy measures" feature, which may copy every aspect including *time signatures* AND/OR key signatures AND/OR h/v frames AND/OR lines/page/section breaks AND/OR repeats/doublebarlines AND/OR voltas/hairpins AND/OR whatever else is not copied by regular copy/paste. And the more I think about it, I think there wouldn't be an easy way to paste entire measures ontop of pre-existing measures, but instead would only be able to *insert* the measures inbetween measure boundaries. The reason I say that is because of the complexities of dealing with, for instance, time signature changes in mid-measure, or if source has fewer staffs than dest then should the pasted time signature affect the other pre-existing staffs which aren't pasted over?

I like to try implementing such a feature...would probably be selected from Edit menu and have checkboxes for all those different types of elements which can be selectively copy.

Hypothetically could add timesigs and such other mentioned stuff to the selection filter. I'm not opposed to that idea. I want to still emphasize my concern that there will be complexities when dealing with these elements I mentioned, especially when pasting mid-measure.

That's an easy one. In my view, the new command doesn't require measures to be "pre-created" for it. You can't do it for just one part. It creates a new copy of the section of score, at the place you put it, verbatim. That's the whole issue.

I'd like to say that this feature would be very useful. I'm writing a song that has alternating measures of 4/4 and 5/4. Dragging the time signature to each measure is pretty tedious!

I feel you. As I said there will be complexities (as I mentioned in #12) if add timesigs to the selection filter. This is because time sigs will change subsequent measure durations (if different from current time sig (although I guess that could be avoided by protecting the subsequent measures by automatically inserting the previous time sig if is different). The other issue I can think off top of my head is that every other staff (and their parts) get modified by the time sig changes, even if just selected one staff (but I guess one way that could be handled by only adding time signature to selection if indeed selected all staves).

The copy command does not currently copy any system data, only staff data. The reason has been touched upon previously with questions like, "What if I copy 2 out of 10 staffs?" What does MS do with the time signature in the other 8 staffs? You can't have 1 measure of 5/4 local time signature on only 2 staffs with everything else in the song being 4/4. A human couldn't figure it out, and I don't want the computer to force it. It makes more sense to just not allow it. Having said that, this is not an impossible feat, but it will have to have its limitations. How would one approach this? I have an idea:

I believe the solution to be something along the lines as has been previously suggested, a copy measure command. With this command, I think I would have the blue selection rectangle automatically expand to the complete system (all the staffs in the score).

1. Paste over existing measures - This option would obliterate the proper data in the same number of measures as the number copied. There are 2 situations.
a. If no measures are selected, then 3 measures at the destination will be replaced. For example, if 3 24/4 measures are copied and the time signature is 1/4 at the destination, the 3 1/4 measures would be replaced by the 3 24/4 measures with the appropriate time signatures being inserted. (I just wanted to show an extreme case not necessarily realistic).
b. If any measures are selected, they will be deleted IN EVERY SYSTEM and the clipboard will be inserted in their place. If a partial measure is selected the user would get an error such as "Destination must be complete measures. Correct this and try again."
2. Insert measures - The measures would be inserted before the selected measure and all others shifted. Time signatures would once again be inserted as needed to keep the measures lengths correct. It is possible insert copied measure into the middle of an existing measure. The program must split each measure in the system at the appropriate spot and adjust time signatures as needed. Splitting tuplets will of course lead to an error notification. The user can fix those time signatures as desired.
3. Exchange measures on clipboard - This option would be available only if measures are selected in the destination. It would cut the selected destination measures IN EVERY SYSTEM and insert the copied measures.

Limitations: The original selection and destination systems must have the same number of staffs. If this is not the case, the a message such as "Destination system must have same number of staffs as the clipboard. Operation aborted." Copying out of a tuplet will of course still be forbidden, but if the local time signatures ever get fixed, they should be allowed.

Side effects: If the original score has part of a measure selected, then at the destination MS will calculate the time signature for partial measures as reduced fractions at the beginning and end of the section. The user will have to decide what to do about these, including just letting them be. I prefer this to an incomplete measure with no indication to the user that this has happened like what happens when adjusting the nominal measure count.

Additional considerations: What if a partial measure is selected in the middle of a note? This of course happens because, for example, the 1st staff has 16th notes and the 3rd staff has a whole note. Do you replace that note with a note of the proper duration? or do you pad it with a rest? That's a question whose answer is destined to upset 1/2 the people who use this feature. What do you do about a mid slur copy? Do you calculate a new slur? I would.

If anyone is interested in implementing this, I can make it a feature request.

for (1.a.) you write "If no measures are selected" but what would be selected instead if you wanted that operation to happen? Are you saying if just any old note or chord rest was selected? In which case the paste obliteration would start at the tick of that element?

(1.b.) ok if entire measure(s) were selected. Although what if there was only part of a measure selected, or what if there was one and half measures selected, for instance? Would it cut off the selected part in the first measure of the selection and the selected part of the last measure of the selection, give those measures their own time sig, and then paste the copied measures in between them? (edit: looks like you discussed this in 2.)... Or maybe for simplicity only allow the selection to be full measures.

I worry when things start getting complicated, cause then that means more likely to have bugs. For this reason, I'm almost rather limit such a measure copy/paste feature to only work with copying full measures only, and pasting onto full measures or in between measures. I'd be willing to try to implement a full-measure-only copy & paste feature.

Hypothetically there could be a separate feature request which would cut measures in two, and then a user could manually use such a feature before copying/pasting complete measures.

1a. Yes, I had in mind a single note being selected rather than a range.

I considered having a selected destination being selected of the same number of measures with the same time signature to make it easier for the developer. I think this would limit the capabilities too much. In thinking about this I thought about how you could manually do this. If you have a range selected consisting of partial measures, I'll use beat 2 as the point in the measure for an example, Each staff would have its measure split with beat 2 being the selected note. If a measure is noted that has a 1/2 note on beat 1, then that note would be changed to a 1/4 note (same as a user selecting note and pressing 5). Each measure would be fixed in this method. This would leave a 1/4 rest to start beat 2. A complication would be, what if the start point is the eighth 16th note? MS will just have to tie notes together to shorten the note to the proper length. The measure would then be split (can be done from the edit menu). The same process would then be done at the ending beat. The last "orphan measure" would then have it's time signature calculated and inserted, the selection would be deleted, and then the first "orphan measure" would have its time sig calculated and entered. The remaining measures would be cleared. The copied time signature would be be entered (if not the same as the first orphan) and the number of measures would be adjusted by adding or deleting measures (both of which can be done by the user using shortcuts or from the menu). You are left with the appropriate number of empty measures to do an normal paste.

"Orphan measure" are those shortened measures that are left after MS pastes the clipboard.

With the exception of some of the parameter checking (making sure the staff counts are the same and calculating time sigs for example) most of this is using existing capabilites, and from a users point of view, looks like most of the code is already written.

If you still don't want to tackle the complicated replace partial measures, I understand, perhaps after the full measure methods are complete, someone could work on the other. I hope you decide to implement both a paste and insert measures option.

May I also add to the request for a Copy feature with an additional option of being able to copy the time signatures (and/or possibly the key signatures).

As others have mentioned, copying a piece with repetitive time changes is a real pain. An example is 'The 12 days of Christmas', which has several time changes, is very repetitive, and also is often associated with repeated key shifts.

Trying to copy this from, say, a base score to a 'working' score is a nightmare. It may sound identical but visually it's a dogs breakfast, and an immense task to sort out.

I found that adding the time signatures in the destination score _first_ works well.

It’s still tedious, whether by dragging the signatures onto the correct (empty) measures or by editing the MSCX (which has a higher chance of corrupting the empty measures if not careful). I’d select all measures and hit Delete before pasting anything into it anyway.

"Works well" is not quite accurate, IMO; the process is indeed tedious, but also error-prone, and unforgiving, if you make any mistake. That's the bug that needs fixing.

It looks more like an enhancement request considering system-wide copying/pasting than a bugreport.

Yes, the workaround is tedious (all human actions are error-prone, so this is not noteworthy), but it *does* work well, just very slowly and inconvenient.

(That being said, I agree this would be a nice thing to have.)

Has this issue been figured out? I created a score that is 137 measures long with many time signature changes. I want to copy that score to a new score to duplicate the part (I want to have identical parts with one for concert pitch and the other for a Bb instrument). I don't want to simply copy the notes and then have to manually redo all of the time signature changes and the text such as the dynamic markings, text about style, etc. I'm grateful for information about the fastest way to do this.

A possible workaround method for copying long sections including all formatting, time signatures, etc., would be to close the score, duplicate the score file, and then join the two scores using the Album feature. Unfortunately, this feature, available in 2.x, is still forthcoming in 3.x.

In reply to by Jojo-Schmitz

I'd kill as well, except multiple people instead of only one. Choose me.

All jokes aside, Musescore seems very avant-garde friendly to me, so I don't understand the reasons behind the lack of this feature. I mean, if someone were to transcribe stuff like some Stravinskij, or The Dance of Eternity by Dream Theater, not having this feature would literally double the time needed to get the job done, at least. Also, manually editing every time signature changes means raising the probability of mistakes exponentially (mistakes such as skipping a bar, unwillingly adding one, etc.). And then, if that occurs, pasting into the new time signature sets ends up providing you with something broken that is hard to troubleshoot.

Sorry for the wall of text but yeah, please, add this, I beg you lol

Reason is just that no one has gotten around to doing it, not any sort of objection to having it. MuseScore is open source, I guess no one who wants this feature badly enough has volunteered to implement it.

Just wanted to add my voice to those requesting this feature. I have been working on a piece with several long sections in different, changing time signatures. Some parts involve cadenzas with long, irregular-length bars. Putting these parts together into a full score is absolutely brutal!

I write large pieces, 20min avg, and I frequently change times...... nuf said on my pains.

I'm just adding to the list of begging. *begs

It's open source, but would any of the developers want to be paid for a collectively desired feature like this? Name some prices? I am willing to put some bills down! (recall my 20 min songs....). Have you guys ever done feature requested fund raising?

Mini rant: Musescore still saves me time in production because it is so superior over all other softwares (I have used others), but this time-sig paste issue can soak up a lot of those time savings. I promise you, developers, this is a big fix when fixed. I am arguing from a time management and work flow perspective in the production scheme! I want musescore to stay the boss of musical-schematic design: a 'special paste' with a check box for pasting time sigs would propel musescore's already superior position over its paid competitors.

Ok, I was venting a bit. Ta ta for now! I have a section to copy and paste. --- (recall 20 min songs)

+1 beg for this feature. It's something I really miss.

I have read the suggestions, and from my (limited) coding skills I can tell that none of them is trivial to implement, and the conflicts are not easy to solve. As said:

  • What happens if only a couple staves are pasted in the middle of an orchestral work?
  • What happens when only a partial measure is copied?

As a grain of salt, I would start with a suggestion that might shorten the path a little: what about implementing a paste insert command, which will insert the required measures in the middle (or at the end, obviously) of a score?
This way we get rid of the conflicts about what happens with material existing in other staves. And we can make this paste mode to paste time signatures along with the inserted measures.

I know this might seem as a turnaround from the required feature, but honestly, when I am going to copy everything including time signatures is because I am copying a section, so I have little use to the material that was there in the other staves.
And if for some reason I want that material back all I have to do is to copy it (from the pushed measures) and paste it back normally to my new measures so it will rebar to the new time signatures.

I can think on an algorithm such as:
1) Copy a region (include measures (barlines?) and time signatures)
2) Select a measure or chordrest and "paste insert"* (see below)
3) The process inserts each measure as it is needed, along with the time signature if present, and copies their content on the selected staves.
4) The remaining staves will remain empty, just the same as when inserting measures. (full rest measures, no change)
5) The existent measures were pushed to the right as the measures were inserted. So if the user wants to have back the material from the other staves, it's just a matter of copying and pasting normally, so this material rebars.

  • In case an incomplete measure was selected when copying, or when pasting, it can result on a first or last irregular measure, but those will be properly marked and can be dealt with easily, IMO.

As I said, my programming skills are limited, but this way I start seeing a way to do it.

In reply to by elerouxx

100% for this (seemingly easy to implement) solution.

We can even avoid ambiguity by saying that you can only use paste insert when the copied selection consists of full measures. I suppose if the copied selection is of full measures, but not all the parts, we could make it paste time signatures and all that, but leave the other parts blank.

But tbh, even in "paste insert" only worked for situations where full measures of all the parts have been copied, that would be enough. You could simply delete anything else that you didn't need.

So I would say, start by allowing "paste insert" only when contiguous full bars of all the parts have been copied, and gradually expand from there. That one case would be of enormous benefit and cover a huge portion of the use cases.

I have just now come across this issue when trying to paste a repeated section in changing time signatures (5/7, 7/8. 6/8 etc) only to have it all written out in default 4/4. There must be very many instances where this occurs in other peoples' work, whether composition or engraving. It seems to hold the programme back not having this functionality and it seems from this thread that it's been on the chalkboard for 8 years plus. Will it ever get a revamp? It holding back a supremely excellent programme for me.

Workaround No Yes

+1 Adding my voice to this as well!
Have anyone suggested an implementation that's basically just copy-paste inserting full measures? I think that would be a nice start. Basically, you can select a range of measures and even if you only selected partial measures, all of them gets fully copied and then inserted after the bar you selected to paste in. If there are multiple staves/instruments, they just get empty bars.

Also, if one would like to see the actual implementation of the current copy paste functionality, where can I find it? I took a look at the github repository, but I'm unfamiliar with its structure and couldn't find it.

I didn't explicitly mention time signatures, but I would think that copying measures and inserting them as is would imply that the time signatures gets copied as well. Maybe a better word for this scenario is than copy-paste would be copy-inject. You copy full measures/bars (and thus time signatures) and then inject them into the score at another point. That's probably what one would like most of the time anyways.
Reading a few posts above, it seems like my suggestion is basically what elerouxx suggested as well as what mark320 suggested from 18th feb 2017.

 + 1 for the option of pasting note data with the measure/meter format of the copied selection!

>>Expected result: [Selection] pastes overwriting the actual time signatures in the target measures with those in the selection.

> That's what we're after, although I'd like to see an intermediate dialog that includes the option to do an insert-paste or paste-over.

Actual result: The actual time signatures present in the target measures are retained resulting in ...

Yep. Target measures retaining their meter is usually the unwanted result (as indicated by the response here). But I can foresee the need sometimes to reflow copied data through existing measures without impacting their meter. So again, perhaps we could have a way of calling and intermediate dialog [via a command key) to choose the paste style:

• include meter properties on paste — or — • Paste note data into metric structure
(the former is what's being requested // the later is what we have in Musescore 3.2)

... and the option to:

• insert-paste — or — • paste-over

In reply to by scorster

@scorster Yes, that would be great!

@Jojo-Schmitz
>That is what should happen, bur currently does not. That is what this issue is all about.

That's not what the original post says though. It says it wants to overwrite measures, not insert/inject.
Now instead of debating whether I provided a suggestion or not (which really isn't interesting to anyone), how about you point me to where the code for copy-pasting is like I asked for in my first comment? As I said, I'm unfamiliar with this code base and don't understand how things are structured, but would be interested in seeing how the current copy-paste functionality is implemented.