0

Windows 8.1, Python 3.4


I'm looking for a Python library that will allow me to beep the speaker on my motherboard for a specified length at a specified frequency. I've looked around, and the main suggestion was to use the winsound module. However, this only sends the sound to my external speaker and not the internal one. I'm looking to try to make a simple chiptune ("8-bit") song using my motherboard speaker. Thanks!

1 Answers1

0

Would this work: https://docs.python.org/2/library/winsound.html ?

Looks similar to C# Console.Beep. pass in frequency and duration.

Waters
  • 343
  • 1
  • 11
  • As I said, that was what I tried. It sends sounds to the external speaker on my system, not the internal one. I haven't found a similar module that works. – Andrew Szoke Aug 25 '15 at 03:49
  • Based on this https://msdn.microsoft.com/en-us/library/windows/desktop/ms679277(v=vs.85).aspx it seems windows will use your default speaker. Try setting it so your Mobo speaker is the default. – Waters Aug 25 '15 at 03:51
  • In the past the beep.sys kernel driver would call `HalMakeBeep`. This HAL function does the low-level port I/O to make the 8254 timer play a square-wave beep on the PC speaker. In Windows 7 beep.sys instead directs beep requests back to the user-mode sound system. You'd have to install a custom driver to get the old behavior back. – Eryk Sun Aug 25 '15 at 13:17