The Mudcat Café TM
Thread #122194 Message #4053355
Posted By: GUEST,raysa
18-May-20 - 01:46 PM
Thread Name: Tech: convert ABC to MusicXML?
Subject: RE: Tech: convert ABC to MusicXML?
My problem converting abc to xml using abc2mxl.py is that resultant xml files do not recognise the line-lengths in the abc originals, so the output is not as intended - new lines in awkward places, single bars in the last line, etc.
I've tried using the abc2xml -b option, which is supposed to set the default line break character to EOL instead of $, but it has no effect.
On a few abc files I've tried manually adding $ to the end of each music line and that works, but I have a library of over 3,000 tunes to convert so it is not feasible to do this to them all individually.
Using sed scripts to add the $ is no good because it adds the character to all the lines which are not actual music lines (Instructions, Voice numbers, etc) which break or spoil the resultant xml.
How can I get the abc2xml conversion to recognise the line breaks in abc files which were written in the normal abc standard with just an "Enter" to start the new lines where intended?