set of tools to work with scales, modes, modulations, chord progressions, voice leading, rhythm and more
Project description
musiclib
set of tools to work with scales, modes, modulations, chord progressions, voice leading, rhythm and more
install
install from pypi
pip install musiclib
or install the latest version from github
pip install git+https://github.com/tandav/musiclib
development
pip install -e .[dev]
examples
>>> from musiclib.scale import Scale
>>> from musiclib.chord import Chord
>>> scale = Scale.from_name('C', 'major')
>>> scale.root
Note(name=C)
>>> scale.notes
frozenset({Note(name=C),
Note(name=D),
Note(name=E),
Note(name=F),
Note(name=G),
Note(name=A),
Note(name=B)})
>>> scale.bits
'101011010101'
>>> scale.intervals
frozenset({0, 2, 4, 5, 7, 9, 11})
>>> scale.triads
(CEG/C, DFA/D, EGB/E, FAC/F, GBD/G, ACE/A, BDF/B)
>>> chord = Chord.from_str('CEG/C')
>>> chord == scale.triads[0]
True
Scale.from_name('C', 'phrygian')
SpecificChord.from_str('C1_e1_G1_C2_b2_E3')
NoteRange(SpecificNote('C', 1), SpecificNote('B', 3))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
musiclib-1.10.0.tar.gz
(32.2 kB
view hashes)
Built Distribution
musiclib-1.10.0-py3-none-any.whl
(26.8 kB
view hashes)
Close
Hashes for musiclib-1.10.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0325d3135bfd5b045bbe32c38518147ce68288066fe2664ff5c11dd06a497326 |
|
MD5 | 8b329cfffea5f51f71c2feaa3c4e0aca |
|
BLAKE2b-256 | 40638be2b1a862a37edaf12457b2a277e919384496a534a8be88560ec3ba5885 |