Reviewers: benrg, Message: Actually, I didn't rewrite it - as the comment above suggests - this was from Ben Rudiak-Gould.
I am helping him at least get some discussion review of his code submission. This patch has not been patchy-tested and I have just included everything (i.e. also the .mid files) that were provided by Ben. I have put them in the place that I thought might be appropriate but I don't really know if this is right or not. Description: Rewrite of Midi.c in Python I rewrote midi.c in Python and tested it on the largest midi file in IMSLP [1]. On my laptop it takes about 200 ms instead of 50 ms to load the file, but that's a small fraction of midi2ly's four-second runtime, and there are a lot of optimizations that can be done in midi2ly itself. (For example, memoizing the creation of Duration objects saves about 500 ms.) I think getting rid of the sole occupant of usr/lib/lilypond/current/python is worth it. Please review this at https://codereview.appspot.com/7016046/ Affected files: A scripts/midi.py A scripts/test-all-valid-sequences.mid A scripts/test-error-empty.mid A scripts/test-error-initial-repeat.mid A scripts/test-error-mthd-bad-magic.mid A scripts/test-error-mthd-length-5.mid A scripts/test-error-mthd-truncated-1.mid A scripts/test-error-mthd-truncated-2.mid A scripts/test-error-mthd-truncated-3.mid A scripts/test-error-mtrk-bad-magic.mid A scripts/test-error-mtrk-truncated-1.mid A scripts/test-error-mtrk-truncated-2.mid A scripts/test-error-mtrk-truncated-3.mid _______________________________________________ lilypond-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-devel
