# 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', 'maj')
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! To collaborate:
1. Fork the repository.
2. Create a branch for your feature/bugfix:
```bash
git checkout -b my-feature
```
3. Commit your changes:
```bash
git commit -m "Description of my feature"
```
4. Push to your fork:
```bash
git push origin my-feature
```
5. Open a **Pull Request** in the main repository.
---
## 📝 **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/f7/48/5e7432ca7265d73cec85f908a4ad168d6c7076823dcd15a9dc9692952bba/pysongtool-0.10.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', 'maj')\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! To collaborate: \n\n1. Fork the repository.\n2. Create a branch for your feature/bugfix: \n ```bash\n git checkout -b my-feature\n ```\n3. Commit your changes: \n ```bash\n git commit -m \"Description of my feature\"\n ```\n4. Push to your fork: \n ```bash\n git push origin my-feature\n ```\n5. Open a **Pull Request** in the main repository.\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.10",
"project_urls": {
"Homepage": "https://github.com/MuriloRyan/pysongtool"
},
"split_keywords": [
"music",
"theory",
"scales",
"chords",
"intervals"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f7485e7432ca7265d73cec85f908a4ad168d6c7076823dcd15a9dc9692952bba",
"md5": "19a2a0397ec7b51fd3f087d9610fe62b",
"sha256": "6a2da94cb2c3117ab5bd7cc3cc2a276dc8598f6c4b6387a56acac3f336ff616f"
},
"downloads": -1,
"filename": "pysongtool-0.10.tar.gz",
"has_sig": false,
"md5_digest": "19a2a0397ec7b51fd3f087d9610fe62b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 4814,
"upload_time": "2024-11-21T23:19:37",
"upload_time_iso_8601": "2024-11-21T23:19:37.503988Z",
"url": "https://files.pythonhosted.org/packages/f7/48/5e7432ca7265d73cec85f908a4ad168d6c7076823dcd15a9dc9692952bba/pysongtool-0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-21 23:19:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MuriloRyan",
"github_project": "pysongtool",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "pysongtool"
}