Drawing sound

Jeff Sandys sandysj at juno.com
Fri Sep 24 19:45:22 EDT 2004


If you want to play specific notes there are several 
Python Midi packages available.

Here is a neat article on how to do a power spectral 
density diagram (draw sound):

http://www.onlamp.com/pub/a/python/2001/01/31/numerically.html

I think what you are asking is to drag the mouse on a 
canvas and then 'play' the canvas as though it were a 
piano roll?  Something like what the MIT Media Lab 
program 'Hyperscore' does.

Because Python is soooo cross platform there is no one 
way to generate tones on all these platforms, like in 
qbasic.  Tinker for the graphics and PyMidi or Snack 
would be your best bet on windows.  Pygame has graphics 
and sound capabilities.  Other ways are available.

Thanks,
Jeff Sandys

Chris wrote:
> 
> I want a program that can "draw" sound.
> 
> Imagine drawing a graph of frequency against time -
> and then being able to play it over the computer speakers.
> 
> Can this be done in Python?
> 
> As a start, consider this simple QBASIC program that 
> generates random frequencies:
> 
> 10 frequency = 40 + 400 * RND
> 20 SOUND frequency, 7
> 30 GOTO 10
> 
> That's fine - except that it plays over the PC speaker - 
> the one that's just there for the happy beep - and not 
> through the sound card and proper speakers.
> 
> Can that be done in Python?
> Or in any other language?
> --
> Chris



More information about the Python-list mailing list