BASIC vs Python

Andrew Dalke dalke at dalkescientific.com
Sun Dec 19 15:17:10 EST 2004


Dennis Lee Bieber wrote:
> 	<heh> for the A above middle-C... The other A's would be: 55,
> 110, 220, (440), 880, 1760...

And for a while I had the first few digits of the 12th root
of 2 memorized.

> 	Granted... But it seemed the starting complaint was that Python
> -- a language that tries to stay portable -- doesn't have things that
> tend to be highly platform specific built-in...

My complaint is that I don't understand why basic sound should
be any less platform specific these days than GUIs.  Where's
the Tk/wx/Qt/FLTK/... equivalent to sound?

There was a very good summary of sound libraries by Alia Khouri
a few months ago on this list:
  http://mail.python.org/pipermail/python-list/2004-October/248738.html
and it includes a Parnassus link
  http://www.vex.net/parnassus/apyllo.py/63131194


It looks like FMOD/PySonic is the closest to what I'm thinking
of, and Snack coming in second.  I didn't look too deeply.  Most
of them only play sound clips (mp3, wav, etc.) and don't have
a way to specify what notes to play.

That is, I'm looking for something that would have let me
(were I 20 years younger and just starting to program)
do one of the "songs" I made in the early 1980s where I
generated notes at random.  It was something like:

  randomize
  for i=1 to 1000 do
    call sound(10, int(262+262*RND))
  next i

In the mid-1990s I went to UIUC's "Festival of Ugly New Music"
concert which had a lot of computer generated music.  It
included some historical pieces.  One from the 60s or 70s
sounded very much like my program above.  It was strange,
btw, that people applauded after a piece was played even
though there was no one on the stage, and even for the pieces
where the composer wasn't there.

I know about csound and Supercollider.  I don't think they
are that easy to use.  They aim for power not simplicity.

				Andrew
				dalke at dalkescientific.com




More information about the Python-list mailing list