{ "info": { "author": "Christopher H. Casebeer", "author_email": "christopher@chc.name", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Multimedia :: Sound/Audio" ], "description": "Audiogen\n========\n\nThe ``audiogen`` package provides time domain audio processing tools\nusing Python generators. \n\nThis makes some types of audio sample generation and processing pretty \neasy::\n\n\t# mix 440 Hz and 445 Hz tones to get 5 Hz beating\n\tbeats = audiogen.mixer(\n\t\t(audiogen.tone(440), audiogen.tone(445)),\n\t\t[(constant(1), constant(1)),]\n\t)\n\nThe actual samples won't be generated or stored in memory until they're \nactually consumed \u2013\u00a0for instance, when they're being written out to disk \nin a wave \\file::\n\n with open(\"output.wav\", \"wb\") as f:\n audiogen.sampler.write_wav(f, beats)\n\nGenerators' at-consumption-time computation also allows creating \ninfinitely long output, e.g. to stream to speakers rather than a file on\ndisk::\n\n audiogen.sampler.write_wav(sys.stdout, audiogen.tone(440))\n\nOr just::\n\n audiogen.sampler.play(audiogen.tone(440))\n\nYou can also use standard generator tools, e.g. the itertools module, to \nhandle audio data::\n\n\tbeep_silence = itertools.chain(audiogen.beep(), audiogen.silence(0.5))\n\tinfinite_beeps = itertools.cycle(beep_silence)\n \n audiogen.sampler.write_wav(sys.stdout, infinite_beeps)\n\t\nSoundcard output\n----------------\n\nThe easiest way to play directly to a soundcard output is to use the \n``audiogen.sampler.play`` function, which will play your samples using \nPyAudio::\n\n import audiogen\n import itertools\n import sys\n \n audiogen.sampler.play(\n itertools.cycle(itertools.chain(audiogen.beep(), audiogen.silence(0.5)))\n )\n\nAlternatively, you could write your wave data to ``stdout``, e.g. ``myaudio.py``::\n\n import audiogen\n import itertools\n import sys\n \n audiogen.sampler.write_wav(\n sys.stdout,\n itertools.cycle(itertools.chain(audiogen.beep(), audiogen.silence(0.5)))\n )\n\nThen pipe to a command line audio player like Sox_::\n\n python myaudio.py | play -t wav -\n\nInstallation\n------------\n\nInstall with::\n\n $ pip install audiogen\n $ pip install --allow-external PyAudio --allow-unverified PyAudio PyAudio\n\nPyAudio is optional. If it's not installed, playing audio via the soundcard with\n``audiogen.sampler.play()`` will not be available, but generating Wave files \u2013 \nincluding for piping to an external player, like ``sox`` \u2013 will work just fine. \n\nNote that to install PyAudio on Mac OS X, you'll need to first install `portaudio`::\n\n $ brew install portaudio\n\nSee also\n--------\n\nProjects built with ``audiogen``:\n\n- `koch `__, a Koch method Morse code trainer and audio generator\n- `afsk `__, a ham radio APRS/Bell-202 audio frequency shift keying encoder\n\nContributing\n------------\n\nGet the source and report any bugs on Github:\n\n https://github.com/casebeer/audiogen\n\nVersion history\n---------------\n\n- 0.1.2 - Add band pass and band stop IIR filters; custom beep lengths from @jhobbs\n- 0.1.1 - Fix multiplexing bug causing increase in pitch when using mixer() to produce\n more than one output channel\n- 0.1.0 - Breaking changes: new arguments to tone(), play() blocks by default\n\n.. _Sox: http://sox.sourceforge.net/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/casebeer/audiogen", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "audiogen", "package_url": "https://pypi.org/project/audiogen/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/audiogen/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/casebeer/audiogen" }, "release_url": "https://pypi.org/project/audiogen/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Generator based tools for working with audio clips.", "version": "0.1.2" }, "last_serial": 2138843, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "8d6e1a4e6374ef1846cc3c00aebf3d57", "sha256": "00d9f198c39445d39c9b7ab7be91d23b57af8543df67f8d45968f0a663b896a0" }, "downloads": -1, "filename": "audiogen-0.0.1.tar.gz", "has_sig": false, "md5_digest": "8d6e1a4e6374ef1846cc3c00aebf3d57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8627, "upload_time": "2013-10-04T01:44:40", "url": "https://files.pythonhosted.org/packages/f9/9a/fa00ebf72687ada8356e969edd4dcfd49ac736f46702faadda90f26fd3f1/audiogen-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "a620d701f6a795d5f52de5f8e2326050", "sha256": "b8ec07f48010e82670f3e7b4fbea9e8cb556d7f3c07ce5da6eea616c7b6cf87d" }, "downloads": -1, "filename": "audiogen-0.0.2.tar.gz", "has_sig": true, "md5_digest": "a620d701f6a795d5f52de5f8e2326050", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8939, "upload_time": "2013-10-04T03:20:27", "url": "https://files.pythonhosted.org/packages/31/d2/b1855490e3976ad171f14c19f076ef863cd8c0995e82ddbe77e4d9b5b1cf/audiogen-0.0.2.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "44a287a6283a75a0d6b0a39331582514", "sha256": "6b4c400e93417c74f7d67fcfc55410076a9ac9074eee6b2c5399f0001b759bc2" }, "downloads": -1, "filename": "audiogen-0.1.1.tar.gz", "has_sig": true, "md5_digest": "44a287a6283a75a0d6b0a39331582514", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10046, "upload_time": "2015-07-24T06:18:09", "url": "https://files.pythonhosted.org/packages/61/48/7347cc59166af66178efb9f4469f37abb6227bf7cf291e629df5c160bd75/audiogen-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "d9b4ae274f69dc463010bd2086c0a887", "sha256": "d1306c3aaad0b7879f4bfa7f40ca14fd184773b8d73c8b79f36df80b95aedde2" }, "downloads": -1, "filename": "audiogen-0.1.2.tar.gz", "has_sig": true, "md5_digest": "d9b4ae274f69dc463010bd2086c0a887", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10614, "upload_time": "2016-05-28T18:22:02", "url": "https://files.pythonhosted.org/packages/ca/8d/4fa087ce16b5ab8572034f562133c71f25ae0c85e336a11fe6c516e84564/audiogen-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d9b4ae274f69dc463010bd2086c0a887", "sha256": "d1306c3aaad0b7879f4bfa7f40ca14fd184773b8d73c8b79f36df80b95aedde2" }, "downloads": -1, "filename": "audiogen-0.1.2.tar.gz", "has_sig": true, "md5_digest": "d9b4ae274f69dc463010bd2086c0a887", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10614, "upload_time": "2016-05-28T18:22:02", "url": "https://files.pythonhosted.org/packages/ca/8d/4fa087ce16b5ab8572034f562133c71f25ae0c85e336a11fe6c516e84564/audiogen-0.1.2.tar.gz" } ] }