Sunday, 4 April 2010

Keykit | Algorithmic Composition Software

Keykit is a piece of algorithmic composition software that the developer describes as 'a programming language and graphical interface for manipulating and generating music'. It runs on Windows and Linux and is a free download available here: http://www.nosuch.com/keykit

Keykit read and write MIDI files so it can also be easily integrated with other programes and has a number of useful algorithmic composition tools:
We'll have a quick look at a couple of the algorithmic composition tools available:



Using Markov Chains for Algorithmic Composition
We'll use the Markov Maker tool to generate new MIDI files algorithmically. Markov chains choose the next note based on a probability factor. In the first example below, if our current note is an A, there is a 10% chance of the following note being an A again, a 60% chance of the following note being a C# and a 30% chance of the following note being an Eb. This table is called a transition matrix.



As shown in the second example, we can also base our next note choice on the previous two notes. This is called a second order Markov Chain. So for example if the previous two notes were G then D there would be a 100% probability of the following note being an A.

Transition tables can be created by hand, filling in the values that you'd like to work with, or we can create the transition table by analysing an existing piece of music, for example loading up a Mozart piano sonata and generating the transition table dile directly from this. Working with Markov chains in this way you can here the algorithmically generated piece having some similarities to the source piece of music. The higher order markov chain, the greater the similarity to the original.

"The "Markov Maker" tool lets you create music with markov-chain techniques. The top phrase window displays some existing piece of music that you read in, and the bottom phrase window display a "similar" piece of music that is created by the "Markov Maker."



1. Load up keykit and in a blank space, click and select tools 2, markov maker

2. Click - original -read file / load Smf. This allows you to load up a source piece of music in the Standard Midi File format.

3. Click original - set sim, the two values are the window size and window increment, the best settings depend on the source material and desired effect so do experiment.

4. Click the grey sim box, choose make sim and the number of generations you want to create. Every generation will sound different, you may need to experiment with the 'set sim' settings (step 3).



5. To save the file, click the grey sim box and choose snarf.


6. Click in a blank space and from tools 1 menu choose group.


7. In the group tool, choose file, read snarf. This will paste your markov generated composition into the group tool.

8. To save as a standard midi file, in the group tool click file, write / standard MIDI file.

We'll look at some further implementations of Markov Chains in future posts including creating implementations in PureData, Max and Lisp, so check back soon!

No comments:

Post a comment