# PySongTool
### 🎵 **Music Theory with Python**
**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.
---
## 📚 **Requirements**
- Python >= 3.7
---
## 🔧 **Installation**
You can install PySongTool directly from PyPI (when available) or locally:
```bash
pip install pysongtool
```
Or clone the repository and install it manually:
```
git clone https://github.com/your-username/pysongtool.git
cd pysongtool
pip install .
```
---
## 🗂 **Features**
- 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.
---
## 🚀 **How to Use**
### Creating an Instance
```python
from pysongtool import PySongTool
tool = PySongTool()
```
### Generating a Chord
```python
result = tool.chord('C', 'major')
print(result)
# {'chord': 'Cmaj', 'notes': ['C', 'E', 'G']}
```
### Listing All Chords
```python
all_chords = tool.all_chords('C')
print(all_chords)
# [{'maj': {'chord': 'Cmaj', 'notes': ['C', 'E', 'G']}}, ...]
```
### Generating a Scale
```python
scale = tool.scale('C', 'major')
print(scale)
# {'notes': ['C', 'D', 'E', 'F', 'G', 'A', 'B'], 'chords': ['Cmaj', 'Dmin', ...]}
```
### Getting Intervals
```python
intervals = tool.intervals('C')
print(intervals)
# [{'name': 'Unison', 'semitones': 0, 'note': 'C'}, ...]
```
### Calculating Intervals Between Notes
```python
intervals = tool.get_interval('C', 'E', 'G')
print(intervals)
# [{'note': 'E', 'interval': {'name': 'Major Third', 'semitones': 4}}, ...]
```
## 🛠 **Contributing**
Contributions are welcome!
---
## 📝 **License**
This project is licensed under the [MIT License](LICENSE).
---
Raw data
{
"_id": null,
"home_page": "https://github.com/MuriloRyan/pysongtool",
"name": "pysongtool",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "music theory scales chords intervals",
"author": "Murilo R.B Silva",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/d5/d1/75af6eaa59ea036b4a3b16731e1225071027e0bb6738af715b38ea25fe57/pysongtool-0.11.6.tar.gz",
"platform": null,
"description": "# PySongTool\n\n### \ud83c\udfb5 **Music Theory with Python**\n**Version**: beta 0.10\n\nPySongTool is a Python library designed to help provide information involving music theory\n\nThis project follows **SOLID** principles and uses the **Facade** design pattern to organize and simplify the management of classes and functions.\n\n---\n\n## \ud83d\udcda **Requirements**\n\n- Python >= 3.7\n\n---\n\n## \ud83d\udd27 **Installation**\n\nYou can install PySongTool directly from PyPI (when available) or locally:\n\n```bash\npip install pysongtool\n```\n\nOr clone the repository and install it manually:\n\n```\ngit clone https://github.com/your-username/pysongtool.git\ncd pysongtool\npip install .\n```\n\n---\n\n## \ud83d\uddc2 **Features**\n\n- Generate chords from a root note and chord name.\n- Get all available scales or chords.\n- Explore musical intervals based on a root note.\n- Retrieve detailed scale information, including notes and associated chords.\n\n---\n\n## \ud83d\ude80 **How to Use**\n\n### Creating an Instance\n```python\nfrom pysongtool import PySongTool\n\ntool = PySongTool()\n```\n### Generating a Chord\n```python\nresult = tool.chord('C', 'major')\nprint(result)\n# {'chord': 'Cmaj', 'notes': ['C', 'E', 'G']}\n```\n\n### Listing All Chords\n```python\nall_chords = tool.all_chords('C')\nprint(all_chords)\n# [{'maj': {'chord': 'Cmaj', 'notes': ['C', 'E', 'G']}}, ...]\n```\n\n### Generating a Scale\n```python\nscale = tool.scale('C', 'major')\nprint(scale)\n# {'notes': ['C', 'D', 'E', 'F', 'G', 'A', 'B'], 'chords': ['Cmaj', 'Dmin', ...]}\n```\n\n### Getting Intervals\n```python\nintervals = tool.intervals('C')\nprint(intervals)\n# [{'name': 'Unison', 'semitones': 0, 'note': 'C'}, ...]\n```\n\n### Calculating Intervals Between Notes\n```python\nintervals = tool.get_interval('C', 'E', 'G')\nprint(intervals)\n# [{'note': 'E', 'interval': {'name': 'Major Third', 'semitones': 4}}, ...]\n```\n\n## \ud83d\udee0 **Contributing**\n\nContributions are welcome!\n\n---\n\n## \ud83d\udcdd **License**\nThis project is licensed under the [MIT License](LICENSE). \n\n---\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python library that gives musical theory contend.",
"version": "0.11.6",
"project_urls": {
"Homepage": "https://github.com/MuriloRyan/pysongtool"
},
"split_keywords": [
"music",
"theory",
"scales",
"chords",
"intervals"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d5d175af6eaa59ea036b4a3b16731e1225071027e0bb6738af715b38ea25fe57",
"md5": "2601573c38ab5bd64c7894137a4f6df4",
"sha256": "c44136fccd8b35fa76d3ff6253a3b98aaf5a737101db80e2f93762606bb295df"
},
"downloads": -1,
"filename": "pysongtool-0.11.6.tar.gz",
"has_sig": false,
"md5_digest": "2601573c38ab5bd64c7894137a4f6df4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 8179,
"upload_time": "2024-12-16T13:43:46",
"upload_time_iso_8601": "2024-12-16T13:43:46.319067Z",
"url": "https://files.pythonhosted.org/packages/d5/d1/75af6eaa59ea036b4a3b16731e1225071027e0bb6738af715b38ea25fe57/pysongtool-0.11.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-16 13:43:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MuriloRyan",
"github_project": "pysongtool",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "iniconfig",
"specs": [
[
"==",
"2.0.0"
]
]
},
{
"name": "packaging",
"specs": [
[
"==",
"24.2"
]
]
},
{
"name": "pluggy",
"specs": [
[
"==",
"1.5.0"
]
]
},
{
"name": "pytest",
"specs": [
[
"==",
"8.3.3"
]
]
},
{
"name": "setuptools",
"specs": [
[
"==",
"75.6.0"
]
]
}
],
"lcname": "pysongtool"
}