MarkCWirt / MIDIUtil

A pure Python library for creating multi-track MIDI files
Other
247 stars 49 forks source link

A few design improvements and simplifications #18

Closed meteorsw closed 6 years ago

meteorsw commented 6 years ago

I have made a few improvements to this project. Each changeset is described in the meteorsw_improvements.rst file which I have written and added to this repository.

Wolf-SO commented 6 years ago

Quite impressive speed :)

After having a look into meteorsw_improvements.rst, I know that

[...] after this changset, the external API of MIDIFile remains the same, except it offers an option to allow the user to specify time in ticks instead of quarter notes.

Sadly, Travic CI says that

All checks have failed

Any idea how to fix this?

meteorsw commented 6 years ago

The only build which fails is the one using python-nightly. As far as I can tell, this appears to be some problem with the project's setup.py being somehow incompatible with python-nightly distutils, and is unrelated to my changes. I personally don't use python-nightly builds, so I don't know how to fix.

Wolf-SO commented 6 years ago

@meteorsw I see, thanks for the explanation. Wouldn't it be reasonable to adjust the Travis settings to leave out the python nightly like this - or does this seem too naive to you? (It's just a patch: I wish not to bring in any confusion with a related pull request.)

meteorsw commented 6 years ago

Presumably the original author included python nightly in his Travis CI intentionally. Hiding the problem by just removing it doesn't seem polite. I think it would be good to wait for the original author to look at this pull request, maybe he will have some thoughts on the problem with python nightly CI.

MarkCWirt commented 6 years ago

Hey guys --sorry I've been a bit absent: started a new job a few weeks ago and have been pretty busy!

I'll try to take a gander at the request this weekend. I'm all for improving things (some of this code is pretty old!) but I'd like to understand the failures. IIRC the nightly builds are "the shape of python to come", so I'd like to figure out what's going on there...

Thanks.

--M

MarkCWirt commented 6 years ago

I think the travis nightly builds are broken -- the software unmodified no longer compiles cleanly, and I think the issue may be one at Travis CI. I'm going to remove the nightly build requirement for the time being, as it doesn't seem to be doing anything.

I'll evaluate this pull request in that light.

MarkCWirt commented 6 years ago

OK, looked over the pull request. It's very nice! I wrote a lot of this code almost 10 years ago, and as you can see it was kind of messy.

(I actually prefer having quarter notes as the basic time as opposed to ticks, but that's the way I use the code.)

Anyway, I merged the pull request, but as it's a pretty major change, I decided to push it to develop, as opposed to master. I'll probably do a bit of cleanup before cutting another release, although its a good time to do so.

I created a RTD build of develop, which is available here: http://midiutil.readthedocs.io/en/develop/ I'll need to do some cleanup of the docs (especially in the extending portion) before the code can be pushed to master.

MarkCWirt commented 6 years ago

Merged into develop