Gene Gajewski

Personal Blog

Search
Close this search box.

I have had to reconsider and retrench my decision on using the music21 python package. It is an interesting concept – a library of python functions for analyzing music. Unfortunately, it is not ready for prime time. I had a bear of a time getting it to work with musedata files at all. It seems at one point the author had issue with the site hosting the musedata files I was interested in and stopped maintaining the code for those types of files. Not good.

To get music21 to parse a musedata file I had to go as far as running python in debug mode, something I had not expected to do. Despite its popularity, python is not the scripting panacea it makes itself out to be. Debugging the music21 module was not easy – python, for some reason, does not prefer to allow you to debug python packaged ‘modules’. It has something to do with python’s namespace and object isolation.

Python has more than a few warts. Now I can see why all the script kiddies play with node.js – it is a little less of a hassle. If I wanted to worry about code/object isolation and all that, I would just write my code in C++. I guess being able to execute a (python) function from a terminal prompt is cool – just not that cool.

The other thing I noticed was the top-down design of the code. I should have guessed that this would be the case. This is not the first time I have run into code written by academic types. It makes debugging a bit harder. Better to build your code from the bottom up. Larger things build upon smaller things.

Back to muse.

I revisited musescore.org and I did happen to find the other missing movements to Beethoven’s 5th symphony. Good. At least I can move on and get the current project done.

Leave a Reply

Share the Post: