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.

Metadata

Release files for pythagoraschords 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pythagoraschords 0.1.2
File Size Uploaded Provenance Actions
pythagoraschords-0.1.2.tar.gz 3.9 kB Without provenance Details for pythagoraschords-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pythagoraschords 0.1.2
File Interpreter ABI Platform Actions
pythagoraschords-0.1.2-py3-none-any.whl Python 3 none any Details for pythagoraschords-0.1.2-py3-none-any.whl

Total release size: 8.6 kB

Release files / pythagoraschords-0.1.2.tar.gz

Download URL pythagoraschords-0.1.2.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bd78225f777550b0755d6fef205a284257881b0a4cfb34249af5ac6a0be535b4
BLAKE2b-256 checksum
How to use checksums
5cdc505b8fe11bc3b3839aa9ae36987e584bc7e15a2067d789b1b2b19db7b302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release files / pythagoraschords-0.1.2-py3-none-any.whl

Download URL pythagoraschords-0.1.2-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5955fd8e7c674517e66930ab481b4581705a2956cf54b17bb17a48754a24093c
BLAKE2b-256 checksum
How to use checksums
37189e94545977f266e981125a8532e75f944c70c73718ebec046720a607429e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Security for pythagoraschords 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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