![]() |
Mag /
|
SearchWiki Recent Changes Edit Page Page History |
Fractals and Music
Music, especially classical music, relies heavily on repeating themes and self similarity. It is, for example, a common practice to use mathematical thransformations, such as temporal and pitch shifts, reversals and inversions, when writing cannons and fuges. Bach in particular was a master of this art.
It is therefore not surprising that strong ties can be found between fractals and musical compositions. This leads one to believe that it is theoretically possible to turn fractals into music and vise versa. The Fractal Music Generator is my attempt to generate simple melodies based on well known fractal patterns.
Fractal Music Generator
The fractal music generator can be downloaded here.
The steps required to build it are as follows (tested only on Linux):
1. Obtain and build improv, a library for programming MIDI
if you are using gcc 3.0 or higher, you will need to apply this patch to make it compile, like so:
wget http://improv.sapp.org/download/improv-2.3.1.tgz tar zxvf improv-2.3.1.tgz wget http://www.luminal.org/files/fmg/improv-gcc-3.0.patch.gz cd improv gzcat ../improv-gcc-3.0.patch.gz | patch -p1 make library
2. Obtain, extract and compile a copy of fmg
you might have to adjust the IMPROVD variable in the Makefile to point to the location of the improv library
wget http://www.luminal.org/files/fmg/fmg-0.1.tag.gz tar zxvf fmg-0.1.tar.gz cd fmg make
3. Here are some examples of using fmg:
Using default parameters:
./fmg -o test.mid
500 successfully notes written to test.mid
Specify the midi voice to use:
./fmg -i woodflut -o test.mid
500 successfully notes written to test.mid
Specify the fractal to use:
./fmg -f fractal -o test.mid
Fractal 'fractal' not found!
Available fractals are:
henon
tinkerbell
lorenz
All together:
./fmg -o henon.mid -i soundtrk -f henon
500 successfully notes written to henon.mid
Samples
Here is some sample music generated with FMG:
Credits