This software was developed during my MSc and PhD projects. I may continue to use and develop it now that these are over, but its development will not be very active from now on.
Structural analysis of the harmony of chord sequences can be performed using linguistic grammars. I have implemented a parser specially for chord sequences using a combinatory categorial grammar (CCG) to analyse the structure underlying the harmony. Despite its name, it's not restricted to parsing jazz, though the models already trained are optimized for jazz standards!
The parser is written in Python and is open source, licensed under the GPL v3.
Getting the Parser
The code is available as a tarball:
Check that you have the dependencies listed below. The parser requires no installation. Extract the downloaded tarball to a location of your choosing using tar or another archive reader. For example:
tar zxf jazzparser-3.1.tar.gz
This should produce a directory called jazzparser. The guides on this website will assume that this is located in your home directory ~/jazzparser/. If not, you'll need to alter the paths as appropriate.
Aside from the source code, the release also contains input data, including my annotated corpus of jazz chord sequences, and the parsing models trained on this corpus.
Latest Unreleased Code
If you want the cutting edge, probably less stable, version of the code, you can get hold of it from the Github repository.
At the moment, the only things you'll need to be able to run the parser are
Python >= 2.61
Using the Parser
First, check that the parser runs.
cd ~/jazzparser/bin ./jazzparser
This should give you some information about parameters, followed by a prompt to enter a chord sequence:
Enter chord sequence: #
If this works, you're ready to follow the introductory guide:
There's not much documentation at the moment. Here are some pages on specific subjects:
ChartInspector introduces the graphical chart inspector tool
Config file usage for storing parameters
Extending the Parser
The Python source code is all in the download. You are welcome to extend the parser (under the terms of its GPL license) or use its Python API. If you're using it for anything, I'd love to hear about it.
CodeStructure: for developers, provides an overview of the modular structure of the codebase
API documentation for the whole codebase
See TheoryDocuments for details of the theory.
I'm using Python 2.7 myself, but I believe all my code is compatible with 2.6. If you try running it using 2.6 and have problems, please let me know and I'll try to make it compatible. (1)