A library to handle musical chords in python.
Project description
Overview
Pychord is a python library to handle musical chords.
Installation
$ pip install pychord
Basic Usage
Create a Chord
>>> from pychord import Chord
>>> c = Chord("Am7")
>>> c
<Chord: Am7>
>>> c.info()
"""
Am7
root=A
quality=m7
appended=[]
on=None
"""
Transpose a Chord
>>> c = Chord("Am7/G")
>>> c.transpose(3)
>>> c
<Chord: Cm7/Bb>
Get component notes
>>> c = Chord("Am7")
>>> c.components()
['A', 'C', 'E', 'G']
Find Chords
>>> from pychord import note_to_chord
>>> note_to_chord(["C", "E", "G"])
[<Chord: C>]
>>> note_to_chord(["F#", "A", "C", "D"])
[<Chord: D7/F#>]
>>> note_to_chord(["F", "G", "C"])
[<Chord: Fsus2>, <Chord: Csus4/F>]
Create and handle chord progressions
>>> from pychord import ChordProgression
>>> cp = ChordProgression(["C", "G/B", "Am"])
>>> cp
<ChordProgression: C | G/B | Am>
>>> cp.append("Em/G")
>>> cp
<ChordProgression: C | G/B | Am | Em/G>
>>> cp.transpose(+3)
>>> cp
<ChordProgression: Eb | Bb/D | Cm | Gm/Bb>
>>> cp[1]
<Chord: Bb/D>
Supported Python Versions
2.7
3.3 and above
Links
Documentation: http://pychord.readthedocs.io/en/latest/
License
MIT License
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
pychord-0.2.9.tar.gz
(8.0 kB
view details)
Built Distribution
File details
Details for the file pychord-0.2.9.tar.gz
.
File metadata
- Download URL: pychord-0.2.9.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ddeb11ed33bc4d193b76319e84b7d31bba0c213ba3d22800807b69f37a4ee43 |
|
MD5 | 50fd0f7f6f7a1053d0271e75943c085f |
|
BLAKE2b-256 | aecf717dbe16b7bfa55e53b94f9a3d650687f42c48960e021b711bf8978c84e1 |
File details
Details for the file pychord-0.2.9-py2.py3-none-any.whl
.
File metadata
- Download URL: pychord-0.2.9-py2.py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13f937a79d42cbe0233f21b4a3cf8d4ec8972297a600d4fac6ffc751e6905c33 |
|
MD5 | a6244f10addc639cff2bd236186c3d95 |
|
BLAKE2b-256 | 90ba6116815532d808ae4294551463cadb2897487f93a44fb718098d4b87e768 |