Easy way to play single musical notes in Python

r rt8396 at gmail.com
Sun Nov 15 00:41:03 EST 2009


On Nov 14, 6:21 pm, James Harris <james.harri... at googlemail.com>
wrote:
> Is there a simple way to play musical notes in Python? Something like
>   voice.play("c4")


Uhh, tksnack is pretty easy to use IMO, see this link...
http://www.daniweb.com/code/snippet216655.html

No python does not have access to cross platform soundcard
capabilities built into the language. I think there is a wrapper for
csound somewhere. But there are many 3rd party modules that do have
capabilities to some extent. You could make calls to the underlying OS
machinery and there is the winsound module (not exactly what you want
though). Just look over this Google splooge...

http://www.google.com/search?hl=en&rlz=1C1CHMI_enUS340US340&q=Python+sound&aq=f&oq=&aqi=g10



More information about the Python-list mailing list