AI Research
bachx project
I'm building the framework of a music analysis AI agent for the Bach chorale corpus. Using harmonic analyses from the "When in Rome" project (thank you Mark Gotham), I'm developing a self-hosted chat agent around the Qwen LLM. Over the next few weeks I hope to expand the project by tuning it, and adding additional layers of music-theoretic knowledge on top of the existing harmonic analysis. Hopefully this will be useful not just because it's very cool but also as a way to teach students more about how to interact with AI, and about Bach!
The Latest: July 2026
I'm building some new queries and moving from a 7b to a 32b model. Very grateful to have an M5 with 48GB memory at my disposal, for working on this fascinating project!
bachx> what often follows ii?
Harmonic events that often follow ii include viio6 (53 times), V6 (11
times), V6/5 (9 times), V7 (9 times), V (8 times), I6 (4 times), ii (3
times), V2 (2 times), ii6 (2 times), and iii (2 times).
bachx> What usually precedes V?
The harmonies that usually precede V are as follows: I precedes V 115
times, i precedes V 80 times, I6 precedes V 71 times, ii6/5 precedes V 69
times, V6 precedes V 43 times, ii/o6/5 precedes V 43 times, IV precedes V
36 times, V precedes V 31 times, i6 precedes V 26 times, and ii7 precedes
V 23 times. 

