[Tutor] Musical note on python
alan.gauld at btinternet.com
Thu Sep 13 01:15:42 CEST 2012
On 12/09/12 14:53, D.V.N.Sarma డి.వి.ఎన్.శర్మ wrote:
> My OS is Windows XP. I have Python 2.7.3(32 bit). My question is
> are there any commands in Python which directly allow me to produce a
> pure note
Have a look at the audioop, wave and winsound modules.
Also PyGame has some tools that try to do platform independent audio...
Access to the sound card is another matter since that is non standard
and determined by the sound drivers exposed by the manufacturer. The
drivers may well vary in capability depending ion the OS in use etc.
You can also use ctypes for direct access to the Windows audio libraries
but that's a whole lot more complicated!
Author of the Learn to Program web site
More information about the Tutor