A hopefully moderately useful library for exploring music set class theory
Find a file
2024-10-15 15:24:05 +13:00
docs Update README with docs 2024-10-15 15:24:05 +13:00
setclass Add Forte prime and name, methods to derive from decimal and forte names, tests 2024-10-12 21:24:10 +13:00
.editorconfig Project editing and testing configuration bumpf 2024-09-20 16:33:43 +12:00
.gitignore Add documentation by Sphinx 2024-09-27 19:29:18 +12:00
.pre-commit-config.yaml Project editing and testing configuration bumpf 2024-09-20 16:33:43 +12:00
LICENCE.md Add README and LICENCE 2024-09-20 16:34:17 +12:00
pyproject.toml Project editing and testing configuration bumpf 2024-09-20 16:33:43 +12:00
pytest.ini Project editing and testing configuration bumpf 2024-09-20 16:33:43 +12:00
README.md Update README with docs 2024-10-15 15:24:05 +13:00
requirements-dev.txt Improve docstrings for Sphinx documentation 2024-10-02 13:51:52 +13:00
requirements.txt Project editing and testing configuration bumpf 2024-09-20 16:33:43 +12:00
tox.ini Move initial story test to use tox and pytest 2024-09-20 20:35:04 +12:00

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:

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:

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