$ cat t.py
from pprint import pprint
from pytheory import Tone, Fretboard, charts_for_fretboard
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)
pprint(charts_for_fretboard(fretboard=Fretboard(tones=tones)))
$ python t.py Thu Sep 6 08:40:10 2018
{'A': (4, 2, 2, 0, 0, 0),
'A5': (4, 2, 2, 0, 0, 5),
'A7': (4, 4, 2, 2, 0, 0),
'A9': (1, 6, 2, 4, 0, 2),
'Ab': (3, 1, 1, 1, 4, 4),
'Ab5': (3, 1, 1, 6, 4, 4),
'Ab7': (3, 3, 1, 1, 6, 4),
'Ab9': (0, 5, 1, 3, None, 1),
'Abdim': (3, 0, 1, 2, 3, 0),
'Abm': (3, 0, 1, 6, 3, 4),
'Abm6': (3, 0, 1, 0, 3, 4),
'Abm7': (3, 0, 1, 1, 3, 4),
'Abmaj': (3, None, 1, 6, 2, 4),
'Abmaj7': (3, 3, 1, 1, 2, 4),
'Adim': (0, 1, 2, 3, 0, 5),
'Am': (4, 1, 2, None, 0, 5),
'Am6': (4, 1, 2, 1, 0, 5),
'Am7': (4, 1, 2, 2, 0, 0),
'Amaj': (4, 0, 2, None, 0, 5),
'Amaj7': (4, 0, 2, 2, 0, 0),
'B': (1, 4, 4, 2, 2, 0),
'B5': (6, 4, 4, 2, 2, 0),
'B7': (1, 6, 4, 4, 2, 2),
'B9': (3, None, 1, 6, 2, 4),
'Bb': (0, 3, 3, 3, 6, 6),
'Bb5': (5, 3, 3, 1, 1, 6),
'Bb7': (0, 5, 3, 3, 1, 1),
'Bb9': (2, None, 0, 5, 1, 3),
'Bbdim': (1, 2, 3, 0, 5, 6),
'Bbm': (5, 2, 3, 0, 1, 6),
'Bbm6': (5, 2, 3, 0, 1, 0),
'Bbm7': (0, 2, 3, 0, 5, 6),
'Bbmaj': (5, 1, 3, None, 1, 6),
'Bbmaj7': (0, 1, 3, 3, 4, 6),
'Bdim': (2, 3, 0, 1, 2, 3),
'Bm': (6, 3, 4, 1, 2, None),
'Bm6': (0, 3, 4, 1, 2, 1),
'Bm7': (1, 3, 4, 1, 2, 2),
'Bmaj': (6, 2, 4, 0, 2, None),
'Bmaj7': (1, 2, 4, 0, 2, 2),
'C': (0, 0, 0, 3, 3, 3),
'C5': (0, 0, 5, 3, 3, 1),
'C7': (2, 0, 0, 5, 3, 3),
'C9': (4, 0, 2, None, 0, 5),
'Cdim': (3, 0, 1, 2, 3, 0),
'Cm': (None, 0, 5, 2, 3, 0),
'Cm6': (1, 0, 5, 2, 3, 0),
'Cm7': (2, 0, 0, 2, 3, 0),
'Cmaj': (None, 0, 5, 1, 3, None),
'Cmaj7': (2, 0, 0, 1, 3, 3),
'D': (2, 2, 0, 0, 0, 3),
'D5': (2, 2, 0, 0, 5, 3),
'D7': (4, 2, 2, 0, 0, 5),
'D9': (6, 2, 4, 0, 2, None),
'Db': (1, 1, 1, 4, 4, 4),
'Db5': (1, 1, 6, 4, 4, 2),
'Db7': (3, 1, 1, 6, 4, 4),
'Db9': (5, 1, 3, None, 1, 6),
'Dbdim': (0, 1, 2, 3, 0, 5),
'Dbm': (0, 1, 6, 3, 4, 1),
'Dbm6': (0, 1, 0, 3, 4, 1),
'Dbm7': (0, 1, 1, 3, 4, 4),
'Dbmaj': (None, 1, 6, 2, 4, 0),
'Dbmaj7': (3, 1, 1, 2, 4, 0),
'Ddim': (1, 2, 3, 0, 5, 6),
'Dm': (1, 2, None, 0, 5, 2),
'Dm6': (1, 2, 1, 0, 5, 2),
'Dm7': (1, 2, 2, 0, 0, 2),
'Dmaj': (0, 2, None, 0, 5, 1),
'Dmaj7': (0, 2, 2, 0, 0, 5),
'E': (4, 4, 2, 2, 0, 0),
'E5': (4, 4, 2, 2, 0, 0),
'E7': (6, 4, 4, 2, 2, 0),
'E9': (None, 1, 6, 2, 4, 0),
'Eb': (3, 3, 3, 6, 6, 6),
'Eb5': (3, 3, 1, 1, 6, 4),
'Eb7': (5, 3, 3, 1, 1, 6),
'Eb9': (None, 0, 5, 1, 3, None),
'Ebdim': (2, 3, 0, 1, 2, 3),
'Ebm': (2, 3, 0, 1, 6, 3),
'Ebm6': (2, 3, 0, 5, 0, 5),
'Ebm7': (2, 3, 0, 5, 6, 6),
'Ebmaj': (1, 3, None, 1, 6, 2),
'Ebmaj7': (1, 3, 3, 4, 6, 6),
'Edim': (3, 0, 1, 2, 3, 0),
'Em': (3, 4, 1, 2, None, 0),
'Em6': (3, 4, 1, 2, 1, 0),
'Em7': (3, 4, 1, 2, 2, 0),
'Emaj': (2, 4, 0, 2, None, 0),
'Emaj7': (2, 4, 0, 2, 2, 0),
'F': (0, 0, 3, 3, 3, 6),
'F5': (0, 5, 3, 3, 1, 1),
'F7': (0, 0, 5, 3, 3, 1),
'F9': (0, 2, None, 0, 5, 1),
'Fdim': (0, 1, 2, 3, 0, 5),
'Fm': (0, 5, 2, 3, 0, 1),
'Fm6': (0, 5, 2, 3, 0, 1),
'Fm7': (0, 0, 2, 3, 0, 5),
'Fmaj': (0, 5, 1, 3, None, 1),
'Fmaj7': (0, 0, 1, 3, 3, 4),
'G': (2, 0, 0, 0, 3, 3),
'G5': (2, 0, 0, 5, 3, 3),
'G7': (2, 2, 0, 0, 5, 3),
'G9': (2, 4, 0, 2, None, 0),
'Gb': (1, 1, 4, 4, 2, 2),
'Gb5': (1, 6, 4, 4, 2, 2),
'Gb7': (1, 1, 6, 4, 4, 2),
'Gb9': (1, 3, None, 1, 6, 2),
'Gbdim': (1, 2, 3, 0, 5, 6),
'Gbm': (1, 6, 3, 4, 1, 2),
'Gbm6': (1, 0, 3, 4, 1, 2),
'Gbm7': (1, 1, 3, 4, 4, 6),
'Gbmaj': (1, 6, 2, 4, 0, 2),
'Gbmaj7': (1, 1, 2, 4, 0, 5),
'Gdim': (2, 3, 0, 1, 2, 3),
'Gm': (2, None, 0, 5, 2, 3),
'Gm6': (2, 1, 0, 5, 2, 3),
'Gm7': (2, 2, 0, 0, 2, 3),
'Gmaj': (2, None, 0, 5, 1, 3),
'Gmaj7': (2, 2, 0, 0, 5, 6)}
CARVIEW |
Select Language
HTTP/2 200
date: Thu, 31 Jul 2025 06:32:10 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"77e0c909bcac6a2422a927566fb82608"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=c1YNGs2cfiAEkXYlyPq2hDQbf6PntTX230%2B7MXieJ41xpBozzVc2QoJuB%2B2dydj1M9mmKNHE6wi%2FLnX%2Ff04lo6O9%2B3EPP9fObcymnljHppTIfZ50P5J6EW%2BmFmBI3yEU2YGXhLcbRTulH6RzGhKLmbhs7v4LWTxoJTvP%2Fu4cYZxwQNqV17IQ%2F%2BwJ2ets9NlsppcPXX%2B0IHSr%2BamvTdtj7b6h4i4a4ZxgjQO4jRdQ6UN3L8Dc%2BV3Q3lb0U7IxsM2W%2F1XZ%2F0HPthquvfocbayoCA%3D%3D--MMoaDgQDGGU244mU--9L5sdDNkz6NdMmYe2xh2WQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.563924202.1753943529; Path=/; Domain=github.com; Expires=Fri, 31 Jul 2026 06:32:09 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 31 Jul 2026 06:32:09 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 8CCA:2291D2:4238B8:55852F:688B0DE9
test.md · GitHub
Show Gist options
Save kennethreitz/b363660145064fc330c206294cff92fc to your computer and use it in GitHub Desktop.
{{ message }}
Instantly share code, notes, and snippets.
Created
September 6, 2018 12:41
-
Star
7
(7)
You must be signed in to star a gist -
Fork
1
(1)
You must be signed in to fork a gist
-
Save kennethreitz/b363660145064fc330c206294cff92fc to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can’t perform that action at this time.