# Python library for set class music theory A hopefully useful library for exploring set classes in music theory, of arbitrary tonalities (any number of equal divisions of the octave). ## Run tests To download the code, and run the tests: ``` git clone https://git.jon.geek.nz/public/setclass cd setclass python -m virtualenv .venv source .venv/bin/activate pip install -r requirements-dev.txt tox ``` ## Usage In Python: ```python from setclass import SetClass sc = SetClass(0, 3, 5, 6, 7, 10, 11) # Forte 7-20; pitch classes as integers 0-11 sc.versions sc.rahn_normal_form sc.forte_name sc.duodecimal_notation # SetClass[0,3,5,6,7,T,E] ``` Documentation is generated from the doc comments with Sphinx, and in the meantime is available [here](https://git.jon.geek.nz/docs/public/setclass/setclass.html): ``` make -C docs html ``` ## TODO - Documentation (Sphinx) - Interoperate with music21 objects - Generate MIDI files - Generate LilyPond files for set pitches - Calculate microtonal pitches and frequencies for use with non-dodecal tonalities