Is there a function in wxPython or anything that can creat a variable frequency sounds?
The only function I know that you can give a sound frequency to is winsound.Beep(frequency, duration), and it may only work on Windows machines. The sound goes to the internal speaker, hence the word beep.
WxPython and PyGame both have sound functions, but you have to supply them with a wave file (.wav). There is also winsound.PlaySound(soundfile, winsound.SND_FILENAME|winsound.SND_ASYNC) that needs a wave file. At least these function drive your external sound system via the sound card.
You could create a series of short wave files of known frequency, there are some audio programs available to do that. Just give each file a name relating to the frequency and load them up to play at random or user selected. Sounds makeshift and it is!
Many moons ago I wrote a code snippet on how to create MIDI soundeffects. It is written in C++ look at:
Would be nice, if one could apply that to Python. There is a PythonMidi package floating around and I am looking at it.
If you want to use Tkinter, there is a sound module called tkSnack you can download. This module will allow you to create a note of a specific frequency and duration and play it via the sound card to an external sound system. See the Python snippet at:
i am using visual studio 2015 and trying to export data which i am importing through excel by the user selected Excel file. Now the importing part has been successfully completed i am using OLEDB Connection but Stuck in exporting the same data to a new Excel file. tried ...
I am creating a program that when you print an author, you must show all the information of all the books that the author has written. Add a new attribute in the Author class that will be "BooksWriting: List (Book)".
I have expanded the program so that it also ...
I am currently creating a simulation of a pizza ordering system in object oriented program. I have some question. the instruction and guideline is long but I will try and cut it down a lot. the instruction is to create a program that simulate a pizza restaurant using ...