Popular recipes tagged "meta:requires=pygame" and "sound"http://code.activestate.com/recipes/tags/meta:requires=pygame+sound/2013-01-08T18:08:55-08:00ActiveState Code RecipesPlay a Sound File in Python using PyGame (Python)
2013-01-08T18:08:55-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578410-play-a-sound-file-in-python-using-pygame/
<p style="color: grey">
Python
recipe 578410
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/pygame/">pygame</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/sound/">sound</a>).
</p>
<p>This is how you can play an ogg sound file in python using the pygame library. This is part of an article about <a href="http://thelivingpearl.com/2013/01/08/morse-code-and-dictionaries-in-python-with-sound/">Morse Code and Dictionaries in Python</a></p>
Sound in the STL (Python)
2011-08-15T09:28:12-07:00Russell Fosterhttp://code.activestate.com/recipes/users/4178972/http://code.activestate.com/recipes/577843-sound-in-the-stl/
<p style="color: grey">
Python
recipe 577843
by <a href="/recipes/users/4178972/">Russell Foster</a>
(<a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/sound/">sound</a>, <a href="/recipes/tags/stl/">stl</a>).
</p>
<p>I get to use a number of languages and have found Python lacks good sound implementation in it's STL. Sure you can download a module, but many organisations make it difficult to install add ons, and when you hand apps to people you don't want to have to say, first install python, then install x, y, z from these websites. The STL needs to have a module added in that handles sound cross platform. I have noticed people are happy with PyGame. Perhaps adding that to the STL would be good for everybody?</p>
Play sound files with pygame in a cross-platform manner (Python)
2007-06-21T14:16:58-07:00Chris Arndthttp://code.activestate.com/recipes/users/1499228/http://code.activestate.com/recipes/521884-play-sound-files-with-pygame-in-a-cross-platform-m/
<p style="color: grey">
Python
recipe 521884
by <a href="/recipes/users/1499228/">Chris Arndt</a>
(<a href="/recipes/tags/multimedia/">multimedia</a>, <a href="/recipes/tags/pygame/">pygame</a>, <a href="/recipes/tags/sound/">sound</a>, <a href="/recipes/tags/sysadmin/">sysadmin</a>).
Revision 4.
</p>
<p>This simple script shows how to play back a sound file using the mixer module from the pygame library. If you have pygame installed, this will work on all major platforms. The mixer module supports WAV and OGG files with many different sample rates, bits per sample and channels. The script will play back all supported files given on the command line sequentially.</p>