This might not be entirely on-topic, but I think it will be interesting anyway. http://www.netjam.org/projects/quoth/ Music generation through dynamic interactive fiction. Pretty neat stuff. There's a short demo video there. I don't see any source, but it's written in smalltalk which runs on Linux and for all I know the guy uses Linux. So it's partially on topic, eh?