A package about chord progressions.
Project description
pygression
Overview
pygression is a Python package that adds the ability to represent chord progressions to your code.
Installation
You can install pygression with pip:
python3 -m pip install pygression
Basic Tutorial
The Note class is mainly used to get a chord progression in a specific key. It is instantiated with a Letter and an optional Accidental.
>>> from pygression import Note, Letter, Accidental
>>> note = Note(Letter.A, accidental=Accidental.FLAT)
>>> note
Ab
The Roman class is needed to create chord progressions that include any kind of chord. It is instantiated with a degree and an optional Accidental.
>>> from pygression import Roman
>>> roman = Roman(6, accidental=Accidental.FLAT)
>>> roman
bVI
The RomanChord class represents chords in Roman numeral analysis. It is instantiated with a Roman object and an optional Quality.
>>> from pygression import RomanChord
>>> from pygression.quality import triad
>>> rchord = RomanChord(roman, quality=triad.Major())
>>> rchord
bVI
The Progression class represents chord progressions. Pass in a list of the degrees of the chords or RomanChords in the progression with a mode and how the progression is viewed.
>>> from pygression import Progression, Mode
>>> axis = Progression([1, 5, rchord, 4], mode=Mode.AEO, relative_to=Mode.ION)
>>> axis
[i, v, bVI, iv]
To get this progression in a specific key, use the chords_in method. This method takes in a Note object.
>>> chords = axis.chords_in(note)
>>> chords
[Abm, Ebm, Fb, Dbm]
More advanced features can be found in the documentation: https://pygression.readthedocs.io/en/latest/index.html.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygression-1.0.0.tar.gz.
File metadata
- Download URL: pygression-1.0.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dd1e7773fdb09d23661af5c1199ea9872f5d3efde4a4e468b059adaa8d1638a
|
|
| MD5 |
e91332ba6ab839c553c7ad8a6b9a84f6
|
|
| BLAKE2b-256 |
b4cf17c426723dc3a0e21f0d603aa7ec054bd3f0cdd9d7657168d098b2a69de7
|
File details
Details for the file pygression-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pygression-1.0.0-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fc6cf457b9f81b2ddfb83c01f53a59fbd8b3d9c534fe68c54f4e1b78e56be14
|
|
| MD5 |
7a74b9014f135afb7592f44caa517cff
|
|
| BLAKE2b-256 |
5df740719f82123e2326ae434c0bab8d8ac6ef1e81644bc89468fc54aed724e5
|