[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: musicxml merge
Re: musicxml merge
Thu, 13 Sep 2007 13:19:32 +0200
Am Donnerstag, 13. September 2007 schrieb Han-Wen Nienhuys:
> + # Allow the user to leave out the .xml on the filename
> + filename = get_existing_filename_with_extension (args, "xml")
> + if not os.path.exists (filename):
> + print "Unable to find input file %s" % args
> print is being deprecated in python 2.6; better use
Okay. I better use the progress(...) function, which does exactly that..
> + if filename[-1] == '.':
> + filename += "xml"
> + elif not re.match ("\.xml$", filename):
> + filename += ".xml"
> this looks a bit strange.
> Do you mean a boolean or here?
No, I'm checking the filename and appending .xml if it's not there (or only
xml if the filename already ends in a "."). The logic is:
If file with given filename exists => Use that filename
If not exists:
append "xml" if it ends in a dot (because of shell auto-completion) or
append ".xml" if it does not end in .xml, either.
> - d.duration_log = mxl_note.get_duration_log ()
> + duration_log = mxl_note.get_duration_log ()
> + if duration_log:
> + d.duration_log = mxl_note.get_duration_log ()
> + else:
> would it be good to print a warning for this? Perhaps you could also
> mark the note in the .ly file.
I think I found the problem (I had it with a 40.000 lines musicxml scan, so it
was not so easy to find the culprit): Grace notes don't have any duration
set. As long as musicxml2ly does not convert grace notes, it's probably best
to write out a warning (and even after that, whenever such a case occurs,
it's apparently a bug in musicxml2ly).
> +# empty
> +# UGH UGH
> +include $(make-dir)/lilypond-vars.make
> why is this needed?
mainly because the binaries are defined there...
> also, if you feel adventurous, you could look into getting the
> musicxml files into the regtest; I'll have a look at it when possible,
> but it will probably be end of september earliest.
The main problem I ran into was how to create pdfs from the .ly files. I had
hoped that simply giving the .pdf files as targets would build the .ly files
from the .xml and then the .pdf from .ly, but apparently I'm missing
something in the makefiles for this to work.
Reinhold Kainhofer, Vienna University of Technology, Austria
email: address@hidden, http://reinhold.kainhofer.com/
* Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
* K Desktop Environment, http://www.kde.org, KOrganizer maintainer
* Chorvereinigung "Jung-Wien", http://www.jung-wien.at/
- Re: musicxml merge,
Reinhold Kainhofer <=