tone generation for motherboard and sound card speakers?

Discussion in 'Python' started by Alex Hall, May 17, 2010.

  1. Alex Hall

    Alex Hall Guest

    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.facebook.com/mehgcap
     
    Alex Hall, May 17, 2010
    #1
    1. Advertising

  2. 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
     
    Gregory Ewing, May 17, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Randy Thelen
    Replies:
    9
    Views:
    1,047
    Stephen Williams
    Apr 17, 2004
  2. Replies:
    0
    Views:
    520
  3. Mark Dalgarno
    Replies:
    0
    Views:
    339
    Mark Dalgarno
    Jan 8, 2008
  4. Mark Dalgarno

    ANN: Final Call for Speakers - Code Generation 2008

    Mark Dalgarno, Jan 8, 2008, in forum: C Programming
    Replies:
    0
    Views:
    325
    Mark Dalgarno
    Jan 8, 2008
  5. Macky G
    Replies:
    3
    Views:
    1,201
    Macky G
    Jun 30, 2009
Loading...

Share This Page