[Haskell-beginners] for those who wondered where I was...

Michael Mossey mpm at alumni.caltech.edu
Tue Jun 22 07:03:55 EDT 2010


I started to learn Haskell last year when I wanted a better language to 
implement a computer-assisted music composition system. As GUI-heavy, it 
proved too much of a challenge... learning a new paradigm (functional 
programming), trying to deal with GUI libraries and their documentation 
shortcomings, and dealing with my actual problem on top of that proved 
too much.

I went back to Python.

However, after a time I reassessed my reason for writing any of this 
code in the first place. I realized it made more sense to put my 
available time into ear-training in order to make the meat computer 
between my ears into a better composition system, rather than 
programming one.

In the meantime, some smaller programming tasks came up (non-gui) and I 
started on them a few weeks ago, writing in Python. This involves 
translating a MusicXML document into a midi file, applying some custom 
algorithms I've written to provide greater expressive qualities.

The first Python challenge was to parse the document. I am not aware of 
a MusicXML-specific Python module, so I used their more general XML code.

It took me a few weeks to get a basic input system working. I.e. 
MusicXML documents translated into my own representation, and reasonable 
error checking.

Then I thought, what the heck am I doing? This is a good task for 
Haskell! It was only the GUI challenge that turned me off to Haskell 
last year, but this program is smaller and is purely file-in file-out.

Working with Haskell tonight, in about four hours I replicated several 
weeks of Python work. Yup, this is the right approach.

Mike



More information about the Beginners mailing list