Skip to main content

A library to handle musical chords in python.

Project description

# pychord [![Build Status](https://travis-ci.org/yuma-m/pychord.svg?branch=master)](https://travis-ci.org/yuma-m/pychord) [![Documentation Status](https://readthedocs.org/projects/pychord/badge/?version=latest)](http://pychord.readthedocs.io/en/latest/?badge=latest)

## Overview

Pychord is a python library to handle musical chords.

## Installation

```sh
$ pip install pychord
```

## Basic Usage

### Create a Chord

```python
>>> from pychord import Chord
>>> c = Chord("Am7")
>>> c
<Chord: Am7>
>>> c.info()
"""
Am7
root=A
quality=m7
appended=[]
on=None
"""
```

### Transpose a Chord

```python
>>> c = Chord("Am7/G")
>>> c.transpose(3)
>>> c
<Chord: Cm7/Bb>
```

### Get component notes

```python
>>> c = Chord("Am7")
>>> c.components()
['A', 'C', 'E', 'G']
```

### Find Chords

```python
>>> 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

```python
>>> 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
- PyPI: https://pypi.python.org/pypi/pychord
- GitHub: https://github.com/yuma-m/pychord
- Documentation: http://pychord.readthedocs.io/en/latest/

## Author
- [Yuma Mihira](http://yurax2.com/)

## 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.8.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

pychord-0.2.8-py2.py3-none-any.whl (10.5 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for pychord-0.2.8.tar.gz
Algorithm Hash digest
SHA256 ee1d8000f69af66e47a5d255b1bdf48b53949eab921b0bd77c355034d332b35d
MD5 84e220b18a45f0c68bad12b98d2d3290
BLAKE2b-256 8d11ef6dcebd79891cf602d6db071c9ed70b515f89488042384cfabb52122a7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pychord-0.2.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bb44a4028f6f84d3b5f11ec8e2d8f9ecd18a6843dded983f35545af6a66add1a
MD5 5d322dc47c0ad79a810b95b7178e37f7
BLAKE2b-256 7691c5e861d111a26d4d6dc9328d259d6a77e0769b35fe401b6ca7463de81f42

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