Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Music Theory for Humans.

NotificationsYou must be signed in to change notification settings

kennethreitz/pytheory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This (work in progress) library attempts to make exploring music theory approachable to humans.

logo

True Scale -> Pitch Evaluation

>>>from pytheoryimport 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 playplay(c_minor[0], t=1_000)

Chord Fingerings for Custom Tunings

>>>from pytheoryimport 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 alsogenerate charts for all known chords for any instrument (accuracy to be determined!).

✨🍰✨

About

Music Theory for Humans.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors12

Languages


[8]ページ先頭

©2009-2025 Movatter.jp