Skip to main content

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 433-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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tonalis_music_dsl-0.1.2.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tonalis_music_dsl-0.1.2-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file tonalis_music_dsl-0.1.2.tar.gz.

File metadata

  • Download URL: tonalis_music_dsl-0.1.2.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for tonalis_music_dsl-0.1.2.tar.gz
Algorithm Hash digest
SHA256 55932b4c88dcf8662c7ec2f16c023d7f3e218111f826880f51ee79c6efaf86b5
MD5 521805e79746198fd4468f08cdb855c6
BLAKE2b-256 f04c5f16299b61c0a6f74531118834450fd2388910793e6bce1b5e3cd5fce2e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for tonalis_music_dsl-0.1.2.tar.gz:

Publisher: release.yml on drycode/tonalis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tonalis_music_dsl-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for tonalis_music_dsl-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 55bff1a738eadb969d9b4ccf1b720924ec978cab7f67cf46c90ebb625780f6df
MD5 afcc66f397795923cb786385de49c9a7
BLAKE2b-256 9447fb3cd588daad4437064779c11db1cf013a3f58e24f27d2f2f1fb260a92bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for tonalis_music_dsl-0.1.2-py3-none-any.whl:

Publisher: release.yml on drycode/tonalis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page