43

GitHub - kennethreitz/pytheory: Music Theory for Humans.

 5 years ago
source link: https://github.com/kennethreitz/pytheory
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

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

✨?✨


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK