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. http://osdir.com/ml/culture.people.kragen.hacks/2007-11/msg00000.html 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 Python 2.6. 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 graphical interface. Regards, Emmanuel
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor