-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change parser to mido #99
Comments
When mido is being used instead, could pretty-midi also expose the MIDI type? It would be very useful for a number of cases, like when synthesizing Lakh with MrsWatson for example. 😄 |
Do you mean the MIDI file type (type 0, type 1)? In what circumstance is this important? |
Yes. For example, MrsWatson only reads type 0 at the moment, and will halt if a type 1 is input. |
Oh, do you mean when writing, being able to specify whether you want to output a type 0 vs type 1 MIDI? Hm, this is out of the scope of this issue for sure (it could be implemented regardless of the backend), but we could potentially consider it. I didn't realize there was any modern software that didn't support type 0. That's sort of a bummer. |
I have this mostly implemented, but I have discovered two MIDI files which are parsed differently by >>> for t in mido.MidiFile('Musica musica.mid').tracks:
... print len(t)
...
4
1
1
7
342
1523
484
1660
682
3550
1094
1466
54
>>> for t in midi.read_midifile('Musica musica.mid'):
... print len(t)
...
6
7
342
1523
484
1660
682
3550
1094
1466
54
720
56 Not sure which one is correct, or where this difference comes from. I can investigate, but it will be slower going than work on |
Please send them! On Sep 29, 2016 10:41 PM, "Colin Raffel" notifications@github.com wrote:
|
Posted an issue on the mido repository in case they have any ideas. mido/mido#62 |
cc @douglaseck, @cghawthorne
The current backend,
python-midi
, does not appear very actively maintained. The last release was over 3 years ago, despite 63 commits since then. The current entry in PyPI is not installable (nothing has been uploaded). There is another entry in PyPI, but it states that it is v0.2.4, which does not appear to be an official release, and either way is almost 2 years out of date. Thepython-midi
PyPI package also is not maintained by the actual package owner.pretty_midi
depends on commits topython-midi
which have happened since v0.2.3, sopretty_midi
is effectively not PIP-installable (not to mention the questionable nature of depending on a PyPI package which is not maintained by the package owner). There doesn't seem to be any activity to solve these issues.Alternatively,
mido
also provides a pure-Python MIDI parser. It was developed afterpython-midi
was created, so usingmido
from the getgo was not an option. It is much more actively maintained, with frequent releases, quick merging of PRs, etc. Assuming there are no package-specific issues, we should switch to usingmido
.The text was updated successfully, but these errors were encountered: