Easy way to play single musical notes in Python

James Harris james.harris.1 at googlemail.com
Tue Nov 17 11:55:33 EST 2009


On 15 Nov, 05:41, r <rt8... at gmail.com> wrote:
> 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+...

As I say I was hoping to avoid tk. Thanks for the feedback though. If
nothing else is suggested I'll have to try snack.

James



More information about the Python-list mailing list