tone generation for motherboard and sound card speakers?

Gregory Ewing greg.ewing at canterbury.ac.nz
Mon May 17 04:26:05 EDT 2010


Alex Hall wrote:

> Also, is there a module to generate tones in Python using the sound
> card? A module that can beep at a given frequency for a given time
> using the usual sine wave is okay, but the fancier the better
> (different waves, sweeping, and so on).
> 
> My final question will likely hinge upon the answer to the second
> question, but is there a way to play a tone in a given position in the
> stereo field?

The mixer module of pygame will do all of this, I think:

    http://www.pygame.org/

You may find the rest of pygame useful for implementing your
battleship game as well, if you haven't already chosen a library
for that.

-- 
Greg



More information about the Python-list mailing list