Skip to main content

Pythagoras Chords v0.1.2

How to Use

from pythagoraschords import PythagorasChords

pc = PythagorasChords("A")

print(pc.get_number())
print(pc.get_tone())
print(pc.get_major_scale())
print(pc.get_major_triad_scale())
print(pc.get_diatonic_extended_chords())
print(pc.get_diatonic_extended_chord(0))
print(pc.get_diatonic_extended_degree(0,0))

Output:

0
A
['A', 'B', 'C♯', 'D', 'E', 'F♯', 'G♯']
[['A', 'C♯', 'E'], ['B', 'D', 'F♯'], ['C♯', 'E', 'G♯'], ['D', 'F♯', 'A'], ['E', 'G♯', 'B'], ['F♯', 'A', 'C♯'], ['G♯', 'B', 'D']]
[['A', 'C♯', 'E', 'G♯', 'B', 'D', 'F♯'], ['B', 'D', 'F♯', 'A', 'C♯', 'E', 'G♯'], ['C♯', 'E', 'G♯', 'B', 'D', 'F♯', 'A'], ['D', 'F♯', 'A', 'C♯', 'E', 'G♯', 'B'], ['E', 'G♯', 'B', 'D', 'F♯', 'A', 'C♯'], ['F♯', 'A', 'C♯', 'E', 'G♯', 'B', 'D'], ['G♯', 'B', 'D', 'F♯', 'A', 'C♯', 'E']]
['A', 'C♯', 'E', 'G♯', 'B', 'D', 'F♯']
A

get_number()

    number
    0:A, 1:A#, 2:B, 3:C, 4:C#, 5:D, 6:D#, 7:E, 8:F, 9:F#, 10:G, 11:G#

get_tone(sharp_flat = False)

    sharp_flat
    false: notes_all_sharp (♯)
    true: notes_all_bemol (♭)

get_major_scale(sharp_flat = False)

    sharp_flat
    false: notes_all_sharp (♯)
    true: notes_all_bemol (♭)

get_major_triad_scale(triad = 0, sharp_flat = False)

    triad
    0:T, 1:2th, 2:3th, 3:4th, 4:5th, 5:6th, 6:7th

    sharp_flat
    false: notes_all_sharp (♯)
    true: notes_all_bemol (♭)

get_diatonic_extended_chords(sharp_flat = False)

    sharp_flat
    false: notes_all_sharp (♯)
    true: notes_all_bemol (♭)

get_diatonic_extended_chord(sub_scale = 0, sharp_flat = False)

    sub_scale
    0:T, 1:2th, 2:3th, 3:4th, 4:5th, 5:6th, 6:7th
    T   [0, 4, 7, 11, 2, 5, 9]
    2th [2, 5, 9, 0, 4, 7, 11]
    3th [4, 7, 11, 2, 5, 9, 0]
    4th [5, 9, 0, 4, 7, 11, 2]
    5th [7, 11, 2, 5, 9, 0, 4]
    6th [9, 0, 4, 7, 11, 2, 5]
    7th [11, 2, 5, 9, 0, 4, 7]

    sharp_flat
    false: notes_all_sharp (♯)
    true: notes_all_bemol (♭)

get_diatonic_extended_degree(sub_scale = 0, note = 0, sharp_flat = False)

    Returns a specific degree (note) of an extended diatonic chord within the diatonic scale generated for this key.

    sub_scale
    0:T, 1:2th, 2:3th, 3:4th, 4:5th, 5:6th, 6:7th
    T   [0, 4, 7, 11, 2, 5, 9]
    2th [2, 5, 9, 0, 4, 7, 11]
    3th [4, 7, 11, 2, 5, 9, 0]
    4th [5, 9, 0, 4, 7, 11, 2]
    5th [7, 11, 2, 5, 9, 0, 4]
    6th [9, 0, 4, 7, 11, 2, 5]
    7th [11, 2, 5, 9, 0, 4, 7]

    note
         0, 1, 2, 3, 4, 5, 6
    T   [0, 4, 7, 11, 2, 5, 9]
    2th [2, 5, 9, 0, 4, 7, 11]
    3th [4, 7, 11, 2, 5, 9, 0]
    4th [5, 9, 0, 4, 7, 11, 2]
    5th [7, 11, 2, 5, 9, 0, 4]
    6th [9, 0, 4, 7, 11, 2, 5]
    7th [11, 2, 5, 9, 0, 4, 7]

    sharp_flat
    false: notes_all_sharp (♯)
    true: notes_all_bemol (♭)

A

Musical name: La
Semitone number: 0

A♯ / A# / AS / BB / B♭

Musical names:
La sharp (A♯)
Si flat (B♭)
Semitone number: 1

B

Musical name: Si
Semitone number: 2

C

Musical name: Do
Semitone number: 3

C♯ / C# / CS / DB / D♭

Musical names:
Do sharp (C♯)
Re flat (D♭)
Semitone number: 4

D

Musical name: Re
Semitone number: 5

D♯ / D# / DS / EB / E♭

Musical names:
Re sharp (D♯)
Mi flat (E♭)
Semitone number: 6

E

Musical name: Mi
Semitone number: 7

F

Musical name: Fa
Semitone number: 8

F♯ / F# / FS / GB / G♭

Musical names:
Fa sharp (F♯)
Sol flat (G♭)
Semitone number: 9

G

Musical name: Sol
Semitone number: 10

G♯ / G# / GS / AB / A♭

Musical names:
Sol sharp (G♯)
La flat (A♭)
Semitone number: 11

Note

  • This algorithm is public domain under the CC0 license.
  • The logic is entirely original and was not generated by AI, ensuring that it is not an indirect copy of third‑party work.
  • I affirm that this algorithm is public, and anyone may use it for any purpose.

Thanks

  • I dedicate this work to my family, my friends, and the churches where I learned musical logic in Brazil, São Paulo, Jardim Eliza Maria.
  • I thank J.L. Donadeli for giving me several guitar tips.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythagoraschords-0.1.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pythagoraschords-0.1.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file pythagoraschords-0.1.2.tar.gz.

File metadata

  • Download URL: pythagoraschords-0.1.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.9

File hashes

Hashes for pythagoraschords-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bd78225f777550b0755d6fef205a284257881b0a4cfb34249af5ac6a0be535b4
MD5 37e7b3d541ba7734463ae37088b175da
BLAKE2b-256 5cdc505b8fe11bc3b3839aa9ae36987e584bc7e15a2067d789b1b2b19db7b302

See more details on using hashes here.

File details

Details for the file pythagoraschords-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pythagoraschords-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5955fd8e7c674517e66930ab481b4581705a2956cf54b17bb17a48754a24093c
MD5 e0aa6cca0dbe6b0331ea9a5944a5ed77
BLAKE2b-256 37189e94545977f266e981125a8532e75f944c70c73718ebec046720a607429e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page