I often find it easier to understand what I'm hearing when I can see a visual representation of the music. This has become more important as I've been experimenting with generative music. I'm starting to give up full control over the composition process and it's not always clear what the results are without a lot of repeated listens.
Unfortunately, Max/MSP doesn't have much support for standard music notation. So I've been experimenting with generating notation inside Max/MSP using LilyPond, my ajm.ruby object, and the jweb object from Max 5. This isn't a great solution: it's slow and it can only display notation. You can't interact with the notation in any way, which is what I'd really want. But if you don't want to pay money or spend a ton of time writing your own notation software, this is potentially a viable solution for getting notation inside Max.
If you want to try this out, first you need to install:
Then:
I'm not going to give a tutorial on LilyPond, so check out the documentation on their site if you want to play around with notating different things.
There's a bonus on OS X (maybe Leopard only?): jweb uses webkit, which has some nice controls for viewing pdf. If you click on the notation, controls will appear that allow you to zoom in or out, and open the pdf in Preview (where you can print).
So what's going on under the hood? The maxlily.rb file is Ruby code that does most of the work. Ruby is certainly not the only solution here, I just find it very easy to work with. This code could be ported to C or Java or whatever without much difficulty. If you are interested in doing that, let's take a look at the code in detail and see what it's doing: