{ "info": { "author": "Olivier Jolly", "author_email": "olivier@pcedev.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Multimedia :: Sound/Audio", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Sf2Utils\n========\n\nSf2Utils is a soundfont 2 parsing library and companion utility.\nIt is meant for developers aiming to use soundfont 2 file as input,\ntypically for converting to another format.\n\nInstallation\n------------\n\nSf2Utils is installable from PyPI with a single pip command::\n\n pip install sf2utils\n\nAlternatively, Sf2utils can be run directly from sources after a git pull::\n\n git clone https://gitlab.com/zeograd/sf2utils.git\n cd sf2utils && python setup.py install\n\n\nCompanion script\n----------------\n\n**sf2parse** is a command line utility used to parse a sound font 2 file.\nIt is meant as debug companion for the **sf2utils** parser library as it shows\nwhat is understood from its parser.\n\n::\n\n usage: sf2parse [-h] [-d] sf2_filename\n\n LGPL v3+ 2016-2017 Olivier Jolly\n\n positional arguments:\n sf2_filename input file in SoundFont2 format\n\n optional arguments:\n -h, --help show this help message and exit\n -d, --debug debug parsing [default: False]\n\n Parse sf2 file and display info about it\n\n\nLibrary use\n-----------\n\n**sf2utils** can be used as a library for parsing SoundFont2 files.\nThere are 2 API levels, a low level and high level one.\nThey both open SoundFont2 file the same way::\n\n from sf2utils.sf2parse import Sf2File\n with open('file.sf2', 'rb') as as sf2_file:\n sf2 = Sf2File(sf2_file)\n\nNote that opening the file is up to the library user because samples\ndata are lazy loaded. Accessing sample data will seek and read data.\nYou shouldn't access sample data outside of the content in which\nthe file is opened, as it will fail.\n\nLow level library API\n.....................\n\nOnce sf2 is a valid Sf2File, all metadata are available via the\nproperty **raw**, which has fields for the various sections in a\nSoundFont2 file.\n\n* **sf2.raw.info** is a dictionary with all info in the info block of the SoundFont2 file with keys as binary strings.\n\n* **sf2.raw.smpl_offset** is the offset in the original file where the sample data are located.\n\n* **sf2.raw.sm24_offset** is the offset in the original file where the complementary 8bits of sample data are located.\n\n* **sf2.raw.pdta** is the main metadata structure, a dictionary with tuples named after the specification and indexed using specification structure names :\n * Pbag -> 'gen', 'mod'\n * Igen -> 'oper', 'amount'\n * Imod -> 'src_oper', 'dest_oper', 'amount', 'amount_src_oper', 'trans_oper'\n * Pmod -> 'src_oper', 'dest_oper', 'amount', 'amount_src_oper', 'trans_oper'\n * Pgen -> 'oper', 'amount'\n * Shdr -> 'sample_name', 'start', 'end', 'start_loop', 'end_loop', 'sample_rate', 'original_pitch', 'pitch_correction', 'sample_link', 'sample_type'\n * Phdr -> 'name', 'preset', 'bank', 'bag', 'library', 'genre', 'morphology'\n * Ibag -> 'gen', 'mod'\n * Inst -> 'name', 'bag'\n\nWith this API, field interpretation remains up to the library user.\n\nHigh level library API\n......................\n\nWith this API, info are available via the **info** property, which is a pretty printable tuple where every\nfield comes from the info block in the SoundFont2 file.\n\nSamples are accessible via the **samples** property, which is a list of **Sf2Sample** from which you can\nretrieve loop information and raw data.\n\nPresets are in the **presets** property, which is a list of **Sf2Preset** from which you can list generators,\nmodulators, instruments and bags.\n\nInstruments are in the **instruments** property, which is a list of **Sf2Instrument** from which you can\nlist bags of generators, modulators.\n\nBags are of class **Sf2Bag** and offer a wide range of property returning various high level info (about loop,\ntuning, filters, envelopes, instruments, samples, ...) or None when no generator was found.\n\nAll those classes have a **pretty_print** returning a pretty printed string, recursing over subelements.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/zeograd/sf2utils", "keywords": "soundfont sf2 sound font", "license": "LGPLv3+", "maintainer": "", "maintainer_email": "", "name": "sf2utils", "package_url": "https://pypi.org/project/sf2utils/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sf2utils/", "project_urls": { "Homepage": "https://gitlab.com/zeograd/sf2utils" }, "release_url": "https://pypi.org/project/sf2utils/0.9.0/", "requires_dist": [ "check-manifest; extra == 'dev'", "pylint; extra == 'dev'", "nose2; extra == 'test'" ], "requires_python": "", "summary": "Sound font 2 parsing library and utilities", "version": "0.9.0" }, "last_serial": 2627661, "releases": { "0.6.0": [ { "comment_text": "", "digests": { "md5": "958e88750012f199f04c739b7b039f7f", "sha256": "32d4cdc18882832e93ce458ec2e73eddf89018cac8c3c11cc32e641d825da677" }, "downloads": -1, "filename": "sf2utils-0.6.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "958e88750012f199f04c739b7b039f7f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 20089, "upload_time": "2016-01-28T09:00:43", "url": "https://files.pythonhosted.org/packages/3e/b7/dc32ffce86b8817f055217aa949bfdae2a08129be658b3b0094a8ff14305/sf2utils-0.6.0-py2.py3-none-any.whl" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "5856dfd915a36a2315e786830c4f93bc", "sha256": "89ee9399a57c51d2efa5ec4119eddbf6c73213c2661571a8c70ce976dc5deee4" }, "downloads": -1, "filename": "sf2utils-0.7.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "5856dfd915a36a2315e786830c4f93bc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 20087, "upload_time": "2016-01-31T23:05:15", "url": "https://files.pythonhosted.org/packages/13/d9/0a35a0b10d25e8e05fb75fb5a97c5f3dc511ee3306f2c40519717e4de6c3/sf2utils-0.7.0-py2.py3-none-any.whl" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "8332666b3728198f88377042e9e22a1b", "sha256": "eaddcba8abd4d63e5a8b495180cf197656a6af16a1fb2a032fb3a27eeb9c685d" }, "downloads": -1, "filename": "sf2utils-0.8.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "8332666b3728198f88377042e9e22a1b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 20229, "upload_time": "2016-02-02T15:19:41", "url": "https://files.pythonhosted.org/packages/16/e1/601deeb01099e40135ff611ced14706f6435d1d903d232d154577516a7b4/sf2utils-0.8.0-py2.py3-none-any.whl" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "0c9dc01375c67f76c62e46a542599953", "sha256": "aaef0d93d4d826525b8d50f77ed0c47d77ab78724f4849e24660cd1c2eac4d8c" }, "downloads": -1, "filename": "sf2utils-0.9.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "0c9dc01375c67f76c62e46a542599953", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 20352, "upload_time": "2017-02-08T10:09:31", "url": "https://files.pythonhosted.org/packages/29/05/ab1b330bcfad9eadb69146ebd715aa285b7bc25f90dd1250b1c5db81440b/sf2utils-0.9.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0c9dc01375c67f76c62e46a542599953", "sha256": "aaef0d93d4d826525b8d50f77ed0c47d77ab78724f4849e24660cd1c2eac4d8c" }, "downloads": -1, "filename": "sf2utils-0.9.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "0c9dc01375c67f76c62e46a542599953", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 20352, "upload_time": "2017-02-08T10:09:31", "url": "https://files.pythonhosted.org/packages/29/05/ab1b330bcfad9eadb69146ebd715aa285b7bc25f90dd1250b1c5db81440b/sf2utils-0.9.0-py2.py3-none-any.whl" } ] }