Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

A library to handle musical chords in python.

Project description


Pychord is a python library to handle musical chords.


$ pip install pychord

Basic Usage

Create a Chord

>>> from pychord import Chord
>>> c = Chord("Am7")
>>> c
<Chord: Am7>

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



  • MIT License

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pychord-0.2.9-py2.py3-none-any.whl (10.7 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Feb 25, 2018
pychord-0.2.9.tar.gz (8.0 kB) Copy SHA256 hash SHA256 Source None Feb 25, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page