MuseScore PNG export duplicates the file !@#$%^&*

• Oct 18, 2019 - 23:30

MuseScore duplicates my PNG exports with new file names each time I ship to .png, which I do considerably.

Please tell me how I override that abnormal WindowsOS-like preemptive nonsense.

This MuseScore quirk is a cumbersome, confusing, inefficient and time-consuming drag on my creativity.


Comments

Not quite understanding. MuseScore uses whatever filename you specify, with "-1", "-2", etc appended for each page. It does this every time, overwriting any existing files by those names, no duplication. Or maybe I'm misunderstanding, can you explain in more detail what you are doing, what you expect to see happen, and what happens instead?

I will say, the handling of the multiple pages (needed because PNG can't handle multiple pages) means that if you do this a lot, you'd be be well served to use command-line / scripts to automate whatever it is you are actually doing - feel free to describe your workflow in more detail and we're happy to advise further.

In reply to by Marc Sabatella

On all my post-first-time (single-page) exports to PNG, MuseScore assigns it a new filename and thus saves it as a new file—instead of overwriting the original.

How can I stop the duplication of files—new and old—so MuseScore overwrites my original old file with my new .png file?

BTW, I save my PNG in a folder exclusive of my .mscz files.

In reply to by David Faubion

How are you doing the export - from File / Export, from the command line, or from the image capture tool? What name are you choosing for the export?

As I said, since PNG does not support multiple ages, MuseScore appends "-", "-2", etc to whatever name you specify in a normal export. If you don't rename those files, MuseScore won't duplicate anything - it will replace them as expected. My guess is after the first export, you are renaming the file to remove the "-1". Don't. Either that or maybe you are now specifying the file name with the "-1" there. Don't do that either. Just keep specifying the same filename, don't try to remove the "-1", don't add it to the name you specify,. If you export twice with the name "foo.png", you get "foo-1.png" etc. the first time, and then these are overwritten with the same names the second time.

In reply to by Marc Sabatella

I export png by way of File/export. I use the same name as my MuseScore name. I do not have multiple-page files for export to png.

Please explain why MuseScore adds the -1 to the filename.png? What is the advantage? Why then does MuseScore rename all of my subsequent revision exports to png? Why can't I opt out of that non-standard file management quirk, which causes confusion as it wastes time and serves no purpose in my view of it?

In reply to by David Faubion

The advantage of appending a -1 to the filenames of export formats that create one file per page (png, svg) is consistency.
I twice made PRs to special case one page scores to not do that (see https://github.com/musescore/MuseScore/pull/3177 and https://github.com/musescore/MuseScore/pull/2399, issue #99196: Remove appended page number for PNG export when parts only comprise one page), they got rejected for the above reason.

MuseScore does not rename all future exports to png, it just remembers your last export and makes that the default for the next

In reply to by David Faubion

To be clear: most scores are more than one page. PONG does not support multiple pages in a single file. For most scores, then, it is necessary to generate multiple PNG files, one per page. And they obviously can't all get the same filename - they need to be differentiated by page. So, they get numbered -1, -2, -3. Specifically, because people write scripts that expect this behavior, it would be very inconsistent and undesirable to generate the name differently for scores that only have one page than for other scores. Page one of a score shoud be exported as title-1.png each and every time without fail, regardless of the number of pages in your score, or how many times you perform the operation. People writing scripts should not have to special case this or know in advance how many pages are in a score. They should expect each PNG to have "-n" after it, no special casing required.

Again, MuseScore does not rename subsequent exports. If you type the same thing into the filename box, you get the same output filenames (what you typed plus -1, -2, -3, etc). Every single time, without fail. There is nothing remotely non-standard about any of this.

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