[Tutor] Tutor Digest, Vol 59, Issue 16
emmanuel.ruellan at gmail.com
Sun Jan 4 20:25:44 CET 2009
Gerard Kelly wrote:
> Hi everyone, I'm a python noob but I have an ambitious (for me) goal: I
> want to make a simple program that allows you to hear combinations of
> notes according to a vector of frequencies.
> Does anybody know any module that allows you to input a frequency in Hz
> and returns a sound with that frequency, and lets you do that with
> multiple frequencies, so that you can build chords?
The recipe linked below plays sounds composed of a fundamental and a few
harmonics. It requires Pygame and NumPy.
It is out of date, though. I had to change 'Numeric' to 'numpy' and 'Int16'
to 'int16' to get it to work. Moreover NumPy doesn't seem to work with
You can also use TkSnack (http://www.speech.kth.se/snack/). Check the
example named 'notescale' that comes with the module: it defines a function
that receives a frequency as an input and plays a sound; there is also a
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor