Skip to main content

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

Author

License

  • 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.

Source Distribution

pychord-0.2.5.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

pychord-0.2.5-py2.py3-none-any.whl (17.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pychord-0.2.5.tar.gz.

File metadata

  • Download URL: pychord-0.2.5.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pychord-0.2.5.tar.gz
Algorithm Hash digest
SHA256 03d12529a17dc50d561bb9a98ad6e08e088a13dbd1e64bc42f2c5fdac8820d4c
MD5 4d05f311f21507621a8a8917ce869cd4
BLAKE2b-256 7261bb481ca56e54c3b6f7da8cc375ad829a3ae26ce9c73d0489dac9761bccd8

See more details on using hashes here.

File details

Details for the file pychord-0.2.5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pychord-0.2.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ab6df549d32ce605fb60d53fd4d8696f08b927932517f1caab1957a79e570c1f
MD5 1779c69c1a78e5cd3dfcfe4d8456451d
BLAKE2b-256 2caa9ee1094de2d6a2ca1e858c761bf54762dc816c8bcaad2bcaf8273a56fcd3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page