https://github.com/pc9795/music-theory
Music theory :musical_note: with Python :snake:
https://github.com/pc9795/music-theory
chords music-theory python scales
Last synced: about 1 year ago
JSON representation
Music theory :musical_note: with Python :snake:
- Host: GitHub
- URL: https://github.com/pc9795/music-theory
- Owner: pc9795
- Created: 2021-04-02T08:17:01.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-02T11:06:09.000Z (about 5 years ago)
- Last Synced: 2025-02-15T06:41:28.120Z (over 1 year ago)
- Topics: chords, music-theory, python, scales
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Music Theory
## Examples
Get notes for any of the configured scales
```
print(get_notes(scale=Scales.DORIAN, key=Notes.D, with_intervals=True))
>>> [D(1), tone(2), E(2), semitone(1), F(3), tone(2), G(4), tone(2), A(5), tone(2), B(6), semitone(1), C(7), tone(2), D(8/1)]
```
Get chords for major scale in any key
```
print(get_chords(key=Notes.C))
>>> [C([C, E, G]), Dm([D, F, A]), Em([E, G, B]), F([F, A, C]), G([G, B, D]), Am([A, C, E]), Bdim([B, D, F])]
```
Note analysis
```
print(get_notes(scale=Scales.DORIAN, key=Notes.D, with_intervals=True, octaves=2, filter_pos=[1, 3, 5]))
>>> [D(1), minor-second(1), F(3), major-second(2), A(5)]
```