{"id":13595760,"url":"https://github.com/kennethreitz/pytheory","last_synced_at":"2026-04-02T15:57:39.119Z","repository":{"id":50793369,"uuid":"146587055","full_name":"kennethreitz/pytheory","owner":"kennethreitz","description":"Music Theory for Humans.","archived":false,"fork":false,"pushed_at":"2024-11-17T11:28:04.000Z","size":521,"stargazers_count":1492,"open_issues_count":4,"forks_count":79,"subscribers_count":72,"default_branch":"master","last_synced_at":"2025-05-09T10:13:29.470Z","etag":null,"topics":["hacktoberfest","music","music-theory","python","scales","sympy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kennethreitz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"kennethreitz","thanks_dev":"kennethreitz","custom":"https://cash.app/$KennethReitz"}},"created_at":"2018-08-29T10:59:32.000Z","updated_at":"2025-04-30T09:30:48.000Z","dependencies_parsed_at":"2024-08-01T16:40:19.453Z","dependency_job_id":"07f5e9a7-a8c8-4fb8-b7ee-4f4528b6d571","html_url":"https://github.com/kennethreitz/pytheory","commit_stats":{"total_commits":45,"total_committers":7,"mean_commits":6.428571428571429,"dds":"0.15555555555555556","last_synced_commit":"39aa185f194cfcc1f9f02d47b0dc752e81215808"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethreitz%2Fpytheory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethreitz%2Fpytheory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethreitz%2Fpytheory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethreitz%2Fpytheory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kennethreitz","download_url":"https://codeload.github.com/kennethreitz/pytheory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076848,"owners_count":22010611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","music","music-theory","python","scales","sympy"],"created_at":"2024-08-01T16:01:57.108Z","updated_at":"2026-04-02T15:57:39.074Z","avatar_url":"https://github.com/kennethreitz.png","language":"Python","funding_links":["https://github.com/sponsors/kennethreitz","https://thanks.dev/kennethreitz","https://cash.app/$KennethReitz"],"categories":["Python","Music Theory and Composition","Music"],"sub_categories":["Music","Programming"],"readme":"# PyTheory: Music Theory for Humans\n\nThis (work in progress) library attempts to make exploring music theory approachable to humans.\n\n![logo](https://github.com/kennethreitz/pytheory/raw/master/ext/pytheory-small.png)\n\n## True Scale -\u003e Pitch Evaluation\n\n```pycon\n\u003e\u003e\u003e from pytheory import TonedScale\n\n\u003e\u003e\u003e c_minor = TonedScale(tonic='C4')['minor']\n\n\u003e\u003e\u003e c_minor\n\u003cScale I=C4 II=D4 III=Eb4 IV=F4 V=G4 VI=Ab4 VII=Bb5 VIII=C5\u003e\n\n\u003e\u003e\u003e c_minor[0].pitch()\n523.251130601197\n\n\u003e\u003e\u003e c_minor[\"I\"].pitch(symbolic=True)\n440*2**(1/4)\n\n\u003e\u003e\u003e c_minor[\"tonic\"].pitch(temperament='pythagorean', symbolic=True)\n14080/27\n```\n\n## Audibly play a note (or chord)\n\n    \u003e\u003e\u003e from pytheory import play\n    play(c_minor[0], t=1_000)\n\n\n## Chord Fingerings for Custom Tunings\n\n```pycon\n\u003e\u003e\u003e from pytheory import Tone, Fretboard, CHARTS\n\n\u003e\u003e\u003e tones = (\n...     Tone.from_string(\"F2\"),\n...     Tone.from_string(\"C3\"),\n...     Tone.from_string(\"G3\"),\n...     Tone.from_string(\"D4\"),\n...     Tone.from_string(\"A5\"),\n...     Tone.from_string(\"E5\")\n... )\n\n\u003e\u003e\u003e fretboard = Fretboard(tones=tones)\n\u003e\u003e\u003e\n\u003e\u003e\u003e c_chord = CHARTS['western'][\"C\"]\n\n\u003e\u003e\u003e print(c_chord.fingering(fretboard=fretboard))\n(0, 0, 0, 3, 3, 3)\n```\n\nIt can also [generate charts for all known chords](https://gist.github.com/kennethreitz/b363660145064fc330c206294cff92fc) for any instrument (accuracy to be determined!).\n\n✨🍰✨\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennethreitz%2Fpytheory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkennethreitz%2Fpytheory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennethreitz%2Fpytheory/lists"}