Copying SVG between scores not working

• Nov 15, 2024 - 20:21

The manual says, "Copying imported images:
Once an image has been imported into the score it can be copied/cut and pasted to another location, such as a frame, note or rest, using the standard commands and procedure (see Copy and paste)."

This works perfectly within one score, however I lose the images when I copy and paste between scores. There are place holders (see attached) in the proper positions, but images aren't there.

Is this expected behavior?

Attachment Size
SVG placeholders.png 32.1 KB

Comments

In reply to by bobjp

I've tried adding the symbols to a palette in the past, but I've never gotten that to work (though I have read through the forum topics on that problem). So, I just keep Inkspace open and cut and paste. The workflow is really ok, but it's fiddly work nonetheless. I don't want to do it again if I don't have to.

I'm creating a score reduction from full score. Since I knew this problem existed before this, I saved the full score under another name and then went about creating the reduction by using the implode tool on that copy. Unfortunately, I didn't include the celli and the basses in the selection when imploding and then deleted those staves without realizing my mistake until the next day. I'd love to copy over those two lines from the full score, but that's not happening.

I suspect the copy handler needs attention. When I copy from Musescore and paste into Inkscape, Inkscape tells me there's nothing on the clipboard.

In reply to by Postman

I've had successes and unexplained failures when using SVG graphics in MuseScore 3 and MuseScore 4. And I'm on MacOS.

I've created some of my SVGs in Illustrator, but currently I make them mostly in Affinity Designer.

You may want to alter your workflow, because I don't think there's a solid, native, inter-app clipboard for copy/pasting between a vector editing app and MuseScore (in either direction). When I view the MacOS clipboard after copying an SVG from MuseScore it's empty; when I view the clipboard after copying from Affinity Designer I see the SVG code:

• As expected, I can't copy an SVG from MuseScore to paste it into Affinity Designer.
• When I copy an SVG from Affinity and paste into MuseScore the deposited graphic is pixelated.

Various apps, like museScore, may ignore some of the formats that may simultaneously be on the clipboard.

There are alternative clipboard apps that my help. But I've never used one.

My workflow is to:

• export the vector image from my vector editor to an SVG file.
• then I can drag the SVG from my desktop to a MuseScore 4 frame, or note, or rest ...

Once I have an SVG in MuseScore 4 I'm able to copy/paste it to other MuseScore 4 documents—sometimes—but first must select a destination frame, note rest. Other times, on paste, I get an empty placeholder as you've reported.

I've also noticed empty placeholders when opening SVG-bearing MS3 scores in older versions of MS4. And sometimes SVG are all there, but on reopening a MS4 score I only see a placeholder.

scorster

In reply to by mercuree

I was under the impression that the recommended method of getting an image into a score from an outside source was to drag it. The image can be a png or svg. Though svg seems to be a better choice. It tends to show in a palette cell when it is dragged there.

In reply to by mercuree

@mercuree wrote >

> It seems that the image is always interpreted as a raster.

Correct. And thanks for providing a link to the Github paste.cpp code.

When I copy a down bow vector image from Affinity Designer (exported and attached below) the MacOS clipboard indeed shows XML for the SVG:

      Down bow SVG on MacOS clipboard.png

... but MuseScore forces its type to RASTER.

scorster

In reply to by scorster

I'm generally very happy with how Musescore deals with external graphics. I'm not aware of any other notation package that does it at all let alone as well.

BTW, I'm using Windows 11.

Admittedly, it has been a decade at least (if not two) since I worked with the clipboard in code, but I seem to remember you can put any data on the clipboard and then tag it as you please. It's that tag that is checked in code to see whether your application can use it. Yes, some are very well established (like text and bitmaps) and have library support to match, but that shouldn't be a limiting factor. Personally, I would love to see a MIDI type supported by Musescore for instance.

Clearly, Musescore developers have put in the work to support the SVG type (because pasting works). I just think the developer working the ticket stopped too soon (so I guess this could be considered an enhancement request rather than a bug). Not be able to copy an object that can be imported via the clipboard between documents of the same application falls short of accepted user interface practice.

I suggest the team look into it. I do not believe it's a high priority issue, though.

In reply to by mercuree

Don't load? They load from a saved file just fine. The issue is if you paste an SVG graphic into a Musescore doc, then copy from there and try to paste it into another Musescore doc, the graphic doesn't show up (just the place holder).

Please do let me know if you can't reproduce this. That could help in figuring out a workaround.

In reply to by Postman

@Postman wrote:

> *The issue is if you paste an SVG graphic into a Musescore doc, then copy from there and try to paste it into another Musescore doc, the graphic doesn't show up (just the place holder).

Not sure if you saw near the bottom of this post I mentioned having multiple successes pasting SVGs among MS4 documents, and yet I partially confirmed the issue with multiple failures. And still today I'm unable to determine what triggers the success or failure.

scorster perviously wrote >

> Once I have an SVG in MuseScore 4 I'm able to copy/paste it to other MuseScore 4 documents—sometimes—but of course I must first select a destination frame, note rest. Other times, on paste, I get an empty placeholder as you've reported.

In reply to by Jojo-Schmitz

Jojo... you wrote:
But in Mu3 it is one instance with multiple scores, in Mu3 is it multiple instances with one score...

Do you mean the Mu3 one instance vs the Mu4 multiple instances dichotomy?
That is, the Mu3 single widow with tabbed scores vs the Mu4 multiple instances with each window displaying a single score?

In reply to by Jojo-Schmitz

This morning I started thinking that I was going to have to do this by hand (really not that big a deal). So, I copied the two staves in question from the full score then tried to paste them into the reduction score (forgetting that you need to create the staves in the target first) which failed as expected*, then created the staves and tried again, and I'll be damned if the images didn't come over! What?!

Other than what I just described, I have no idea why it worked this time. Which is to say, congratulations, this is an intermittent bug. You might want to let the developers know.

Thanks, again.

*OT: Why isn't this possible?

In reply to by bobjp

I can't drag and drop onto the pallette. I must be doing something wrong, but I can't figure out what it is.

However, even if I could get that to work, it wouldn't solve the problem. The use case is described in my second post in this topic.

In reply to by Postman

Hamlet had a soliloquy. Why can't I? ;)

The fact that you have to create a workspace if you want the palette to surive a reboot without any warning that you'll lose the palette if you add to the default isn't the best. Maybe the code that deals with adding a custom palette could check? Just a thought.

In reply to by Postman

Lately there does seem to be a saving issue. If I save the score I created the palette in, it is still there if I open that same score. If I open a different score not all of the palette is there. If I don't save the original score, the new palette is totally gone on re-open.

I'll continue to experiment.

In reply to by Postman

I know some have had issues dragging to the palette. But this procedure works for me
Once the image is in MU4, hold ctrl+shift. Then select and drag the image to a palette. Let go when you see the + sign.

This can also be done with png images. But they don"t show in the palette cell. They are there, however.

W11 photo viewer can remove the background from a png. As I say they don't show in the cell. But you can lable the cell and the lable shows if you scroll over it.

It seems to me that Copy+Paste in Musescore isn't always dependable. Or at least doesn't always yield the expected result. In the case of svg images, why is C+P important.

Do you still have an unanswered question? Please log in first to post your question.