Add your description here
Project description
PyTheory: Music Theory for Humans
This (work in progress) library attempts to make exploring music theory approachable to humans.
True Scale -> Pitch Evaluation
>>> from pytheory import TonedScale
>>> c_minor = TonedScale(tonic='C4')['minor']
>>> c_minor
<Scale I=C4 II=D4 III=Eb4 IV=F4 V=G4 VI=Ab4 VII=Bb5 VIII=C5>
>>> c_minor[0].pitch()
523.251130601197
>>> c_minor["I"].pitch(symbolic=True)
440*2**(1/4)
>>> c_minor["tonic"].pitch(temperament='pythagorean', symbolic=True)
14080/27
Audibly play a note (or chord)
>>> from pytheory import play
play(c_minor[0], t=1_000)
Chord Fingerings for Custom Tunings
>>> from pytheory import Tone, Fretboard, CHARTS
>>> tones = (
... Tone.from_string("F2"),
... Tone.from_string("C3"),
... Tone.from_string("G3"),
... Tone.from_string("D4"),
... Tone.from_string("A5"),
... Tone.from_string("E5")
... )
>>> fretboard = Fretboard(tones=tones)
>>>
>>> c_chord = CHARTS['western']["C"]
>>> print(c_chord.fingering(fretboard=fretboard))
(0, 0, 0, 3, 3, 3)
It can also generate charts for all known chords for any instrument (accuracy to be determined!).
✨🍰✨
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytheory-0.2.0.tar.gz
(9.0 kB
view details)
Built Distribution
pytheory-0.2.0-py3-none-any.whl
(10.3 kB
view details)
File details
Details for the file pytheory-0.2.0.tar.gz
.
File metadata
- Download URL: pytheory-0.2.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.28
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91ff9fa3cfe188a0703b673740064eedbf166a21a33cc1817fdd868d393fb0cb |
|
MD5 | 99a1e2059210d035fe94f3acd4fc8fcf |
|
BLAKE2b-256 | c9073614c4b0e6baebdab05578c5b27acde7755901b5ecf996f8a313b3cfb8fe |
File details
Details for the file pytheory-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: pytheory-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.28
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 751bc1048a2d24f8cc2a14d6bdb64e88f42a1d6a03ee8d95077f7700081feab4 |
|
MD5 | 15e39f488ced70bc89fe7f350282e587 |
|
BLAKE2b-256 | 38e081660929b5ae9a47742e9b1f14446dd875d8cd5e00d7db652377b9feeb14 |