[Tutor] Sound and Python

Michael Lange klappnase at freenet.de
Mon Nov 3 13:26:25 EST 2003


On Sun, 2 Nov 2003 23:42:11 -0800 (PST)
Danny Yoo <dyoo at hkn.eecs.berkeley.edu> wrote:

> 
> 
> On Sun, 2 Nov 2003, Mike Wagman wrote:
> 
> > Can anyone point me to some tutorials on putting sound in python
> > programs.
> 
> Hi Mike,
> 
> 
> I've heard that the 'pygame' module has a good sound module; you can find
> out more from its web site:
> 
>    http://pygame.org
> 
> It's been a while since I've played with pygame, but it seemed to be a
> really nice toolkit for doing multimedia stuff.  I think it might even be
> as easy as:
> 
> ###
> import pygame
> pygame.init()
> sound = pygame.mixer.Sound("SomeWaveFile.wav")
> sound.play()
> ###
> 

Another nice sound module is tkSnack : www.speech.kth.se/snack
Snack handles wav, mp3 and a lot of other formats, the usage is pretty easy, comparable to the pygame
example above.

Cheers

Michael



More information about the Tutor mailing list