https://github.com/alkasm/chords
https://github.com/alkasm/chords
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/alkasm/chords
- Owner: alkasm
- License: mit
- Created: 2018-02-27T11:19:44.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-28T07:34:04.000Z (over 8 years ago)
- Last Synced: 2025-03-02T18:20:13.599Z (over 1 year ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Example use:
View chord fingerings:
>>> from chord import Chord
>>> AMaj = Chord('A Maj', 'x02220', '213')
>>> print(AMaj)
## A Maj ##
x 0 2 1 3 0
╒═╤═╤═╤═╤═╕
| | | | | |
├─┼─┼─┼─┼─┤
| | █ █ █ |
├─┼─┼─┼─┼─┤
| | | | | |
├─┼─┼─┼─┼─┤
| | | | | |
└─┴─┴─┴─┴─┘
Generate permutations of chords to practice chord switching:
>>> from chord import Chord
>>> from itertools import permutations
>>> chords = [Chord('A', 'x02220', '213'), Chord('E', '022100','231'), Chord('D', 'xx0232', '132')]
>>> for ch1, ch2 in permutations(chords, 2):
... print(ch1.name, '---', ch2.name)
...
A --- E
A --- D
E --- A
E --- D
D --- A
D --- E