Mass convert songs from .ABC to .MSCZ
I came across Paul Hardy's Session Tunebook
http://www.pghardy.net/concertina/tunebooks/#session
It is a collection of celtic tunes which is available as PDF and in ABC format. I would like to convert it to MuseScore MSCZ.
There's one ABC file that contains all 500+ songs, which is pretty common for ABC collections like this.
Copy/pasting the songs one by one into MuseScore's ABC Import pluging works well, but is inonvenient for such a big number of songs.
I tried abc2xml from http://wim.vree.org/svgParse/abc2xml.html. This creates one XML per song, but has some issues with file names and score properties. They are processed, but not shown in MuseScore where I expect them.
Any ideas what else I coud try?
Is it possible to apply MuseScore features to a big number of files e.g. by command line calls?
Things like transferring meta data from Score Properties to the Title box of the score, apply a common style from a .MSS file, format all scores with 4 measures per line and so on.
Comments
You can call plugins from the command line, see https://musescore.org/en/handbook/command-line-options-0
Wim Vree's ABC2XML is the best converter around. It's open source, so if it doesn't export something you can modify it.
You should be able to apply a style to a MuseScore file from the command line. You can also run a plugin from the command line (and it could do the 4 measures per line, not sure for the title)
See https://musescore.org/en/node/38301
I was very successful using abc2xml. Willem Vree is a very friendly, helpful and competent guy who added a number of great improvements in his converter.
The last missing step now is converting the Music XML files to .MSCZ. When I try to apply changes to the layout from an mss file by calling
MuseScore.exe MySong.xml -o MySong.mscz -S MyStyle.mss
that doesn't work because the text style changes from MyStyle.mss are not used in the score. When I open the "Edit Text Styles" dialog, the changed values are shown. But they are not effective for the displayed score.
That was already reported earlier:
https://musescore.org/en/node/152966
https://musescore.org/en/node/152921
Can I use a template instead? How can I tell MuseScore what template to use for converting xml in a command line as above?
In reply to I was very successful using by SqueezeBoxer
No. But #152921: Text styles do not update when loading style is a duplicate of #118731: Text styles not applied after Load Style... and that is fixed in the next version of MuseScore, you could try a nightly build.
In reply to No. But #152921: Text styles by Jojo-Schmitz
So fast. I'm impressed. Thank you.
I gave it a very rough try with today's nightly build and my existing .mss file (see attachment) that I exported a while ago from MuseScore 2.0.3
Text Style Results:
.mss applied via -S option on the command line
Bar Number - Offset Vertical: OK
Tempo - Offset Horizontal: not OK
Chord Symbol - Text Size: not OK
.mss applied via menu Style - Load Style...
Bar Number - Offset Vertical: OK
Tempo - Offset Horizontal: OK
Chord Symbol - Text Size: not OK
In reply to So fast. I'm impressed. Thank by SqueezeBoxer
So I've reopened #118731: Text styles not applied after Load Style...
In reply to I was very successful using by SqueezeBoxer
abc2xml creates .XML with fixed line breaks as I want them. Just the score lines are a bit too wide so that MuseScore adds additional automatic line breaks.
Select all and calling Layout - Decrease Stretch once or twice fixes that. Is there any possibilty to do that automatically in converter mode? I need to apply that on more than 400 song files.
In reply to abc2xml creates .XML with by SqueezeBoxer
The stretch setting alters the music spacing, so you can simply alter that via Style / General / Measure / Spacing. Reduce that, save as an MSS file, and specify that on the command line when doing your conversion. Although you might find it more effective to instead reduce the staff size.
In reply to The stretch setting alters by Marc Sabatella
Thanks a lot. That solved it.
en-us: "Style / General / Measure / Spacing"
en-gb: "Style / General / Bar / Spacing"
de: "Stil / Allgemein... / Takt / Abstände"