mirror of
https://github.com/kennethreitz/pytheory.git
synced 2026-06-05 06:46:14 +00:00
55f6481937506e78274b76f7a13a61f63d8ea38c
PyTheory: Music Theory for Humans
This (work in progress) library attempt to make exploring music theory approachable to humans.
Usage Example
>>> from pytheory import TonedScale
>>> c_major = TonedScale(tonic='C4').scales['major']
>>> c_major
(<Tone C4>, <Tone D4>, <Tone E4>, <Tone F4>, <Tone G4>, <Tone A5>, <Tone B5>, <Tone C5>)
>>> c_major[0].pitch()
523.251130601197
>>> c_major[0].pitch(symbolic=True)
440*2**(1/4)
>>> c_major[0].pitch(temprament='pythagorean', symbolic=True)
14080/27
✨🍰✨
Description
Languages
Python
100%