HELP :: creating new sound format file with audaspace

NeXyon wrote a small audaspace tutorial here. This gave me an idea to use python to try and create a random music generator that pickles the notes and to use the parser that NeXyon wrote. Because it is not commented, I am having trouble understanding it, but I hardly comment my code either. I wanted to know the details of what that function does so I could write my own version. There are also a few things I wanted to know about audaspace, and I wanted help with this project. Can audaspace only create midi sounds, or is there a way to synth complex instruments; like drums and snares? Any tips to make my random music not sound like crap? I was thinking of using a pattern dictionary to give the music structure. This song generator will use the corresponding note letters to create music; along with note lengths and clefs. These scripts will be released as open-source resources; if this can be feasibly done.

If I could contact NeXyon, I would ask him, but I doubt he wants to be bothered.

tldr; comment parser function in link, use audaspace to make drumming sounds, tips on making structured random-generated music.