SVG export
Hi mates!
For post-editing reasons, sometimes I find it useful the "save as svg" option of MuseScore. It works fine for single-page scores, but for some reasons I get bad results with multi-page ones. Let's see an example.
Suppose that I have to export a two-page score. The output is a single file in which the first page and the second one are badly "mixed" to each other. Separating them is feasable, but requires a huge amount of time, as one has to analyze tag by tag the svg output, find where the second page begins, prepare by hand a new svg file (with the proper svg header code) then copy/paste the portion of svg code related to page two into the new file. I think you can easily guess how complicated this procedure can be, particularly when the score uses slurs, many accidentals, articulations and so on.
A three-page score would be, of course, even worse. And a four-page score would be literally a nightmare!
Is there a way to make the svg export more practical for multi-page scores? (as an example, as easy as the png export, where each page is saved as a different .png file?)
Comments
Yes it's probably possible. The function to save as svg is here https://github.com/musescore/MuseScore/blob/master/mscore/file.cpp#L2217
The function to save as PNG here: https://github.com/musescore/MuseScore/blob/master/mscore/file.cpp#L2031
What type of post processing are you doing in SVG that you can't do in MuseScore? just curious.
In reply to Yes it's probably possible. by [DELETED] 5
My programming skills are quite poor, so I'm not sure I grasped the code properly. Do I get it correctly if I say that in png export a new file is saved at the end of every cycle in the "for" loop, while the "foreach" loop in the svg export just accumulates all the elements of the whole multi-page score before saving a single file? If so, the result would be that the many pages of the score are "mixed" in a single file (which is exactly what I find when I analize the svg file for multi-page scores). Looks like adding a call for the saving procedure at the end of each page in the saveSvg() method would do the trick, saving one file for every page, as it happens with the savePng() method. Am I correct?
I am a teacher in the Italian school. As you probably know we are living a long-term crisis, so I have to optimize printing. As I need just short scores, I "compose" my pages so that a single A4 sheet of paper can provide two A5 score (see the attachment, auld.pdf). That would be impossible to obtain in MuseScore, so I save an svg image of the score, then copy/paste it twice in OpenOfficeOrg, then shift/rotate one of the two scores, then export it as a pdf file. That way, I can obtain a light-weight pdf file (easy to download from the web) and two pupils can have their copy of the score they need with just one print, that's to say they can spend half the money they would need to spend otherways.
Sometimes, I need to manage longer scores, and I need to "split" them in two A5 scores "compiled" on a single A4 sheet of paper, so having the opportunity to save a two page score would be really useful (see the second attachement, sapete.pdf). As you can see, I managed the situation by saving the score as two png files and "composing" them in a single OpenOfficeOrg document, but the size of the pdf in output is much larger - 221Kb vs 31Kb.
In reply to Post-editing by Aldo
In your sapete.pdf, could you not simply use a 'Staff spacer' from the Breaks & Spacer Palette to create more room between the fifth and sixth staves? Then add those circles and lines in the newly created space. After all, the second page is not flipped upside down like in the auld.pdf attachment.
Concerning the auld.pdf, why is it necessary to flip the second copy upside down? See this attachment which was wholly created in MuseScore on A4 size paper; and, when saved as a pdf, is only 16.5 KB.
Regards.
Edit: oops! Measure numbers are off in the second copy, just change the 'Add to measure no.' from a minus17 to a minus16 in the Measure Properties of the pickup measure of the second copy...
In reply to Why not edit within MuseScore? by Jm6stringer
I tried the solution you are suggesting, but I found that it gives a much less symmetrical result - managing the exact measure of the spacer item is a tedious try-over-and-over task, while OpenOfficeOrg offers a more efficient and precise *numeric* control. Moreover, as soon as the measure layout changes, chances are that the spacer moves here and there and the whole layout has to be rearranged from scratch.
The good news is that MuseScore creates much smaller pdf file, the bad news is that it is not conceived as a tool to control the details of the page layout. That's why I use the direct pdf output of MuseScore whenever I have to create a standard page, but I prefer to export the score in a graphic format whenever I need non-standard formats.
A better svg export feature would be really appreciated as the svg format gives the opportunity to edit the final page layout with great freedom and absolute precision. I admit that it's not an essential feature, though.
In reply to Yes, it's an option by Aldo
...you can search for a free screen ruler.
If you use A4 paper, you can set the ruler's length to the page's vertical or horizontal dimensions. This can really help when used within MuseScore.
I use the portable (no installation required) app: https://sites.google.com/site/rulerhelp/welcome/
See screenshot.
Regards.