Skip to content

Commit

Permalink
Adds inversion examples to README
Browse files Browse the repository at this point in the history
  • Loading branch information
EnigmaCurry committed Jun 15, 2022
1 parent 3b6e8a6 commit 760f4d7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,22 @@ True
['C', 'E', 'G', 'Bb', 'D', 'F']
```

### Inversions

Chord inversions are created with a forward slash and a number
indicating the order. This can optionally be combined with an
additional forward slash to change the bass note:

```python
>>> Chord("C/1").components() # First inversion of C
['E', 'G', 'C']
>>> Chord("C/2").components() # Second inversion of C
['G', 'C', 'E']

>>> Chord("Cm7/3/F").components() # Third inversion of Cm7 with an added F bass
['F', 'Bb', 'C', 'Eb', 'G']
```

## Examples

- [pychord-midi.py](./examples/pychord-midi.py) - Create a MIDI file using PyChord and pretty_midi.
Expand Down

0 comments on commit 760f4d7

Please sign in to comment.