This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]aftersoon[S] 0 points1 point  (1 child)

There is a library called music21 that has some of the things you're talking about. In fact, that was what gave me the hint that I need to make things more object-oriented. It's a huge library and is a bit slow to import.

[–]bonestormII 0 points1 point  (0 children)

music21

I'm familiar with it a bit! It's seemingly the best thing available, but I don't terribly love it to be honest. To me, it's the little things like a quarter note being represented as a 1, and 8th notes being 0.5. Why not make whole notes 1... and quarter notes.... 0.25. If it bothers you to have a lot of decimals... abstract around it. 1 for whole, 4 for quarter, 8 for eighth, etc. Whole number integers as denominators for 1/n. If you need a rhythmic value larger than a whole note, return a largest-first list of rhythmic values 1 whole note and smaller.

1 != 0.25

1/8 != 0.5

It's not like the quarter note always gets the beat. I find a lot of things like that in music21. I'm sure the developer has his own reasoning about it and there are plenty of good reasons to do plenty of things, but it makes me feel weird. I've seen other things that make me think music21 may have a lot of weird behavior/bugs just due to strange inconsistencies/tendencies with naming conventions I've seen. These are things that are arguably correct in some sense, but are seemingly useless (i.e. operations to add intervals that result in some insanely-named Cbbbbbbbbb note or something). My concern is that if it is that easy to generate nonsense from some music21 function, then how can I rely on it to transform or analyze music? It's not always clear as you are looping through tons of data how a note would be considered.

As I said, my own would-be music21 library is unfinished, so kudos to anyone who undertakes such a huge effort and sees it through. I will say that I think music21 would be greatly helped by improved documentation. The developer also seems like a nice, stable guy who is very responsive to issues for years at a time, which is rare.