musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.15k stars 2.63k forks source link

[MU4 Issue] Time & key signatures, repeats, and tempo markings cannot be copy pasted #15590

Open SilverGreen93 opened 1 year ago

SilverGreen93 commented 1 year ago

Describe the bug When selecting a range of measures with the mouse, shift or Control+A, all time & key signatures are not selected, thus are not copied. The same happens with tempo markings, although they are selected with blue.

image

To Reproduce Steps to reproduce the behavior: Select any range of measures and copy - paste them in any other place or window. The selected time & key signatures within the range are not copied.

Expected behavior There is no immediate indication that the time & key signatures are not copied, so when pasted, the information is lost

Additional context Even if I specifically select only the key or time signature and copy it with Ctrl+C or from the context menu, nothing happens when I paste them. The behaviour is slightly different on tempo markings, that are being selected with blue, but fail to copy-paste when selecting the whole measure, although, if I select only the marking and paste it on a note, it does copy.

MarcSabatella commented 1 year ago

Note this is not a bug, simply a long-requested feature not yet implemented. Along with copying repeats, tempo and other system text, etc. It’s not especially complicated to implement; it just requires a design for how one would control when these things get copied and when they don’t.

cmaxreilly commented 1 year ago

I would very much like this to be implemented, either as a system select a-la Sibelius(command/ctrl+click), or as some kind of extra option on the selection filter. I think this has huge ramifications for orchestration of pre-existing piano scores. Right now I am orchestrating a good many piano reductions for a kids musical I am working on, and it is very annoying to have to manually enter the correct time signatures and modulations for every piece when I copy the piano part in. Some automation of this task would save me a lot of time!

Daniel-R15 commented 1 year ago

Came up again on MuseScore's Feature Request forum. See Inserting bars with different time signatures: https://musescore.org/en/node/354339

jpmtrabbold commented 12 months ago

+1 for this to be implemented - it's been requested for 10+ years now, so it seems like it is very desirable.

brettrp commented 11 months ago

Adding to this discussion (I didn't find this issue when I searched before creating the duplicate above).

DaddyLudwig commented 11 months ago

The main problem I’d run into if this was to be implemented is redundancy, i.e. time signature or key signature copied where there’s no change. Cause you see, as a classical music transcriber, I run into reappearances of A section material a lot, be it the first theme in a sonata recapitulation or the main theme of a rondo or the first phrase of a minuet. And if time signatures suddenly started copying when I did my copy and paste, I would run into the situation of no time signature change, but time signature still copied way more than the situation of actually needing to copy and paste a passage with a time signature change in it. And then I would need to delete the redundancy and my flow would be much more broken than it already is.

So, if this does get implemented, I hope there’s a way to both avoid redundancy and have actual changes pasted.

Tantacrul commented 11 months ago

@DaddyLudwig You would definitely need a modified rule for time and key sigs.

A simple range selection should not automatically copy them. I know Sibelius 'solve' this by having two different kinds of range selection. You have to click on a range selection a second time, which makes it a 'copy everything' range selection. It works as a solution but I'd be pretty concerned most users wouldn't have a clue what it does.

Anyway, we'd need to solve it ourselves someway too.

cbjeukendrup commented 11 months ago

In my view, the solution could be very simple:

I've said that before, but then it turned out that getting rid of range selections was not to everyone the obvious solution (although I don't know why not). Anyway, if we really want to draw a blue rectangle around the selection if it was created in a certain way, that's fine by me, but at least it should be possible to include/exclude individual elements from a range selection. I think that would make it a lot more useful also in other situations.

MarcSabatella commented 11 months ago

FWIW, it is possible to use Ctrl/Cd+click to add or remove elements to/from a range selection, but in the process it is converted to a list selection.

The difficulty with allowing copy/paste of arbitrary lists of notes that don't necessarily represent a range is in dealing with the "holes" that can be created this way - copying a selection that consists of one note from one measure on one staff, another note from another measure on another staff, plus some other random element on another staff, etc. It's not unsolvable of course; just so far no one wanted to tackle it. The ability to copy lists of other elements - lyrics, chord symbols, etc. - is itself "relatively" new, and it's already kind of annoyingly full of special cases. It would be nice to have one coherent implementation for copy/paste.

Anyhow, getting rid of the range selection as a separate concept is an interesting idea, one I don't recall being seriously discussed in the past. There is of course an awful lot of code that relies on this currently, looping from selection start to end. But no particular reason we couldn't keep those markers.

In any case, to require use of Ctrl+click to include or exclude time signatures one by one is not ideal, since typically it would be all or none that you want copied. The better model in my mind is to have these and other "system" elements that are currently not copied (key signatures, barlines, tempo and rehearsal marks, etc.) listed in the "Selection filter". Possibly defaulting to off, in which case we'd need a "reset" button in addition to or instead of the current "all" button to restore the defaults, which would now be mixed.

Tantacrul commented 11 months ago

Hmm. I keep forgetting our slightly unique term 'range selection'. I didn't actually mean drawing a rectangle around elements.

I intended to refer to the more typical multi-selection method - when a user clicks within a measure to select everything inside it. I think it's at that moment (once a selection has been made) that we should provide some UI to let users specify whether they want to include key sigs / time sigs or not.

The moment it involves extra shortcuts to specify different kinds of selection, it becomes awkward, hard to discover, etc.

Alternatively, the Sibelius system (which is discoverable - although takes a bit of getting used to) of just clicking on a selection again to make it a different kind of selection should also be considered.

Simple rule: a shortcut should be a 'shortcut' to an existing type of action - not the primary way of performing that action.

jeetee commented 11 months ago

A point of consideration would be how the current selection filter is affected and/or fits into this functionality. It currently is the way to exclude certain element types from a range selection, without losing the range-ness of the selection.

cmaxreilly commented 11 months ago

Perhaps this is resolved with the incorporation of a "System" sub menu in the selection filter that is unaffected by the "All" checkbox? I am envisioning something that contains time signatures and any other requested system data that is not currently covered by copy paste, and each element in the submenu must be checked manually in order to avoid accidents. It might be wise to change "all" to something like "measure", or the previously suggested "default." Either way, I would deeply appreciate not having to manually enter time signatures for everything I copy and paste.

SofNotenwart commented 6 months ago

Maybe I'm out in deep water here but it seems to be difficult to find a viable solution to select the information to be C&P. Apparently, today it's more or less only the notes and not keysigs, timesigs, etc.

A simpler solution could be that the selection and copy process includes everything as wished by many in the community. Then in the "paste" step, you decide what's pasted. This can, for example, be compared to paste only the text or numbers in Word/Excel if you only need the notes. In Excel, you have then more possibilities what's actually pasted, with or without format, equations etc. Maybe it would be safest to keep paste notes only by "Ctrl V", the other options by right clicking on the mouse.

millsj1134 commented 5 months ago

Here's my two cents: keep paste the same way so that it works how it seems devs want it too. However, add a paste that keeps this information if some want it. This idea comes from Google Sheets and "paste format". There's a regular paste and a special one. Make the special harder to find for those of us that want it while still keeping UX easy which I believe is the discussion being had here. Not sure how elegant you all think that is (or maybe I am just rephrasing what's already been said lol 😂)

MqcCheeze commented 5 months ago

Wouldn't having a shortcut similar to copy/paste like, Control + Shift + C/V, or even Control + Shift + Alt + C/V be an easy way to add it to the list of shortcuts... Or to add, copy pasting all items as an unassigned shortcut for people like us who need it to manually set it. I am working on a project that's estimated to have just under 200 pages once done, the sound is delayed and Musescore is laggy with that number of measures when I tested with a sample project, and I'd rather not have to deal with that. So I'd like to split up the project into smaller scores, then compile them into one big one at the end, but apparently not since this still hasn't been implemented. Also, isn't it a bit ridiculous that this has been a requested feature for this long, other notation softwares have it, and its not hard to implement?

wizofaus commented 4 months ago

Just needed this today. I did start looking at how to implement, I don't think it's that hard, and logically the way to implement it would be that time/key signatures are not selected by default when you select a range of measures, but via selection filter (or whatever, I know some don't like that!) you explicitly mark them as being included in the selection. Either that, or when copying a range, all the information IS copied to the clipboard, but there's two paste modes, one preserving time & key signatures, and one not.

However - in the meantime I'd be fine with having the ability to easily splice two scores together, which would allow doing what I need to do. I gather that was possible in MS3 using albums, which are...not happening in MS4, ever?

wizofaus commented 4 months ago

Here's my two cents: keep paste the same way so that it works how it seems devs want it too. However, add a paste that keeps this information if some want it. This idea comes from Google Sheets and "paste format". There's a regular paste and a special one. Make the special harder to find for those of us that want it while still keeping UX easy which I believe is the discussion being had here. Not sure how elegant you all think that is (or maybe I am just rephrasing what's already been said lol 😂)

Yeah having an explicit "paste with signatures" command might well make the most sense, though it's kinda the opposite of the way it works in rich text editors where the default is "paste with formatting" but you can also choose "paste without formatting".

sebicodes commented 1 month ago

Just want to add, that it is really a very necessary feature - getting mad in just changing the order of 2 parts of a score of mine with a lot of different time signatures that all get destroyed in the copy-paste operation.Why is it so difficult? Maybe it would be sufficient or a first step, just to add a point in the context menu "copy complete measures" and "insert complete measures". Or even just another function for moving measures in the Edit-menu? Or isn't it that easy? The internal data structure should be measure related? So all information should be available in a proper order to move to another place?

MarcSabatella commented 1 month ago

In principle it's not that hard - probably the harder part is designing how the user would specify which behavior they want. There is a new design spec for something intended to at least partially replace the selection filter, so any new feature for copying time signatures would probably need to integrate with that.

But once the UI is decided upon, the actual implementation just needs someone sufficiently motivated to spend a few days doing the work.

wizofaus commented 1 month ago

Time signatures are non-trivial at least though, e.g. if you paste somewhere means the time signature change would fall somewhere other than the first beat of a measure. One option might be that if there are time signature changes then if necessary the time signature of the measure you paste into is changed and rests etc are added as needed to ensure the pasted material starts at the same beat you copied from, but that could still produce some unexpected results. Alternatively if a time signature would otherwise fall onto a beat other than the first, the measure beforehand has its number of beats reduced to ensure there's a new measure starting where the time signature is. And should copy/paste of material such that time signature changes are preserved be supported if you don't have all staves selected? I.e. it would have to forcibly rewrite material in other staves to fit the new time signature (problematic for tuplets etc but I suppose no different to what happens now when you insert time signature changes.

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Marc Sabatella @.> Sent: Thursday, September 5, 2024 5:27:19 AM To: musescore/MuseScore @.> Cc: wizofaus @.>; Comment @.> Subject: Re: [musescore/MuseScore] [MU4 Issue] Time & key signatures, repeats, and tempo markings cannot be copy pasted (Issue #15590)

In principle it's not that hard - probably the harder part is designing how the user would specify which behavior they want. There is a new design spec for something intended to at least partially replace the selection filter, so any new feature for copying time signatures would probably need to integrate with that.

But once the UI is decided upon, the actual implementation just needs someone sufficiently motivated to spend a few days doing the work.

— Reply to this email directly, view it on GitHubhttps://github.com/musescore/MuseScore/issues/15590#issuecomment-2329813840, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABI5UAKL2TCH247TLZKJSJTZU5NJPAVCNFSM6AAAAAATJDP6GKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRZHAYTGOBUGA. You are receiving this because you commented.Message ID: @.***>

sebicodes commented 1 month ago

Time signatures are non-trivial at least though, e.g. if you paste somewhere means the time signature change would fall somewhere other than the first beat of a measure. I'm not sure if I understood the sentence correctly. Do you refer to pasting to another place than the first beat or do you mean the resulting changes of the place of the first beat if you have another time signature?

I think, preserving time signatures should only be possible in inserting complete measures. You would otherwise get in complicated situations if you overwrite existent music. I think it is not a good idea to allow overwriting existent measures if you also transport time signatures. In fact you won't need such a feature (see below).

Also it is not of primary interest to preserve time signatures if you only want to copy single staves to another place, so I won't implement that.

It is ambiguous what the default behaviour should be. As the results of such a copy and paste procedure ar not easily predicted a score is easily messed up.

(problematic for tuplets etc but I suppose no different to what happens now when you insert time signature changes. Yes, these problems already occur. At the moment musescore adds rests filling the place to the next time signature change, the time before the next signature change is adjusted over measure boundaries without rest.

So why do I think one won't need copying time signatures as single features, overwriting existent music, or only for some staves (so urgently)? This is mainly implemented.

Just think of such notes as example:

grafik

If I want to put this part of the music on another place of my score and retain the metrical structure then I could insert these measures at this place and copy the music that had been there before into the resulting empty staves. This is already implemented. The advantage of doing so is that I don't have to check and calculate the exact duration of the copied music. I just can insert it and see how many measures afterwards have to be deleted or filled.

grafik (first 8 measures of Fuga d#-minor BWV857 in 4/4).

Inserting at another place than beat one seems also unnessecary: If I want to insert the clip e.g. at beat 2 of a 4/4 measure I (not the software!) have to decide what structure will be the result: a 9/8 measure or a 1/4 measure + my unchanged 7/8 measure? Or would I prefer to combine this measure with the 4/4 measure before to a 5/4 for more convenience in conducting and reading the music? I will have to do that manually anyway. So why not insert the measures and adjust the insertion place afterwards.

Nearly the same applies to the other way: copying incomplete measures. I have to take the same decisions and can combine the conventional copy as before with inserting.

But: the following simple task is still impossible: Just to copy the first line (measure 1-6) to measure 13 and even more difficult to copy it to the beginning, you would have to calculate the beats, insert enough measures for the music, then copy and then manually edit every time signature.

(Excursion to the not "so urgently": Of course, if I make heavily use of collage techniques that need polymetric notations or even completely independent staves... then it would be nice to cut and paste, what ever is in a "blue rectangle"... But this may be another future project, editing polymetrics is still quite tedious anyway and prone to destructive changes in the score - even without sophisticated copy and paste...)

But once the UI is decided upon, the actual implementation just needs someone sufficiently motivated to spend a few days doing the work.

So I hope that will help a bit deciding for just not too many features in the UI but sooner... ;-)

flsdgzjweva commented 3 weeks ago

I hope this gets implemented soon - in whatever way - be it just a special shortcut for now. It's such a basic and necessary feature and I've been waiting for it, like many others, for years. +1 for what sebicodes says. When copying a passage of bars with time signature changes I think most of the time you also want to preserve the time signature changes so I think this should be the default. If not, then being able to have a keyboard shortcut for that would be nice - instead of having to manually select it in the selection filter each time. (The selection could also turn a different color every time the times signatures are selected too to make the user aware of it)

wizofaus commented 3 weeks ago

Time signatures are non-trivial at least though, e.g. if you paste somewhere means the time signature change would fall somewhere other than the first beat of a measure.

I'm not sure if I understood the sentence correctly. Do you refer to pasting to another place than the first beat or do you mean the resulting changes of the place of the first beat if you have another time signature?

Let's say I have a score with a 4/4 time signature at the beginning then a change to 3/4 at the third measure. If I copy just the 2nd two measures to the clipboard (the first measure being in 4/4, the second in 3/4) and paste that to the start of the subsequent 3/4 measure (that's at the end of my selection), what should happen? Do we accept that even though I didn't copy a "visible" time signature object, I've still effectively copied from a measure that's structurally in 4/4, so if I paste on to 3/4 measure, it must insert a new (visible) time signature object, and force that measure into 4/4? That's probably a relatively simple case, and I'd be fine if that was the desired behaviour, but it means at the point we copy to the clipboard, the "current time signature" needs to be part of that information (or not, as per below, we could just use the number of beats before the first barline in the selection).

But now let's say I paste my clip onto the 2nd beat of the 3/4 measure - are you saying it should simply give up in that case and even though you have "time signatures" explicitly checked in the selection filter, or you explicitly use a "paste with structure" command, it should just ignore time signatures?

And what about the case where my initial selection starts from the 2nd beat of the 4/4 measure - should I not be able to paste that into an existing measure such that time signatures are preserved? That would be annoying for something like this:

image

Where I would expect the result to be:

image

Personally I'd be fine with the behaviour being: Determine how many beats exist between the paste destination and the subsequent barline, and if it's different to the number of beats before the first barline for what's on the clipboard, change the time signature so they line up.

In principle that would "solve" all cases when pasting "with structure" so that notation on beat 1 (including time signatures) always stays on beat 1 when pasting. The only tricky part is dealing with compound vs simple meters - e.g. if current measure is 6/8 and I try to paste part way through the measure, it might not be obvious what to change the time signature to. I guess what I'd try to do is calculate if the extra number of beats required could be accommodated just by changing the numerator, and if not, keep doubling the denominator until it were possible until it's possible. That way if, for instance, an extra a 1/2 note were required to ensure barlines lined up, 2/2 would become 3/2, 4/4 would become 6/4 and 6/8 would become 10/8 etc. But if all that was needed were an extra 1/8th note, 2/2 and 4/4 would both become 9/8 and 6/8 would become 7/8.

mikemorr commented 3 weeks ago

I would like, at least as an option, a mode where only entire measures, not parts thereof, can be copied and pasted, and where pasting can only occur at the starts of measures. Such a mode would be intuitively correct for many of the use cases pertaining to this issue, and would eliminate such mid-measure complications.

Tantacrul commented 3 weeks ago

To solve this problem you have to provide an alternative copy/paste option because you can't just automatically copy time sigs or key sigs.

Not saying those are the only options but they represent the two general ways you can do it: knowingly before copying. Or by being prompted after pasting.

Tantacrul commented 3 weeks ago

I've thought about this way of doing things but not in much detail. If we could have some simple popup widget that allowed people to select the copy type, that might work. Might also be annoying. Depends on how it's made and whether people 'get' it.

image
jeetee commented 3 weeks ago

re: option 2. I personally kind of like the Excel/Word approach here; after a paste, the pasted range is still selected and a small popover action allows to switch to different paste options. The dropdown menu showing those options also showcases possible shortcuts/combinations to achieve those paste alterations.

[EDIT]: similar to your mockup, but much will depend on the "in your face"-ness of the design

Tantacrul commented 3 weeks ago

Perhaps we could do both. Allow the user to click the selection again and it changes shape / colour in some way. And we could include post pasting options too.

image
Tantacrul commented 3 weeks ago

I mean... that's a really nasty mockup but you get the idea :)

@bkunda

wizofaus commented 3 weeks ago

But how does Sibelius preserve time signatures if they don't fall on beat 1 of a measure when pasting?

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Tantacrul @.> Sent: Wednesday, September 11, 2024 8:38:41 AM To: musescore/MuseScore @.> Cc: wizofaus @.>; Comment @.> Subject: Re: [musescore/MuseScore] [MU4 Issue] Time & key signatures, repeats, and tempo markings cannot be copy pasted (Issue #15590)

I mean... that's a really nasty mockup but you get the idea :)

@bkundahttps://github.com/bkunda

— Reply to this email directly, view it on GitHubhttps://github.com/musescore/MuseScore/issues/15590#issuecomment-2342279341, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABI5UAP3CNPEWGN7LS5IWWLZV5YHDAVCNFSM6AAAAAATJDP6GKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBSGI3TSMZUGE. You are receiving this because you commented.Message ID: @.***>

wizofaus commented 3 weeks ago

A "paste with structure" command could work but it implies all-or-nothing, so if you wanted the time signatures but not the key signatures, you'd have to remove them afterwards. Which might be fine, it's not that often you'd need that anyway.

Tantacrul commented 3 weeks ago

A "paste with structure" command could work but it implies all-or-nothing, so if you wanted the time signatures but not the key signatures, you'd have to remove them afterwards. Which might be fine, it's not that often you'd need that anyway.

If you just wanted the key sig or the time sig by itself, you could just copy and paste it like you can now, no?

Tantacrul commented 3 weeks ago

But how does Sibelius preserve time signatures if they don't fall on beat 1 of a measure when pasting?

It's not nice. If time sigs end up being pasted anywhere but on the first beat, then it creates a new bar and starts the pasting operation there. It can get very messy. I'm sure we could do a better job.

Actually, on reflection, Sibelius has the right idea but the implementation is very ugly and unintuitive. It's more complex to achieve than I remembered.

wizofaus commented 3 weeks ago

A "paste with structure" command could work but it implies all-or-nothing, so if you wanted the time signatures but not the key signatures, you'd have to remove them afterwards. Which might be fine, it's not that often you'd need that anyway.

If you just wanted the key sig or the time sig by itself, you could just copy and paste it like you can now, no?

I mean if I have an extended passage that has time signature AND key signature changes, and I happened to want to copy the time signature changes but not the key signature changes (or, say, all clef/key signatures but not rehearsal marks, which is more realistic) how would I do it? And what else should be copiable - voltas/repeat barlines etc.? There are definitely times that would be wanted.

MarcSabatella commented 3 weeks ago

Isn’t this the sort of thing that should be part of the design of the new selection filter as per https://github.com/musescore/MuseScore/issues/23817? That seems like the natural place to select what gets copied.

wizofaus commented 3 weeks ago

That would be my preference in this case, it's more flexible and just a logical extension of the existing system. But I can see why a "paste with structure" command might be more discoverable/more in line with user expectations based on how other software works. Don't mind too much as long as it works reliably!

cmaxreilly commented 3 weeks ago

I'm not even remotely sure of implementation, but I think that my preference would be to simply expand the selection filter. The interface I am envisioning is a second section of the filter below the existing filter, perhaps labeled "Structure selection." It would undermine the truth of the checkbox "all" if we wanted to avoid having system selection being the default behavior (which is the correct decision).

This would have the added benefit of allowing users to easily copy and paste time signatures ONLY. I can imagine many use-cases for such an approach, and I don't think that Sibelius has this feature.

cbjeukendrup commented 3 weeks ago

I haven't read the entire discussion above, but I wanted to say that after 4.4.x is behind us I'll start working on that selection filter task, and in that task I'm planning to include a slight overhaul of the copy/paste implementation. That won't immediately lead to a fix for this issue, but might bring us a step in the direction; at least I'll keep it in mind.

frfancha commented 2 weeks ago

Excel has also lot of complex stuff that you may want to copy or not : formats, values, formulas, ... But by no mean they have designed a super complex selection mechanism as you seem trying to do. It is at paste time that you decide what you want to paste (and there is a default when you just do CTRL V of course). It seems to me that this is the right approach and that designing a complex selection mechanism is unnecessary. By making the default paste choice the same as the current MuseScore behaviour we avoid any surprise, and that opens interesting new feature : copy all, Paste only time signature Paste only voice 1 ...

wizofaus commented 2 weeks ago

That selection system already exists though, it's not new. I actually use the selection filter all the time though mostly for voices. But whether it's the best mechanism I'm less convinced on (mainly it's the way measures become unselectable of v1 is off, even if you just want to select it as destination).

frfancha commented 2 weeks ago

The advanced selection feature of MuseScore exists and is indeed necessary when for example you need to change some property of all notes of voice 2 or anything similar.

And yes if using that you select voice 2 only, then copy then paste you will get voice 2 notes only. Great. Nothing to change to that.

What I'm saying is that when you paste, you need an advanced paste feature like Excel to select what exactly you want to paste. Time signature yes no, key change yes no,.... And yes of course if you had already filtered at copy time, that paste selection can only allow you to select between the element you have filtered at copy time.

Jojo-Schmitz commented 1 week ago

See also https://musescore.org/en/node/165746

lgvr123 commented 1 week ago

This issue also concern barlines that are not copied with a copy/paste; CopyPasteBarlLines