mirror of
https://github.com/kennethreitz/pytheory.git
synced 2026-06-21 15:00:57 +00:00
8faff51fc3
An adversarial audit of the theory engine surfaced 23 real bugs across 11 subsystems. This fixes all of them, with regression tests. Highlights: - charts: match chord tones by pitch class, not spelled name — ~60 flat-key voicings (Eb/Ab/Db/Gb, Fm/Cm) were broken 2-string fragments - maqam: Saba had a major 3rd where its diminished 4th (Fab, 32/25) belongs — no 4th degree at all - scales: extreme keys (Gb/F#/C#/Cb) now spell one letter per degree with correct key signatures; octave-transposed chord tones keep their spelling (Eb IV = Ab C Eb, not Ab C D#) - scales: accidental Roman numerals (bVII/bVI/bIII) are chromatic from the parallel major, not double-lowered in minor/modal keys - chords: from_symbol rejects unconsumed suffixes (C7b9, Cmajgarbage) instead of silently mis-parsing; add 7sus4/7sus2; identify 6th chords; 13th drops the avoid-note 11th; weight voicer omissions by importance - play: ensemble render uses an isolated RNG instead of reseeding the global one (fixes render_scores determinism under threads); sub_osc + detune no longer leaks the sub into the main voice - scales: Nashville 'm' forces minor; garbage Roman numerals rejected - chords/scales: negative_harmony spells with flats to match its scale - tones: from_midi round-trips through octave -1; add prefer_flats - diagrams: chord_svg no longer crashes on unidentifiable chords - cli: friendly one-line errors instead of tracebacks (PYTHEORY_DEBUG=1 to re-raise); play()/save() guide Score callers to play_score/save_midi - chords: harmony/dissonance/beat_pulse return floats, not int 0 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
57 lines
1.5 KiB
TOML
57 lines
1.5 KiB
TOML
[project]
|
|
name = "pytheory"
|
|
version = "0.57.0"
|
|
description = "Music Theory for Humans"
|
|
readme = "README.md"
|
|
license = "MIT"
|
|
requires-python = ">=3.10"
|
|
authors = [
|
|
{ name = "Kenneth Reitz", email = "me@kennethreitz.org" },
|
|
]
|
|
classifiers = [
|
|
"Development Status :: 3 - Alpha",
|
|
"Intended Audience :: Developers",
|
|
"Intended Audience :: Education",
|
|
"Topic :: Multimedia :: Sound/Audio",
|
|
"Topic :: Multimedia :: Sound/Audio :: Analysis",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
]
|
|
dependencies = [
|
|
"sounddevice",
|
|
"scipy",
|
|
"rich>=14.3.3",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
live = ["python-rtmidi"]
|
|
link = ["LinkPython-extern"]
|
|
diagrams = ["cairosvg"] # PNG rasterization of SVG fretboard diagrams
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/kennethreitz/pytheory"
|
|
Documentation = "https://pytheory.org"
|
|
Repository = "https://github.com/kennethreitz/pytheory"
|
|
Issues = "https://github.com/kennethreitz/pytheory/issues"
|
|
|
|
[project.scripts]
|
|
pytheory = "pytheory.cli:main"
|
|
|
|
[dependency-groups]
|
|
dev = ["pytest", "LinkPython-extern"]
|
|
docs = ["sphinx", "myst-parser"]
|
|
|
|
[build-system]
|
|
requires = ["setuptools"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]
|
|
|
|
[tool.setuptools]
|
|
packages = ["pytheory"]
|