A hopefully moderately useful library for exploring music set class theory
Find a file
Jonathan Harker a85898b416 Add Forte prime and name, methods to derive from decimal and forte names, tests
- Add properties for Forte prime (include inversions) and Forte name
 - Create set class objects from the Forte name or decimal
 - Fix brightest_form to use most packed to the right
 - Add a dictionary of (hopefully correct!) FORTE_PRIMES
 - Add tests to improve coverage
2024-10-12 21:24:10 +13:00
docs Improve docstrings for Sphinx documentation 2024-10-02 13:51:52 +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 2024-09-20 20:46:31 +12: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.brightest_form
sc.darkest_form
sc.duodecimal_notation  # SetClass[0,3,5,6,7,T,E]

Proper library documentation to come soon with Sphinx.

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