Max/MSP diary part 4: music and maths
Last week, it was tutorial time for me as I finally started using Max/MSP in practice. Wading through the tutorials was heavy (but essential) work, but on reaching tutorial 11 I realised I needed to consolidate what I'd already learnt before heading into increasingly murky Max territory.
I realised this because tutorial 11 is ridiculous – I can't even begin to understand it.
So: I thought I'd better go back over the first few Max tutorials, make sure I understand everything, perhaps make a few basic patches of my own, then attack number 11 again. Makes sense, doesn't it?
Yes, of course it does. So instead of doing any of that, I started to learn MSP.
It may have been wiser to stick to my original plan and ensure that what I'd picked up already had really sunk in, but perhaps trial and error in an unexplored area of the program would be a good, 'organic' way of learning.
Any excuse. I was actually just impatient to get some noise out of my machine, so it was back to the tutorials for me - this time to the MSP section.
Sound at last
"Sound in Max/MSP is based around the manipulation of numbers. It often takes quite a bit of thought and a liberal dash of arithmetic to get things working the way you intend"
First off, I learnt that MSP works in a similar way to Max: there are objects which perform specific tasks, you patch them together with patchleads, and you need to be far better at maths than me to avoid hours pulling your hair out in front of the computer. Familiar territory it would seem, but MSP has some important differences too: things work a lot quicker than in Max (a result of having a 44,100Hz sample rate), MSP objects interact with each other and with Max objects in different ways, and MSP patchleads are eye-catchingly stripy.
But really, creating basic patches with MSP isn't too troublesome. The difficulty I found, though, was trying to work out what was going on inside a patch cable. Because values going to and from MSP objects are updated 44,100 times every second, you can't just stick a number box in the middle of a patch to determine what's going on. This can make things difficult because making sound in Max/MSP is based around the manipulation of numbers (wavetable values, amplitude calculations etc). It often took quite a bit of thought and a liberal dash of arithmetic to get things working the way I intended.
Perseverance did win out though, and I found that from my first basic test tone patches I could gradually tweak and attach until I had something that produced (almost) musical sounds. The resulting patch is a synth; the pitch and tone are controlled by a crude x / y pad and the whole 'instrument' resembles a sort of rubbish Theremin.
Well, that's what I thought at least. When I showed the patch to a friend, she said it sounded "like a muppet being tickled".
Download the patch here, or alternatively, check out this video:
Room for improvement…
As proud as I am with my first meaningful patch, though, it's not without its problems.
Firstly, it's really ugly and there's a lot of clutter that you wouldn't want to be looking at if you were using it live, so I'll have to learn how to make an interface for it. Secondly, I bet it could be done far, far more simply and efficiently. And the final problem (as far as I can see at least…) is that every time I start it up, the sound is slightly different – I think it's a phase sync issue between the two oscillators.
Oh, plus it sounds really, really bad. But it works, and above all, I learnt a lot in making it. Hopefully, by next week (and aided by the fantastic Max/MSP forum folk), it might even have a rudimentary interface.
Maybe I'll have made sense of tutorial 11, too. I'm off to dig out my old school maths textbooks…