42 lines
928 B
Markdown
42 lines
928 B
Markdown
# 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.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
|