Friday, November 29, 2013

New eBook: Hacking Music and MIDI (and Animation) with Node.js and Clojure

I've written a new ebook. It's a guided tour through four hacks. Two of the hacks are animation hacks which use music gear and a music protocol (MIDI). The other two are 100% music hacks, i.e., one of them is an algorithmic dance music generator in Clojure with Overtone -- which generates original bass lines and plays a standard drum rhythm -- while the other is a drum machine in Node.js and CoffeeScript, with some brief notes on how to modify it to make it algorithmic, and/or change it from a drum machine to a melody player.

Here's the Clojure animation hack:



This is the Node.js animation hack:



I originally started on the Node.js code for my Teaching The Robots To Sing video series. Here's a promo video for that, which demonstrates some of the basic Node.js code you'll see at the beginning of the book:



The book goes much further than that, though, even before it gets into Clojure and Overtone.

The most impressive music hack, I don't have video for, but it uses a simple Markov chain, a standard moombahton drum rhythm, code in Clojure using Overtone, and a corpus of funk basslines to craft unique permutations on a funk/moombahton idea every time it runs.

The book has example code in Clojure using Overtone (and Quil, which is a Clojure wrapper for Processing). It's also got example code in CoffeeScript using Node.js, Socket.io, and CSS3 animation. There's also a few brief, random snippets in Ruby and Common Lisp. This isn't a book for beginners; I don't go through language basics or anything like that.

If you like making music with code, you're probably going to enjoy this book. :-)

There's two editions you can buy: the regular edition, which is a 96-page PDF ebook, plus tons of example code and a bonus guide on how to set up MIDI on Linux (the book assumes you're using OS X), and the deluxe edition, which gives you everything in the regular edition, and then adds on 8 videos (which explain the Node.js and CoffeeScript code in detail). These are my Teaching The Robots To Sing videos; it would cost $96 to buy all these videos individually. Both the regular edition and the deluxe edition have a special launch sale price until Monday: $23 for the regular edition (the 96-page ebook on OS X music/MIDI hacking in Node.js and Clojure, plus a bonus Linux setup guide), and $53 for the deluxe edition (which is the regular edition plus about three and a half hours of demented but informative video).

Regular edition:



Deluxe edition:



(Fair warning, the deluxe version is a colossal download!)

People typically like my products. Here's a bunch of positive feedback on my previous work:





(email from a happy customer)











If you want to see evidence of my knowledge when it comes to hacking music, check out these presentations.

I offer a 100% no-questions-asked refund on all my products. They can be returned for a full refund at any time for any reason whatsoever, or indeed no reason at all. I only want your money if you're happy with what you've bought.

Again, my new ebook, Hacking Music and MIDI (and Animation) with Node.js and Clojure, is on sale now, at special launch prices: $23 for the regular edition and $53 for the deluxe edition. Enjoy, and let me know how you like them!

Regular edition:



Deluxe edition: