Version: beta 0.10
PySongTool is a Python library designed to help provide information involving music theory
This project follows SOLID principles and uses the Facade design pattern to organize and simplify the management of classes and functions.
- Python >= 3.7
You can install PySongTool directly from PyPI (when available) or locally:
pip install pysongtoolOr clone the repository and install it manually:
git clone https://github.com/your-username/pysongtool.git
cd pysongtool
pip install .
- Generate chords from a root note and chord name.
- Get all available scales or chords.
- Explore musical intervals based on a root note.
- Retrieve detailed scale information, including notes and associated chords.
from pysongtool import PySongTool
tool = PySongTool()result = tool.chord('C', 'major')
print(result)
# {'chord': 'Cmaj', 'notes': ['C', 'E', 'G']}all_chords = tool.all_chords('C')
print(all_chords)
# [{'maj': {'chord': 'Cmaj', 'notes': ['C', 'E', 'G']}}, ...]scale = tool.scale('C', 'major')
print(scale)
# {'notes': ['C', 'D', 'E', 'F', 'G', 'A', 'B'], 'chords': ['Cmaj', 'Dmin', ...]}intervals = tool.intervals('C')
print(intervals)
# [{'name': 'Unison', 'semitones': 0, 'note': 'C'}, ...]intervals = tool.get_interval('C', 'E', 'G')
print(intervals)
# [{'note': 'E', 'interval': {'name': 'Major Third', 'semitones': 4}}, ...]Contributions are welcome!
This project is licensed under the MIT License.