
Shae Matijs Erisson wrote:
I've used Haskore before, but I wasn't able to figure out how to make infinte compositions. I'd like to try turning a lorenz fractal into music, could you point me to an example of such an infinite song?
Here is some non-periodic song based on a sequence of natural numbers: http://cvs.haskell.org/darcs/haskore/src/Example/Flip.hs A Markov chain can also be used to produce infinite songs: http://cvs.haskell.org/darcs/haskore/src/Example/Kantate147.hs
Can you actually play such a thing from Haskore?
Yes, but with restrictions. You can render the music into an audio stream which you pipe through some external player like Sox' 'play' command. I successfully did this: http://cvs.haskell.org/darcs/synthesizer (Presentation.playMusicSignal) but the rendering of signals does not allow much polyphony or complicated sounds. MIDI files unfortunately have a length specification in the header, thus they can't be infinite, unless there is a trick to define open-end tracks. Nevertheless, the MIDI functions can now handle infinite music properly. MidiFile is also based on relative times which is essential for long music. Someone told me that CSound is also able to receive song information through a pipe, but I couldn't get this running so far. :-(