yuma-m / pychord

Python library to handle musical chords.
https://pypi.python.org/pypi/pychord
MIT License
248 stars 46 forks source link

Create QualityManager class #59

Closed yuma-m closed 3 years ago

yuma-m commented 3 years ago

Create QualityManager class to overwrite default quality components #58.

from pychord import Chord, QualityManager
c1 = Chord("C11")
print(c1.components())
# ['C', 'G', 'Bb', 'D', 'F']

quality_manager = QualityManager()
quality_manager.set_quality("11", (0, 4, 7, 10, 14, 17))
c2 = Chord("C11")
print(c2.components())
# ['C', 'E', 'G', 'Bb', 'D', 'F']

# will not affect existing chord instances
print(c1.components())
# ['C', 'G', 'Bb', 'D', 'F']