{ "info": { "author": "Gonzalo Ciruelos", "author_email": "gonzalo.ciruelos@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython" ], "description": "\nmusthe\n======\n\nMusic theory implemented in Python. Notes, scales and chords.\n\nIt is still in development so feel free to read the code, fork and make pull requests! They are very welcome!\n\nInstallation\n============\n\nTo install:\n\n $ pip install musthe\n\n\nDevelopment install\n===================\n\nTo install as development:\n\n(Optional) Create a virtualenv:\n\n $ python -m venv env\n $ source env/bin/activate\n\nThen install:\n\n $ pip install -e .\n\n\nHow to use\n==========\n\nIt is very simple, everything is coded in a object-oriented style, for example:\n\n $ python\n >>> from musthe import *\n >>> a = Note('A') #Default A4\n >>> a\n Note(\"A4\")\n >>> str(a)\n 'A'\n\n\nSuppose you want to create tension, so you want the perfect fifth or the minor seventh of that A, so you do:\n\n >>> fifth = Interval('P5')\n >>> seventh = Interval('m7')\n >>> a+fifth\n Note(\"E5\")\n >>> str(a+fifth)\n 'E'\n >>> str(a+seventh)\n 'G'\n\nThough it is important to see that the octaves of those notes are different:\n\n >>> a.octave\n 4\n >>> (a+seventh).octave\n 5\n\nNow let's see basic chord usage:\n\n\t>>> Chord(Note('A'), 'M')\n\tChord(Note('A'), 'M')\n\t>>> Chord(Note('A'), 'M').notes\n\t[Note(\"A4\"), Note(\"C#5\"), Note(\"E5\")]\n\t>>> Chord(Note('Bb'), 'dim').notes\n\t[Note(\"Bb4\"), Note(\"Db5\"), Note(\"Fb5\")]\n\nYou can use a string to construct a chord:\n\n >>> Chord('C#aug7') == Chord(Note('C#'), 'aug7')\n True\n\nDefault chord type is 'M' (Major).\n\nNow lets try scales:\n\n >>> s = Scale(Note('B'), 'major')\n >>> [s[i] for i in range(len(s))]\n [Note('B4'), Note('C#5'), Note('D#5'), Note('E5'), Note('F#5'), Note('G#5'), Note('A#5')]\n >>> s[0]\n Note('B4')\n >>> s[-11]\n Note('E3')\n\nIt return a list of Note instances, so if you want a cleaner result should do something like:\n\n >>> s = Scale(Note('B'), 'major')\n >>> [str(s[i]) for i in range(len(s))]\n ['B', 'C#', 'D#', 'E', 'F#', 'G#', 'A#']\n\nTo check if notes and chords are contained in a given scale:\n\n >>> Note('D#3') in s\n True\n >>> Note('F3') in s\n False\n >>> Chord('C#m') in s\n True\n >>> Chord('CM') in s\n False\n\nNow let's try some advanced stuff: given a list of chords, find all scales that contain those:\n\n >>> chords = [Chord('Cm'), Chord('Fm7'), Chord('Gm')]\n >>> for scale in Scale.all():\n ... if chords in scale:\n ... print(scale)\n ...\n C natural_minor\n Eb major\n\n\nIf you have [lilypond](http://lilypond.org/) installed, you can make little melodies using this program, an example is given in 'lilypond_example.py'\n\n\nContributors\n============\n\nIn alphabetical order\n\n* [David H](https://github.com/bobthenameless)\n* [Edgar Gavrik](https://github.com/edgarasg)\n* [Federico Ferri](https://github.com/fferri)\n* [Gonzalo Ciruelos](https://github.com/gciruelos)\n* [Marco Heins](https://github.com/barrio)\n* [nvoster](https://github.com/nvoster)\n* [Sri Raghavan](https://github.com/srir)\n* [Sylvain](https://github.com/SylvainDe)\n* [zsinx6](https://github.com/zsinx6)\n\n\nLicense\n=======\n\nSee license file.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gciruelos/musthe", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "musthe", "package_url": "https://pypi.org/project/musthe/", "platform": "", "project_url": "https://pypi.org/project/musthe/", "project_urls": { "Homepage": "https://github.com/gciruelos/musthe" }, "release_url": "https://pypi.org/project/musthe/1.0.0/", "requires_dist": null, "requires_python": ">=3.4", "summary": "Music theory implemented in Python. Notes, intervals, scales and chords.", "version": "1.0.0" }, "last_serial": 4037152, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "7d89d34f6ce480f86b2d88b158162878", "sha256": "f1439a86e46ee37bc05202ec489df2815071a7b0afce19f3808dd34441f64c57" }, "downloads": -1, "filename": "musthe-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7d89d34f6ce480f86b2d88b158162878", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.4", "size": 6817, "upload_time": "2018-07-06T17:33:52", "url": "https://files.pythonhosted.org/packages/fb/cc/82660a8755a43b916114e2a86e83931066745db79b63b6dff5448ae07901/musthe-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "783d146fe451a0834a7500ab33edf5e9", "sha256": "46825a7fcbf638e2617277c2ddfceac658e09fab9746e2bff17c9a548278f6ee" }, "downloads": -1, "filename": "musthe-1.0.0.tar.gz", "has_sig": false, "md5_digest": "783d146fe451a0834a7500ab33edf5e9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 7952, "upload_time": "2018-07-06T17:33:53", "url": "https://files.pythonhosted.org/packages/96/17/36aefdc50455aa5528431f75c98a36f114595626cb91d71ee4ad53285b8c/musthe-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7d89d34f6ce480f86b2d88b158162878", "sha256": "f1439a86e46ee37bc05202ec489df2815071a7b0afce19f3808dd34441f64c57" }, "downloads": -1, "filename": "musthe-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7d89d34f6ce480f86b2d88b158162878", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.4", "size": 6817, "upload_time": "2018-07-06T17:33:52", "url": "https://files.pythonhosted.org/packages/fb/cc/82660a8755a43b916114e2a86e83931066745db79b63b6dff5448ae07901/musthe-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "783d146fe451a0834a7500ab33edf5e9", "sha256": "46825a7fcbf638e2617277c2ddfceac658e09fab9746e2bff17c9a548278f6ee" }, "downloads": -1, "filename": "musthe-1.0.0.tar.gz", "has_sig": false, "md5_digest": "783d146fe451a0834a7500ab33edf5e9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 7952, "upload_time": "2018-07-06T17:33:53", "url": "https://files.pythonhosted.org/packages/96/17/36aefdc50455aa5528431f75c98a36f114595626cb91d71ee4ad53285b8c/musthe-1.0.0.tar.gz" } ] }