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 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>
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.6.tar.gz
(7.9 kB
view hashes)
Built Distribution
Close
Hashes for pychord-0.2.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c8a2f25c39c2de5aaacf0eb945afa63a63aa20bf6f47e046f9188ab689b47e8 |
|
MD5 | 113e6a881c8e95cfb2d9bfe4dd9d6383 |
|
BLAKE2b-256 | 9330762389e92436d6347374dc24b3abf2cfd2cfdc5a3d56bbdf1b12b7fe5a9a |