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.1.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.1-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tonalis_music_dsl-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 c69086976f6f3cd5a830f81a7701195d0e20bc9576e1d37cbb922658f938a3ae
MD5 9e664a2657bfadab30632310682beff5
BLAKE2b-256 9c48b7d5d735d27e663ae255aa82060d531694dda79c03f2b6878dee148dfc75

See more details on using hashes here.

Provenance

The following attestation bundles were made for tonalis_music_dsl-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tonalis_music_dsl-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3bc084396ee8e83233f51714f2494e2a9cfe1c4e7054a6c7bf2c9b722255e0ce
MD5 58c63e2b5dffa537b3d0f4508a495130
BLAKE2b-256 aff047f3de3428c476bdbf839ca9df54cc20f42fff6af83b5bcbac4abe592623

See more details on using hashes here.

Provenance

The following attestation bundles were made for tonalis_music_dsl-0.1.1-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

0.1.2

2 files

This release

0.1.1 This release

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