music resources

Donn Cave donn at drizzle.com
Tue Aug 17 08:55:53 CEST 2004


Quoth "Elaine Jackson" <elainejackson7355 at home.com>:
| Is there such a thing as an executable language for music? If not, why not? An
| if yes, where can I find it? Naturally the ideal thing would be if such a
| language were implemented within python, but I would be willing to learn a
| lesser programming language if I had a reasonable assurance that it had what I
| looking for. I have, of course, googled for a solution, and I may have even
| found it, but if so I didn't recognize it as such. Any pointers will be mucho
| appreciado.

There's Haskore, which you could probably find via the main Haskell site,
http://www.haskell.org   Don't know if it's what you're looking for, but
though it isn't Python, don't worry that Haskell might be a lesser
programming language.

Here's an example from early in the tutorial:
   tune1 :: Music

   tune1 = let v = Volume 150
       in  c 8 hn [v] :+: e 8 hn [v] :+: g 8 hn [v] :+:
           c 9 hn [v] :+: a 8 hn [v] :+: c 9 qn [v] :+:
           a 8 qn [v] :+: g 8 dhn [v]:+: qnr

I haven't ever tried to use Haskore, but I assume that in "c 8 hn [v]",
"c 8" is the pitch, "hn" is "half note", and [v] is the first and only
volume for the note.  ':+:' is some function that binds these notes
together in a tune.  There is quite a bit of support for computer
generation of tones, too.

	Donn Cave, donn at drizzle.com



More information about the Python-list mailing list