Spring 2008

# Algorithmic Composition

4 credits

### Tutorial Description

This tutorial builds on the tools and skills developed in "Virtual Music," and will oversee completion of a computer program to algorithmically generate "Irish" fiddle music through a combination of context-free grammars and Markov chaining. Code will be written primarily in Lisp, though C and Python are likely to be used as well. The code will be fully documented, complete with a clean API and in-depth discussions of the processes used.

### To be discussed

• Composing Indian classical music using FSMs. This gives what seems to be a pertinent example of single-voice music composition using a computer, employing a very simple model of a finite state machine. I'm not exactly sure how they designed the FSM yet, whether it was intuitively engineered or deduced through analysis of existing melodies.

### Additions to code from over spring break

• Ability to export .dot files, using graph.lisp...
• for Markov chains used used in composing
• binary tree representation of a tune's repetition structure on every level (this isn't working quite right)
 MIDI> (make-tree '(1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8)) ((((((1) (2)) ((3) (4))) (((5) (6)) ((7) (8)))) ((((1) (2)) ((3) (4))) (((5) (6)) ((7) (8)))))) MIDI> (print-tree *) (A) (A A) (A B A B) (A B C D A B C D) (A B C D E F G H A B C D E F G H) NIL 
• Conditional probability calculation
• for event pairs
• entire tunes, either as average pair probability, or product of all grain probabilities
• Picky composition function, (picky-compose ...), where a tune is only accepted and printed if its total probability is between two thresholds. There are some issues with calculating a tune's overall probability, because the machine's floating point numbers don't always have enough significant digits to multiply 64 small factions together.

## Other Stuff

• Code - A place to keep current an past copies of code
• Bib - Bibliography page
• discussions in Jim's
http://cs.marlboro.edu/ courses/ spring2008/tutorials/ abe/ algorithmic_composition
last modified Thursday April 24 2008 12:38 pm EDT