An Interview with Chris Dobrian, Creator of the Max Cookbook


    Some things just take time. I'm going to take a little time to talk about one of them with its creator.
    Chris Dobrian's history with Max goes back a loooong way. Let's get that out of the way quickly — yes, this is the same guy that wrote the first MSP tutorials. He's also created a blog on algorithmic composition, an amazing source on Max-based patching and insights on that subject that my colleague Darwin Grosse wrote about a while back.
    Recently, Chris (with the help of a number of his graduate students at UC-Irvine) has created an amazing new resource for Max users that draws on his vast experience patching and teaching and thinking about how to do things in Max: The Max Cookbook.
    The cookbook is an enormous collection of Max "recipes" — over 700 of them — that cover a spectacular variety of subjects, many of which regularly show up as questions on the Max Forum (especially at the end of the semester when those projects are due). This collection of resources for the Max community is something that could only come from years of experience teaching, reflecting on good patching, and helping others. On the occasion of its going public, Chris was kind enough to sit down for a brief chat about the project's origins, contents, its direction, and even a little advice about that other kind of cookbook. Whether you spend a few minutes reading this interview before or after you get lost for a couple of days thumbing through and downloading recipes from his cookbook, here's your chance to meet the Master Chef himself. Your project is an astounding collection of work, and looks to be something quite a long time in the making. How did it come to be in this form? Thanks! Yes, it is a long time in the making. Too long. I've been teaching Max in various college courses for 25 years, and about 15 ago I started posting examples online for my students. So, those examples spanned several versions of Max and were spread out over a ton of different class websites. And very often I'd get people asking me if there was a single place where all of my examples could be found, and I always had to say no. It's such tedious work to try to be organized! But eventually I broke down and hired a team of grad students to help me track them all down, put them in a fairly unified format, and collect them into a single website.
    In the past I've also been a pretty frequent contributor to the Cycling '74 Max forum and the MaxMSP Facebook group. That was a form of enjoyable procrastination for me. Whenever I didn't want to do the work I was supposed to be doing, I'd log onto the forum and see if somebody had a question I could answer. So, I've been grabbing examples from there, too, and including them. Overall, I think the Cookbook has in the neighborhood of 750 examples now, but there's a few years' worth on those forums that I haven't harvested, so if I keep plugging away at gathering those, I may reach the canonical 1,001.
    A Sample Recipe
    A Sample Recipe
    Since the materials here stretch back over a considerable amount of time, I’m wondering how often you’ve gone back and redone things on the basis of changes in Max….
    Well, you know, when I'm teaching I'm always trying to be mindful of teaching concepts rather than teaching Max per se. Now, of course, you often have to just show people, "Here's how Max works," but I'm usually trying to show a useful programming or musical technique. So, most of the examples don't rely heavily on arcane Max features, and they stand up well over the years.
    But, yeah, there are plenty of things that could be done better or more easily a different way in a later version of Max, or things that become slightly obsolete. For example, lots examples from the early days of Jitter employ jit.qt.movie and jit.window, whereas now you'd use jit.movie and jit.world. But rather than go back and change all those patches, I just revised the explanatory text to point out other, possibly better ways one might do it today.
    Are there areas of Max 8 that you expect to see new recipes for?
    Absolutely. We started assembling the Max Cookbook just pre-Max 8, and to standardize the look of the Cookbook we decided on Max 7 as the look we'd stick to. But for sure, mc.* objects is an obvious area to start cranking out new examples, as would be more advanced GL examples. So, going forward, whenever I make an example for students that I haven't done before—'cause frankly, now that the Max Cookbook exists, it's often easier just to say, "Go look it up" if it already exists—but if I'm showing off a new feature like multi-channel patch cords in a class, now I can just add it as a new example in the Max Cookbook.
    You’ve done some similar things before – I’m thinking of your resources for algorithmic composers, for example. Is that work “folded in” to what’s in the cookbook?
    Not exactly folded in, but there's a whole page of links to Additional Resources, including my old blog on algorithmic composition. (And including your excellent Step by Step book, by the way.) That algorithmic composition blog was more meant to be a set of essays on particular aspects of composition and computer music programming, which just happen to be illustrated with examples in Max. Oh, and I should mention that I've also been working on, and am nearly finished with, a sort of online textbook for a class I teach on Computer Audio and Music Programming. There again, the focus isn't so much on Max itself, but it uses lots of examples in Max, as well as a few examples in the WebAudio API.
    I suppose that most of us who’ve worked with Max for a long time tend to collect our “go-to” solutions for common Max programming solutions, over time as a personal practice. Those tend to be very personal in that they involve common abstractions or patches. When I look at the array of stuff in the Cookbook, it seems impossibly broader than that. How did you manage to put together such a broad range of recipes?
    Hmm, well, I think that's kind of just in the nature of Max, isn't it? I mean, the Max environment is capable of addressing so many different interests, like from algorithmic composition, to audio effects processing, to video processing, to MIDI control of synths and lights, to interactive computer-mediated performance, to multimedia… to VJing, and GL graphics, and then the whole world of interactive art installations. And in all these years of teaching, I've had students interested in all of that at one time or another, so I've had to address—admittedly often at a pretty superficial level—a whole lot of things. But that being said, I'm a musician in a music department, so the majority of my teaching is focused on sound and music. But if you stop and think about how much a person needs to know to be a well-rounded computer musician, it's kind of astounding. And it's pretty impressive how Max has grown to accommodate almost all of those things to some extent.
    Despite their incredible range, I can’t help but notice something else. When I was writing Step By Step, a lot of the approach was guided by the notion that less seasoned Max users are often comfortable with what’s in a help file, and less confident when it comes to patching “between” those help files or imagining larger structures. Is there something similar in play in terms of how you’ve structured the cookbook?
    That's a really good point. There's kind of a whole other level of programming that one (hopefully) needs to learn, about how to construct a well-working program, overall. How and why and when to encapsulate, how to plan out how patches will interact, etc. But in making a small example that demonstrates a particular thing, you often have to simplify the context, almost to the point of oversimplifying, and eliminate extraneous—though often important—features that might be distracting. In my examples, I feel I'm often having to mention that tension: "Here's a very specific instance of this one thing, but here's how you might generalize it to turn it into a more useful and reusable thing, which you then might want to encapsulate as an abstraction." But I do have some examples that are just, like, "an abstraction to do so-and-so". I tried as best I could to make each page be a single small bite, of the sort that might answer a "How do I…?" question. In fact, I think that's the best way people might think of using this resource, to answer the question "How do I do X?" That's why I guess I'm thinking of it as a general-purpose cookbook, to get people started in the right direction to cook up their own thing.
    That being said, I realize that one thing people struggle with, and that hasn't been written about all that much, is how do you conceive a larger program structure and make lots of different elements work within it? Especially, given the popularity of interactive music performances, you still see a lot of pieces that have troubles, or are buggy, or that require the performer to mess around on his or her laptop for several minutes before starting the piece, and patches that are assembled in a haphazard way, etc., etc. And there's no reason that should be, except that I think Max encourages the improvisation of programs, which is good in a sense, but not so good in terms of encouraging well-structured programs overall. So, in fact, what I'm working on right now is a book that will try to address that very problem: How do you write a program for interactive performance that actually works well? Once you get into it, you realize it's an enormous topic, with lots of angles. I think part of it is trying to help artists learn to think a bit more like a programmer, at least to the extent that that helps to build a solid infrastructure for one's piece.
    To the extent that some of these recipes are the result of interacting with students, I’m curious about what sections of your recipes had their origins in things that your students wanted to do rather than patching related to your own practice….
    I'd say that in the case of the Max Cookbook it's almost entirely driven by specific concepts that I'm trying to teach in a class, or often in response to a question from a student, or a question online in a forum. So, some examples are fundamental, and others are pretty advanced or abstract. For example, I've found that the use of the pattr objects is pretty difficult for a lot of students to grok. But those objects can be really powerful once you understand them. So I have a whole series of examples in the Cookbook that range from the fundamentals of pattr to something as advanced as using timed interpolations between pattrstorage presets for a whole host of parameters to run a self-composing piece. So I guess that, while I think of it as being lots of "basic" recipes, it actually has a lot of fairly advanced topics, too.
    But a lot of the things I do in my own pieces are things I consider almost too advanced, or at least too idiosyncratic, to include in my classes or in something like this Max Cookbook. Like, I'll get deep into how to implement a key-finding algorithm so that the computer knows what key an improviser is playing in, or a gesture-characterizing algorithm so that the computer can have some idea of the expressive nature of the music, and those are utterly fascinating to me, but if I were to teach those in a Max class, first of all you'd have to lay all the basic groundwork to get to those topics, and then even if you could teach them, how generally useful would that be to the student? So, I try to abstract what are the important concepts the student needs to understand, so that whether it be Max or some other language, they still know what they’re doing.
    But now, all that being said, who the heck knows—or can make a complete listing of—all the things a student needs to learn?! So for now, the Max Cookbook doesn't even attempt to pose as a textbook or an organized progressive set of lessons. I decided to think of it as something where people would just go there, type something into the Search field, and hopefully see a patch that, if not useful to them in its own right, could help push them in the right direction.
    This is a little off-topic, but I’ve gotta ask: As long as we’re talking cookbooks, what’s your favorite cookbook?
    Ha! Man, don’t even get me started. I actually love to cook, and to bake! I didn’t learn much as a kid, but when I started living on my own I consulted the classics like The Joy of Cooking and Julia Child's Mastering the Art of French Cooking. Oh, and I'm a big fan of Jacques Pépin; he has a slim volume called Today's Gourmet, I think, that I picked up a lot from. For baking, Jim Lahey's My Bread was a game-changer for me. But cookbooks are kind of like musical scores, you know? If you're a composerly type, you want to do more than just read them and replicate them; you wanna try to see if you can do something like that yourself. So, what I invariably end up doing is reading a bunch of similar recipes, getting the idea of the dish, then making up my own version.

    • Oct 31 2019 | 3:29 am
      some of these recipes here, with some Portuguese wine... it's really good. they blend very well. 5 out of 5 stars: highly recommended. ;D
    • Oct 31 2019 | 9:37 pm
      Really interesting. Gotta check them out right away
    • Oct 31 2019 | 11:03 pm
      Thanks Chris!
    • Nov 03 2019 | 4:20 pm
      Many Thanks!! Udo
    • Nov 04 2019 | 4:46 pm
      This is a phenomenal contribution. Thank you!
    • Nov 06 2019 | 7:20 am
      I am looking forward to reading your book, Chris!
    • Nov 06 2019 | 7:45 pm
      Well done Chris! I look forward to the read.