{ "info": { "author": "Albert Zeyer", "author_email": "albzey@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: MacOS X", "Environment :: Win32 (MS Windows)", "Environment :: X11 Applications", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: BSD License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: C++", "Programming Language :: Python", "Topic :: Multimedia :: Sound/Audio", "Topic :: Multimedia :: Sound/Audio :: Analysis", "Topic :: Multimedia :: Sound/Audio :: Players", "Topic :: Multimedia :: Sound/Audio :: Players :: MP3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "==========================\nMusic player Python module\n==========================\n\nThis Python module provides a high-level core Music player interface where you are supposed to provide all the remaining high-level logic like the user interface, the playlist logic and the audio data.\n\nExample\n=======\n\nA very simple player with gapless playback:\n\n.. code-block:: python\n\n\timport musicplayer, sys, os, fnmatch, random, pprint, Tkinter\n\t\n\tclass Song:\n\t\tdef __init__(self, fn):\n\t\t\tself.url = fn\n\t\t\tself.f = open(fn)\n\t\t# `__eq__` is used for the peek stream management\n\t\tdef __eq__(self, other):\n\t\t\treturn self.url == other.url\n\t\t# this is used by the player as the data interface\n\t\tdef readPacket(self, bufSize):\n\t\t\treturn self.f.read(bufSize)\n\t\tdef seekRaw(self, offset, whence):\n\t\t\tr = self.f.seek(offset, whence)\n\t\t\treturn self.f.tell()\n\t\n\tfiles = []\n\tdef getFiles(path):\n\t\tfor f in sorted(os.listdir(path), key=lambda k: random.random()):\n\t\t\tf = os.path.join(path, f)\n\t\t\tif os.path.isdir(f): getFiles(f) # recurse\n\t\t\tif len(files) > 1000: break # break if we have enough\n\t\t\tif fnmatch.fnmatch(f, '*.mp3'): files.append(f)\n\tgetFiles(os.path.expanduser(\"~/Music\"))\n\trandom.shuffle(files) # shuffle some more\n\t\n\ti = 0\n\t\n\tdef songs():\n\t\tglobal i, files\n\t\twhile True:\n\t\t\tyield Song(files[i])\n\t\t\ti += 1\n\t\t\tif i >= len(files): i = 0\n\t\n\tdef peekSongs(n):\n\t\tnexti = i + 1\n\t\tif nexti >= len(files): nexti = 0\n\t\treturn map(Song, (files[nexti:] + files[:nexti])[:n])\n\t\n\t# Create our Music Player.\n\tplayer = musicplayer.createPlayer()\n\tplayer.outSamplerate = 96000 # support high quality :)\n\tplayer.queue = songs()\n\tplayer.peekQueue = peekSongs\n\t\n\t# Setup a simple GUI.\n\twindow = Tkinter.Tk()\n\twindow.title(\"Music Player\")\n\tsongLabel = Tkinter.StringVar()\n\t\n\tdef onSongChange(**kwargs): songLabel.set(pprint.pformat(player.curSongMetadata))\n\tdef cmdPlayPause(*args): player.playing = not player.playing\n\tdef cmdNext(*args): player.nextSong()\n\t\n\tTkinter.Label(window, textvariable=songLabel).pack()\n\tTkinter.Button(window, text=\"Play/Pause\", command=cmdPlayPause).pack()\n\tTkinter.Button(window, text=\"Next\", command=cmdNext).pack()\n\t\n\tplayer.onSongChange = onSongChange\n\tplayer.playing = True # start playing\n\twindow.mainloop()\n\n\n\nDescription\n===========\n\nIt provides a player object which represents the player. It needs a generator `player.queue` which yields `Song` objects which provide a way to read file data and seek in the file. See the source code for further detailed reference.\n\nIt has the following functionality:\n\n* open source (simplified BSD license, see `License.txt `_)\n* very simple interface\n* support of most important sound formats (MP3, Flac, Ogg Vorbis, WMA, AAC / ALAC m4a, ...)\n\n* Plays audio data via the player object. Uses `FFmpeg `_ for decoding and `PortAudio `_ for playing.\n* Of course, the decoding and playback is done in seperate threads. You can read about that `here `_.\n* Supports any sample rate via ``player.outSamplerate``. The preferred sound device is set via ``player.preferredSoundDevice``. Get a list of all sound devices via ``getSoundDevices()``.\n* Can modify the volume via ``player.volume`` and also ``song.gain`` (see source code for details).\n* Prevents clipping via a smooth limiting functions which still leaves most sounds unaffected and keeps the dynamic range (see ``smoothClip``).\n* `ReplayGain `_ (for audio volume normalization) (see ``pyCalcReplayGain``). This is as far as I know the only other implementation of ReplayGain despite the original from `mp3gain `_ (`gain_analysis.c `_).\n* `AcoustId `_ audio fingerprint (see ``pyCalcAcoustIdFingerprint``). This one is also used by `MusicBrainz `_. It uses the `Chromaprint `_ lib for implementation.\n* Provides a simple way to access the song metadata.\n* Provides a way to calculate a visual thumbnail for a song which shows the amplitude and the spectral centroid of the frequencies per time (see ``pyCalcBitmapThumbnail``). Inspired by `this project `_.\n* `Gapless playback `_\n\n\nUsages\n======\n\nThe main usage is probably in the `MusicPlayer project `_ - a full featured high-quality music player.\n\n\nInstallation\n============\n\nTo get the source working, you need these requirements:\n\n* boost >=1.55.0\n* ffmpeg >= 2.0 (including libswresample)\n* portaudio >=v19\n* chromaprint\n\nDebian/Ubuntu\n+++++++++++++\n\n::\n\n apt-get install python-dev libsnappy-dev libtool yasm libchromaprint-dev portaudio19-dev libboost-dev\n\nFFmpeg in Debian/Ubuntu is too old (lacks libswresample), so either do::\n\n add-apt-repository ppa:jon-severinsson/ffmpeg\n apt-get update\n apt-get install libavformat-dev libswresample-dev\n \nor install it from source.\n\nMacOSX\n++++++\n\n::\n\n\tbrew install boost\t\n\tbrew install portaudio\n\tbrew install ffmpeg\n\tbrew install chromaprint\n\nOther notes\n+++++++++++\n\n`Chromaprint `_ depends on FFmpeg, so if you have a custom FFmpeg install, you might also want to install that manually. ``./configure && make && sudo make install`` should work for FFmpeg and PortAudio. You might also want to use ``--enable-shared`` for FFmpeg. ``cmake . && sudo make install`` for Chromaprint.)\n\nBuilding\n++++++++\n\nThen call ``python setup.py build`` or ``./compile.py`` to build the Python modules (it will build the Python module ``musicplayer.so``).\n\nThe module is also registered `on PyPI `_, so you can also install via::\n\n\teasy_install musicplayer\n\n.. image:: https://travis-ci.org/albertz/music-player-core.png\n :target: https://travis-ci.org/albertz/music-player-core\n\n\nSimilar projects\n================\n\n* *Overview* in Python Wiki: `Audio modules `_ and `Music software `_.\n\n* `PyAudio `_. MIT License. PortAudio wrapper. Thus, pretty low-level and no decoding functionality. Last update from 2012.\n* `PyFFmpeg `_. LGPL. FFmpeg wrapper. Thus, prettylow-level and no sound output. You could probably glue PyFFmpeg and PyAudio together for something useful but I expect it to be quite unstable and too slow. Basically, tis glue is done in C++ in this module.\n* `GStreamer Python Bindings `_. GStreamer is powerful but still too limited as a cross-platform music player backend solution. Quite heavy. That was my intuition. Maybe it's wrong and it would have been a perfect solution. But I think, in contrast, this module does a lot of things in a more compact and automatic/simpler way and at the same time provides more music player centric features.\n* `Beets `_. In its core, it is a music library manager and manages the metadata. It can calculate ReplayGain and AcoustID fingerprint. Via BPD plugin, it becomes a MPD compatible daemon player, based on GStreamer.\n\nProbably dead projects:\n\n* `PyMedia `_. LGPL, GPL. FFmpeg-based encoding/decoding of audio+video, sound input/output via OSS/Waveout/Wavein. Unfornutaley not well tuned for usage in a high-quality music player. Last update from 2006.\n* `Audiere `_. LGPL. High-level audio API, supports many sound formats and sound output on Windows/Linux. Last update from 2006.", "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/albertz/music-player-core", "keywords": null, "license": "2-clause BSD license", "maintainer": null, "maintainer_email": null, "name": "musicplayer", "package_url": "https://pypi.org/project/musicplayer/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/musicplayer/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/albertz/music-player-core" }, "release_url": "https://pypi.org/project/musicplayer/1.20141030.091600/", "requires_dist": null, "requires_python": null, "summary": "Music player core Python module", "version": "1.20141030.091600" }, "last_serial": 1288284, "releases": { "0.8": [ { "comment_text": "", "digests": { "md5": "833c56d2fc1f09293d9a7ebc1a119137", "sha256": "18410ca3f136c45bc0aa27b2d8db4c2f5a035e8a933fb056c5e14fd9614ed29d" }, "downloads": -1, "filename": "musicplayer-0.8.tar.gz", "has_sig": false, "md5_digest": "833c56d2fc1f09293d9a7ebc1a119137", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37685, "upload_time": "2014-01-30T10:35:50", "url": "https://files.pythonhosted.org/packages/33/14/bf9c3fa36d7ceca830b0011d591b2e4dcd32ecbf2f72166540677f944a11/musicplayer-0.8.tar.gz" } ], "1.20140130.114732": [ { "comment_text": "", "digests": { "md5": "4f258c7503844d4a6a9a2a545ae7580d", "sha256": "aa119e50ead0be5b0c045fda8b23c2ad6315cd0027e7281c383246a201b41419" }, "downloads": -1, "filename": "musicplayer-1.20140130.114732.tar.gz", "has_sig": false, "md5_digest": "4f258c7503844d4a6a9a2a545ae7580d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39712, "upload_time": "2014-01-30T11:47:35", "url": "https://files.pythonhosted.org/packages/c4/a8/2561087a394ee34d7072d5b9f3daca9f72f270fa386ce6e219ec887878f2/musicplayer-1.20140130.114732.tar.gz" } ], "1.20140130.114846": [ { "comment_text": "", "digests": { "md5": "f2a2bc8c72d844e1841cb5e593321efb", "sha256": "7942b0205484cbad7ad2e3f703f37d809484abc923c993d00097ed90b6cf1999" }, "downloads": -1, "filename": "musicplayer-1.20140130.114846.tar.gz", "has_sig": false, "md5_digest": "f2a2bc8c72d844e1841cb5e593321efb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50016, "upload_time": "2014-01-30T11:48:49", "url": "https://files.pythonhosted.org/packages/e7/ae/1398fd172762f1c3c5cc531a9cdb05e8446c694cfc3775de841c754cbcab/musicplayer-1.20140130.114846.tar.gz" } ], "1.20140130.123608": [ { "comment_text": "", "digests": { "md5": "42f4bc4f20b37596120acb366c19d3f4", "sha256": "07b56fa69131b2a8eb0b8da4ccd748b80c427a185e761e5193876d1e945dec51" }, "downloads": -1, "filename": "musicplayer-1.20140130.123608.tar.gz", "has_sig": false, "md5_digest": "42f4bc4f20b37596120acb366c19d3f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37641, "upload_time": "2014-01-30T12:36:10", "url": "https://files.pythonhosted.org/packages/02/a1/5671227763d122c84239510a38903d0eebc5133ef72f6d3628b2ab7dbf3a/musicplayer-1.20140130.123608.tar.gz" } ], "1.20140130.123758": [ { "comment_text": "", "digests": { "md5": "c1810655d71ed9d43360c6f08375a17a", "sha256": "88f2ac291e05ca6f43737b0778c03b894b300a7b548ee020883b2924d6b1a027" }, "downloads": -1, "filename": "musicplayer-1.20140130.123758.tar.gz", "has_sig": false, "md5_digest": "c1810655d71ed9d43360c6f08375a17a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48160, "upload_time": "2014-01-30T12:38:00", "url": "https://files.pythonhosted.org/packages/72/c1/8cfbadb65ea883fe16df718aa1eebbebb0730a8304a64f90a4eb3b0a69ed/musicplayer-1.20140130.123758.tar.gz" } ], "1.20140130.124048": [ { "comment_text": "", "digests": { "md5": "383d14aeaf5caf69e699f84fe11e73e1", "sha256": "e825c06cfb826f5226d68c1a72d6c2fd98240aef7a95a2727fbacd384529ee2c" }, "downloads": -1, "filename": "musicplayer-1.20140130.124048.tar.gz", "has_sig": false, "md5_digest": "383d14aeaf5caf69e699f84fe11e73e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48988, "upload_time": "2014-01-30T12:40:50", "url": "https://files.pythonhosted.org/packages/b5/10/090a202514b3f7b6ca143005f31f8d8ef898af0f18782cbf34c40758b56a/musicplayer-1.20140130.124048.tar.gz" } ], "1.20140130.133317": [], "1.20140130.133402": [ { "comment_text": "", "digests": { "md5": "beb1189494d6f523b31be86e18ed8493", "sha256": "0a6de777680c82a032dd6bed7205ce199d2954a6dd6b7a6108410b43cf16e56b" }, "downloads": -1, "filename": "musicplayer-1.20140130.133402.tar.gz", "has_sig": false, "md5_digest": "beb1189494d6f523b31be86e18ed8493", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49103, "upload_time": "2014-01-30T13:34:05", "url": "https://files.pythonhosted.org/packages/78/24/700040948b5ca68c106938b22aa6258e901bfaf0717f16f764846855e985/musicplayer-1.20140130.133402.tar.gz" } ], "1.20140131.161536": [ { "comment_text": "", "digests": { "md5": "d7119e656b0e2ab1cd73675ddeae8ec1", "sha256": "11691f5d0578479c0c854735058fa6aeb34628bb67f3f83c623f4cef8a7af815" }, "downloads": -1, "filename": "musicplayer-1.20140131.161536.tar.gz", "has_sig": false, "md5_digest": "d7119e656b0e2ab1cd73675ddeae8ec1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49169, "upload_time": "2014-01-31T16:15:46", "url": "https://files.pythonhosted.org/packages/c5/10/e78d8d4273d52b37107ade605be9f554cdfe8f4fec966dd4aa99c7db1779/musicplayer-1.20140131.161536.tar.gz" } ], "1.20140211.143037": [ { "comment_text": "", "digests": { "md5": "4f6b3485fd4ba1534500e8eb5ef98eb0", "sha256": "4b2e0a093a3319f5f3130f9440080c91c006d5a1e773487ba68a15e14e5dfd7d" }, "downloads": -1, "filename": "musicplayer-1.20140211.143037.tar.gz", "has_sig": false, "md5_digest": "4f6b3485fd4ba1534500e8eb5ef98eb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49439, "upload_time": "2014-02-11T14:30:44", "url": "https://files.pythonhosted.org/packages/49/f3/0a63de1398844a0326fdc57becd436f2d958c3e8376d958345cb06cc26e7/musicplayer-1.20140211.143037.tar.gz" } ], "1.20140227.205427": [ { "comment_text": "", "digests": { "md5": "88c5fa2c6bd557188d358d0026f4305f", "sha256": "156ee190b0945d9c6847af0bb33d7f2146090f8190257d752ae1b5a2c4d6e0d5" }, "downloads": -1, "filename": "musicplayer-1.20140227.205427.tar.gz", "has_sig": false, "md5_digest": "88c5fa2c6bd557188d358d0026f4305f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49713, "upload_time": "2014-02-27T20:54:34", "url": "https://files.pythonhosted.org/packages/58/4c/02d37579e655738158dd5c5fbe766e4798221a2db4bd6d87a7f314518403/musicplayer-1.20140227.205427.tar.gz" } ], "1.20141011.151640": [ { "comment_text": "", "digests": { "md5": "4ee23f9644b45f45e42ca35c3d409fdf", "sha256": "e932c63909a3592193fb51e626c6aa9be14164e36c97715dbc36669a1728364a" }, "downloads": -1, "filename": "musicplayer-1.20141011.151640.tar.gz", "has_sig": false, "md5_digest": "4ee23f9644b45f45e42ca35c3d409fdf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49943, "upload_time": "2014-10-11T15:17:08", "url": "https://files.pythonhosted.org/packages/fb/9a/483934ca69f94c0b9da99c60f2e330f765f8d88a3bdc4c489d3f1b282712/musicplayer-1.20141011.151640.tar.gz" } ], "1.20141015.065824": [ { "comment_text": "", "digests": { "md5": "50c338dc1e691b1fc1330e962d42b166", "sha256": "87bfad030ad865c81b279dbdc1402b76f93c267f86b33c4238519c2217ca3eff" }, "downloads": -1, "filename": "musicplayer-1.20141015.065824.tar.gz", "has_sig": false, "md5_digest": "50c338dc1e691b1fc1330e962d42b166", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50701, "upload_time": "2014-10-15T06:58:57", "url": "https://files.pythonhosted.org/packages/07/b2/51d9749c9474b908688a6beb466b50383e2c6c4a7ece6203502e811c0338/musicplayer-1.20141015.065824.tar.gz" } ], "1.20141030.091600": [ { "comment_text": "", "digests": { "md5": "489e2cf4dc28bc35bda13f9c9b38e984", "sha256": "7b32f0fa273367c606df40463f0683ca1eb66bb7cb8d18ee92d2fb8eeb48f2dd" }, "downloads": -1, "filename": "musicplayer-1.20141030.091600.tar.gz", "has_sig": false, "md5_digest": "489e2cf4dc28bc35bda13f9c9b38e984", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51139, "upload_time": "2014-10-30T09:16:11", "url": "https://files.pythonhosted.org/packages/7f/e2/7a1890044c7cb2073b83924b5868eea55207317c12092d9615869381dc7e/musicplayer-1.20141030.091600.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "489e2cf4dc28bc35bda13f9c9b38e984", "sha256": "7b32f0fa273367c606df40463f0683ca1eb66bb7cb8d18ee92d2fb8eeb48f2dd" }, "downloads": -1, "filename": "musicplayer-1.20141030.091600.tar.gz", "has_sig": false, "md5_digest": "489e2cf4dc28bc35bda13f9c9b38e984", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51139, "upload_time": "2014-10-30T09:16:11", "url": "https://files.pythonhosted.org/packages/7f/e2/7a1890044c7cb2073b83924b5868eea55207317c12092d9615869381dc7e/musicplayer-1.20141030.091600.tar.gz" } ] }