I have been trying to explore music theory concepts programmatically, namely through music21 software, but I've run into a lot of trouble. Are there any other frameworks for this?
I was not aware of music21, but it looks interesting. Another, somewhat older, Java-based framework is Rubato. I am using it in my thesis research, but I do not know how much it is currently being maintained.
I am the author of another Python-based system called Sebastian https://github.com/jtauber/sebastian but it's at a very early stage. I'd be interested to know what you felt want lacking in music21 in case Sebastian could (eventually) meet your needs better.