Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > tone generation for motherboard and sound card speakers?

Reply
Thread Tools

tone generation for motherboard and sound card speakers?

 
 
Alex Hall
Guest
Posts: n/a
 
      05-17-2010
Hi all,
I am wondering if there is a way to generate a tone for the
motherboard speaker, like the call to Beep() in C++?

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? For example, I have a Battleship tactical board (my name
for where the little red and white pins go) which I am trying to
sonify using different tones for each status (not fired on, ship
sighted, ship hit, ship sunk). I want each row to play, from top to
bottom, but each square in each row should start at the left and
continue to the last square playing in the right speaker, giving the
user a better idea of where each square is. Oh, this is for blind
users, in case you were wondering why anyone would want to sonify a
battleship board.
Thanks for any information, and note that I am using Python2.6; unless
there is an easy way to use a module meant for 2.5 or before inside a
2.6 project, I would need a 2.6 module.

--
Have a great day,
Alex (msg sent from GMail website)
http://www.velocityreviews.com/forums/(E-Mail Removed); http://www.facebook.com/mehgcap
 
Reply With Quote
 
 
 
 
Gregory Ewing
Guest
Posts: n/a
 
      05-17-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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bridge Sound from TV Tuner Card to onboard Sound Card? Spare Computer Support 0 03-02-2008 03:55 PM
Mobo On-Board Sound + PCI Sound Card? John E Computer Support 24 10-01-2007 05:53 AM
Playing sound through non default sound card dkga_dkga@yahoo.com Java 0 03-05-2006 04:38 AM
Sound card problem : Creative sound blaster live Marco Bakker Computer Support 2 08-29-2004 02:09 AM
How do I replace sound chip on motherboard with sound card? John Computer Support 3 05-06-2004 11:47 PM



Advertisments