{ "info": { "author": "Philip Abbet", "author_email": "philip.abbet@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6", "Topic :: Multimedia" ], "description": "=================\n piano_fingering\n=================\n\n.. image:: https://travis-ci.org/Kanma/piano_fingering.svg?branch=v1.0.0\n :target: https://travis-ci.org/Kanma/piano_fingering\n\n\nA Python library to automatically determine the fingering of a serie of notes.\n\nThe algorithm is adapted from the corresponding one from\nhttps://github.com/blakewest/performer, by Blake West.\n\n\n\nInstallation\n============\n\nTo install this library, do::\n\n $ pip install piano_fingering\n\n\n\nUsage\n=====\n\nSingle notes\n------------\n\nThe algorithm takes a list of MIDI notes as input::\n\n from piano_fingering import computeFingering\n\n notes = [\n 60,\n 62,\n 64,\n 65,\n 67,\n 69,\n 71,\n 72,\n ]\n\n fingered_notes = computeFingering(notes, 'right') # or 'left'\n\n\nThe code above will produce the following output::\n\n fingered_notes = [\n {'notes': [60], 'fingers': [1]},\n {'notes': [62], 'fingers': [2]},\n {'notes': [64], 'fingers': [3]},\n {'notes': [65], 'fingers': [1]},\n {'notes': [67], 'fingers': [2]},\n {'notes': [69], 'fingers': [3]},\n {'notes': [71], 'fingers': [4]},\n {'notes': [72], 'fingers': [5]},\n ]\n\n\nChords\n------\n\nYou can add chords to the list too::\n\n notes = [\n [60, 62, 64],\n [67, 71, 74],\n ]\n\n fingered_notes = computeFingering(notes, 'right')\n\n\nThe code above will produce the following output::\n\n fingered_notes = [\n {'notes': [60, 62, 64], 'fingers': [1, 2, 3]},\n {'notes': [67, 71, 74], 'fingers': [1, 3, 5]},\n ]\n\n\nRests\n-----\n\nA rest is specified by an empty list. Note that the algorithm doesn't take\nrests in consideration. They are supported to help the user of the library to\nuse the result list. It is up to you to separate your notes on long rests,\nso the fingering of one part of the song doesn't affect another one.\n\nExample::\n\n notes = [\n 60,\n [],\n 64,\n ]\n\n fingered_notes = computeFingering(notes, 'right')\n\n\nThe code above will produce the following output::\n\n fingered_notes = [\n {'notes': [60], 'fingers': [1]},\n {'notes': [], 'fingers': []},\n {'notes': [64], 'fingers': [3]},\n ]\n\n\nUser-defined fingering\n----------------------\n\nIn case the algorithm doesn't produce a fingering that you find optimal, you\ncan constrain it by specifying your own fingering on the input::\n\n notes = [\n 60,\n 62,\n 64,\n {'notes': [65], 'fingers': [4]},\n 67,\n 69,\n 71,\n 72,\n ]\n\n fingered_notes = computeFingering(notes, 'right') # or 'left'\n\n\nThe code above will produce the following output::\n\n fingered_notes = [\n {'notes': [60], 'fingers': [1]},\n {'notes': [62], 'fingers': [2]},\n {'notes': [64], 'fingers': [3]},\n {'notes': [65], 'fingers': [4]},\n {'notes': [67], 'fingers': [1]},\n {'notes': [69], 'fingers': [2]},\n {'notes': [71], 'fingers': [3]},\n {'notes': [72], 'fingers': [4]},\n ]\n\n\nConverting a note name to a MIDI note\n-------------------------------------\n\nTwo helpers functions are provided to convert note names (like *C5*, *A#*, *Bb3*)\nto MIDI notes.\n\nTo convert a single note name, use::\n\n from piano_fingering import nameToMidi\n\n midi_note = nameToMidi('C4')\n\nWhen the octave isn't indicated, '5' is assumed.\n\n\nTo convert a list of notes (with the same format than for *computeFingering()* in\nthe above examples), use::\n\n from piano_fingering import listToMidi\n\n notes = [\n 'C5',\n ['C5', 'E5', 'G5'],\n {'notes': ['C5'], 'fingers': [1]},\n ]\n\n midi_notes = listToMidi(notes)\n\n\n\nRunning tests\n=============\n\nIn the source package, do::\n\n $ python setup.py test\n\n\n\nLicense\n=======\n\n*piano_fingering* is is made available under the MIT License. The text of the license\nis in the file \"LICENSE.txt\".\n\nUnder the MIT License you may use *piano_fingering* for any purpose you wish, without\nwarranty, and modify it if you require, subject to one condition:\n\n \"The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\"\n\nIn practice this means that whenever you distribute your application, whether as binary\nor as source code, you must include somewhere in your distribution the text in the file\n\"LICENSE.txt\". This might be in the printed documentation, as a file on delivered media,\nor even on the credits / acknowledgements of the runtime application itself; any of\nthose would satisfy the requirement.\n\nEven if the license doesn't require it, please consider to contribute your modifications\nback to the community.\n\n\n\nSpecial thanks to\n=================\n\nBlake West, for the initial javascript implementation.\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/Kanma/piano_fingering/archive/v1.0.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Kanma/piano_fingering", "keywords": "piano", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "piano_fingering", "package_url": "https://pypi.org/project/piano_fingering/", "platform": "", "project_url": "https://pypi.org/project/piano_fingering/", "project_urls": { "Download": "https://github.com/Kanma/piano_fingering/archive/v1.0.0.tar.gz", "Homepage": "https://github.com/Kanma/piano_fingering" }, "release_url": "https://pypi.org/project/piano_fingering/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Automatic fingering for notes played on piano", "version": "1.0.0" }, "last_serial": 3367033, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "39993acb4cdeefda4d1f08bf60a54af8", "sha256": "737011b979f62742109842c654734167051ea402a545de542e03e915b577070f" }, "downloads": -1, "filename": "piano_fingering-1.0.0.tar.gz", "has_sig": false, "md5_digest": "39993acb4cdeefda4d1f08bf60a54af8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10382, "upload_time": "2017-11-27T09:00:16", "url": "https://files.pythonhosted.org/packages/c9/70/0ac2b949173eb04f7a1aabab7c19e39ef1fc5d45d00b57636efd36619c33/piano_fingering-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "39993acb4cdeefda4d1f08bf60a54af8", "sha256": "737011b979f62742109842c654734167051ea402a545de542e03e915b577070f" }, "downloads": -1, "filename": "piano_fingering-1.0.0.tar.gz", "has_sig": false, "md5_digest": "39993acb4cdeefda4d1f08bf60a54af8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10382, "upload_time": "2017-11-27T09:00:16", "url": "https://files.pythonhosted.org/packages/c9/70/0ac2b949173eb04f7a1aabab7c19e39ef1fc5d45d00b57636efd36619c33/piano_fingering-1.0.0.tar.gz" } ] }