Tuesday, January 22, 2008

Extremely Informal Dynamic Music Demo

So I haven't been blogging as much as I usually do, at least not about Ruby or programming. Here's what I've been up to. It's a useful but very informal screencast, purely in case you happen to be curious. It relates to my experiments generating music via Ruby.

Unfortunately the actual audio sounds like crap, because I set the music-generating code to a higher process priority than the screencast video capture code, which was pretty unwise of me. But it could be interesting. The first interesting part is that I created a way overkill Object Architecture™ and had to scuttle it in favor of a quick hack, based on Ezra Zygmuntowicz' saying that everything great starts as a hack.

The other interesting part is that my first implementation took arrays of notes arranged in the order to play and played them, whereas my new hack implementation takes an array of notes arranged in no order at all, but each one has a programmatic rule about when it likes to be played, and the new hack version plays the notes by testing against the programmatic rule.

However, it's just a quick progress report, some people might dig it, some might not, so I just threw it together real quick.

115MB QuickTime .mov file.