Music-theory domain: notes, chords, intervals, scales, harmonic function.
Project description
music-dsl
Pure music-theory domain library: notes, intervals, scale degrees, chord
qualities, scales, and chord encoding. Zero runtime dependencies. This is the
Python reference implementation; TypeScript (@tonalis/music-dsl on npm) and
Rust (tonalis-music-dsl on crates.io) ports conform to the same spec and a shared
429-case conformance suite plus a seeded three-way differential fuzzer.
music-dsl is the theory core underneath tonalis,
the format-agnostic lead-sheet DSL, and is fully usable on its own.
Install
pip install tonalis-music-dsl
Use
from music_dsl import Key, Notes, Scales
key = Key(Notes.Bb, Scales.Major)
# deeper theory lives in submodules
from music_dsl.domain.chords.chord import Chord
chord = Chord("C7") # raises InvalidChordStringException on bad input
print(chord.encoding) # canonical numeric chord encoding
The import name is music_dsl (underscore); the distribution name is
tonalis-music-dsl.
Links
- Source, spec, and conformance suite: https://github.com/drycode/tonalis
- License: MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tonalis_music_dsl-0.1.0.tar.gz.
File metadata
- Download URL: tonalis_music_dsl-0.1.0.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba2c280aed285d534f0af343b8740a95032e915a0112c31cee21c15a7a0a2fb3
|
|
| MD5 |
390aacbf6199ab8a6fd2eed8f1aec898
|
|
| BLAKE2b-256 |
6fd5d58d3a0b7f5754202dc8ac6af0fbfb4ba447685156913a25a1e8b8f9111e
|
File details
Details for the file tonalis_music_dsl-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tonalis_music_dsl-0.1.0-py3-none-any.whl
- Upload date:
- Size: 30.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d72232211fca25de8bff2725537bd33a9a7316d1bb9a21a9308457f762233322
|
|
| MD5 |
07babbf155e8d8cf50993b1baf159302
|
|
| BLAKE2b-256 |
e8f9730a334bef9a5a513ebd19a4d564961e94754265f5feb9e8e2cfb783d071
|