Archive for January, 2009
patch 7
Check out this mess:

As a little experiment, I thought I would try and implement sketch 0 in Max. I eventually got it working, but I also made a mess of things in the process. A wire cleanup is certainly in order, but Max also allows another type of organizational structure: the subpatcher. With a subpatcher, you can divvy your patch up into reusable blocks, each with its own I/O. Here’s a screenshot of the cleaned up patch using a few subpatchers:

In programming, it’s never a good idea to hard code anything, but to reduce wire crossings I put in a few constants for circle radius, center, etc. I also noticed in Max Tutorial 11 that there is a cartopol (cartesian to polar) and poltocar object! Doh! Oh well, I’m still learning the basics and it was a good exercise to build things from “scratch”.
This patch took approximately 10x longer to build than sketch 0. Naturally, in comparison, patch building feels clunky and slow – it feels more like an expensive toy than a productive tool. Of course, I’m not blaming Max yet, but rather my beginner status and inexperience with the Max methodology. I’m not familiar with all the objects in the Max toolbox or best practice in their usage.
Here’s the source:
----------begin_max5_patcher---------- 3265.3oc6c08jiZbD+489qfRNOYu2l4af35dHUdOUdLob45JVI18HFApjXOu Wb4+2CL8fVXEHMyvmRG9JuRCRH59G8WS28L7Ge3tUOl9Z3gUN+Mmew4t69iO b2cxCUbf6Tiua01fWWGGbP90VkD96oO9eWcO7QYgulIOrfUdnjW1l9RVbXl7 6iUGcWP15uDk77m2GtNCtdbA6Az8NDtewKTxC77AnGPN+p5bfelrusKDNgUQ I4mZ4m9TZR1gn+m7yvj7eB3vQajzSNM9QQERJJojhHUN+jfsxye0eeeTP7ph O3O+vGJ9y8iOb3IgCJRLPvAe5fCFxb3fHwAFwaffC+oCNhSC17XPxyFCJDW2 Bz.ikuHPR8myBJxKiAnhainBdLPknmb9KQXmO8IGrS1WBSbpBQwQIgqSeIIq 5MIswMAEfMokFAWJQwNGrYBjQPSGlwMVDBywCqdElbEpXIPRIDp6foXgwSmT h81antCLrP8tBgE1fKsPGC6vaCObH34vSvETdLYbGjsRKJSKfcFrWeYlkNgg ysyYy9fe+ekFGr+eDsecbn0lc4xnZvH9kkYLxGTypQr1AmpjZ3dEjnvj7SHJ N7qg6ODklTgwta0aLjG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PGODlj9XkOi UQGG0061ZaIeD0q0IxHr+7yVS8R5pssFHuhTv8mnGhrjqisZCk.UjmZe8mxn uai82d8Esj.MKThw3l83Fq.Aqa.3iGMQw8uUYNmAFhoUsJ2ccBha+SqEqE2B xi4UgVYdcmVE5dulNdpD95Nae5rZ19T53plVyNUKwNYn2Tks1xozIXGG0Qhk qSjJbhoQkJoOFV7lRgbvHDAM2tHnQR8WnwmkC5JtJF.bEHOFr3KUvJo6SKlq i2W13pDQ0cBHiGIwoCvsztZ9i0+tz5JIoCLwF2HmnHMyxx343hJzcRWiGMQ7 5eoI07T4rpAyw5dvbTsR7iXbEyzA+niLMoENY3MUlpFCkKZXwwQckZYZNQP7 7ZhflFOW4r98pDNmn6QcnK5YQsuf.jToVF2CQHoUluItlcuVQeTn3WTN+ArP H3B0g5JIqi5835YCqsaDCPQUhjUYE0yWBhtD0g5HEq8jHQypIQx6RIiEH0yF 1piHPOOv8gcma+t6SjqKzZaZzxG7me3+CaXG+hB -----------end_max5_patcher-----------
sketch 0
In addition to learning Max, why not learn Processing as well. The goal is to eventually interface with Max using OSC.
Sketch 0 echos the code found in this nice tutorial, which (for me) was a great first experience with Processing.

patch 6
So, this Saturday’s Lotto 6/49 is an estimated 43 mil! So, in the spirit of things, I decided to make a patch to generate some random lotto numbers:

Here’s the OS X app and here’s the patch:
----------begin_max5_patcher---------- 893.3oc0YssaaBDD8Y7WwJZeqtorWA2p7P+A5OPUUD1rwgTtXAKsoIJ+6kc. eI1Xf0jfikkAMKqWNygYNyr3mlXYOO8AYtM5qnehrrdZhkELjd.qZaK6X+GV D4mCSyNQ92z42aOs5RJ4CJX3vaQeLDit9ZDFotSlfVDI8yVOsnvD4hzhDXtj 5AW4qVbWXxxaxjKTUP.KXW4LEQnX8IgPejVND5W0+ljh3vjHoBvBtdvv..Bk v5ytt1amYZgZ+oVMj5eqjU2Pa6MK8soIpD+X3B1eOKzOxdmqjG9HbEL4JG8n OOYh9vzgwZeBgsagMbv6vFTxU7RCmiwFjFXCggrQn9Iz4jPJxRPrYcyIXWt9 DCNZFmvZlSHswISQ1y8SVdd4lGiP4oYpVHmprGFwENQMmanFxMZhYrHkh34x rNc95jEhW6NeSRGjK3.ikYoEqPhNoG5LPSUXdrAm89M1HVlm6uTd.w7hZPMv ITGMM3BoKT3H1yDJw4hpXyAknCJhWgjQ4xVJVSON6QXjCJVy7LHiiItn3uUY kY7HwWZs9TsDLGzeDXiUgX7l4DmyYdTtTgbZwoINzAkHwnWTABPxgLC4T9oM IWrvqpWEHlvqifAdC7BtYdg0QIo0eO6sysxewu0zT2ks8fN43BiqKQtzhchh 5tJckXJeV6c72f7AwwvHlcCWNElod3b++rdE+vOzqUkehr+11EUOmfaJQYo2 diuRkENuPUs4SqMjnksrrOOvg.Vuh1Mk7KWXUZRO1FAgsNfyPhFOyvvt51DO AmQktbYjrGNC+T8E2SZahudIEwRUVJxi1sOVUhg6YrLAlcZOuFhTA7qg1o16 Mr.9md7WRU4oEYKVe+Wq+iHa.QfLWEl3qBKCs2NI8q7.skHtKLHPlraKCwgA qRKejUChi7fquXZua2QvDyLLgcofTmnp2AVUV4Ksb.KO2CLvtUg+XG8Z.VCz G0M1+p6iCDSZAm2aXZua2QvjXbwjnGXR2zP4tfFKLw5ElbFUdpWZKLw3ioNi mHlps3BZKXnmpZgFswPSH6Sv+ddT2fsVDCW+VNc2XMTz1GYa89vFSIs9fIL6 8Gl3iapZuhz1q9vatLKsOwS7QES7dUNZbiw2SspkxQiGlH8o8F93l2wnuApo DL7elgK2H8NpoZqwnAQSKnSgs6S4js0o.ig9zl9V27QowyS9OLQYdeI -----------end_max5_patcher-----------
And here are some winning numbers

patch 5
Yay! I made my first patch from scratch – a learning hurdle. The idea was simple and small: adjust the radius of a circle. Here’s a screenshot:

And here’s the patch:
----------begin_max5_patcher---------- 722.3ocyXssiaBCD8YxWAhWa1HrwPf9V+KZU0pJB3l3VvFAl1zc09uWaykPS .BPR8FEIPdLd3bNiGOC40UFV6XGwEVlez7qlFFutxvPYRZvndrgUZ3wnjvB0 iYkhKJB2isVWMGGejqrGkfCyarRKSYk7DLWsFPs0rPdzABc+2xwQ7p2oiu8F 60lPO0Mmsxq.+M1lOWulJ2v+SFtZAVVsS8cFkWPdQMA.JVYkYRrBOrc+3IGm N.hPavCriCngoJGX8obRXhkbh2VsRdY8DEjhDRLtk4Y4LNSB2VGefkSdQ7lD degpCxQIKnJoxdZpifuJua2mv.b6UXZfRqpZKV8BjjHVZJlxuXORdXLorneY vdDYvw6jLf7tPEt9FAXvn789rQXWImynyNHC78kLx2ogWWKFuKjt+TbtKKQ8 yxEvEJ92BOdQ.LKL5ml1U+VJQgPYHxbq2b1MOgPLrWxitqg3gjkbrHgO1LKj P4resfL8Fso5bPf88Vb.ZX++.hySKUL.9.UQA3F2qoEBYeVxgsFpKLfb7gYK GPD5+qb.BzgbTltCOPCBvwHuqh7PkF3NgiGkje84mRxEvltOA2sRyDDFuQSa DlHokoRSdnGAwpIw48QrPuSh0PcaDILhy+xra2.FDzUEQKneCfNNucbd+4Yy afC7V4sNZyJIJtepgtZhgCnNx52da3TiDRgJ2n4dcpRucdAtZiWpUI7E87u1 RgVo8+kxErx7nFnzjdYdBtw3BNgFxILZmGRVXqyCcfDGiocC6oj3LlfI0fv7 4dC.SFSdS.SxpK5DStS.SxOLTiX5rW2.5z7fjiefrQ.mpVEAAaaGoCADhVDZ 251ArxA5.qpMffYiUfmaUK4U+oDdZBspT3EfVWELg.UShpQ2JZClBZEe0kIT eI2SFSNZCSmcl6HXx9ADS.8gooT.6rJJOFXBoWLAt+EKtUHAmx1oaAShAus5 unBufPC -----------end_max5_patcher-----------
patch 4
So, I was messing around with the mousestate object:

And couldn’t get the button to trigger. That’s because it requires a bang:
Add a bang message and it works:

However, it keeps on working in Edit mode and refuses to stop. Checked the docs; the nopoll message reverts mousestate to its initial state.

Added a nopoll message but no luck. The only way I could get mousestate to stop working was to delete the mousestate object and re-add it. Perhaps, nopoll is paired to a poll message? When bang is replaced with poll, it works as expected.

Next time, I’ll look for message pairs first.
patch 3
All right, time to get back at it. I need to tie up a loose end and finish playing with objects found in the Tutorial Zero Video. – specifically, the (pseudo) random object and counter object. I love random. It’s one of the first functions you use when learning to program. Here’s the trivial patch:

The right inlet specifies the range, in this example random numbers will be generated from 0-9.
You can also feed it a seed value, in which case you’ll be able to reproduce the “random” output.

With a seed of 42, you’ll get the following output: 1, 2, 9, 1, 2, 4, …
Now, the counter object. Have a look at the help file for this object:

It may look a little complex but play around with it, read the comments, and before long, it’s understandable. The function of the counter object is simple, but the I/O makes its usage flexible.
One thing I noticed, these message objects have no connectors!

Hmm…what happens if I drop into Edit mode:

The connectors are definitely there, messing up the joint. That’s a handy cleanup feature, now how do I turn it on in my patches? After a little hunting, I discovered that, once you select a connector, you can go to the Object menu and “Hide on Lock”.

And the seed connector is now hidden:

Here’s another discovery, if you’re on a reference page and you click the “Contents” button at the bottom, it displays this monster menu:

Which could prove useful for systematically going through the entire reference docs. However, you can’t open the above window from the home page, you have to be on a reference page, otherwise, it just displays:

That’s one way to get to the reference pages, but what about the .maxhelp files? How can I see a list of all the .maxhelp object files? You can find them in the following directories:
- Max5/Cycling ’74/max-help
- Max5/Cycling ’74/msp-help
Great. Maybe I’ll painstakingly read each and every one in alphabetical order after I finish the tutorials. Why on earth would you do such a thing? As G.I. Joe says, “Knowing is half the battle.” Eventually, after I begin building patches in earnest, knowing of an object’s existence is…half the battle!
Spent the rest of the day surfing the Cycling ’74 forum (about 7 months worth of postings) and watching youtube vids on max/msp. I probably spent one to many hours browsing the forum but I did pick up a few tidbits of info. For example, the ability to cut ‘n paste a patch as text. Simply copy the patch text from the forum post and inside max select File->New From Clipboard. Yay!
As for youtube vids, I found these the most interesting:
- http://www.youtube.com/watch?v=vRjqZg5Vx2o&feature=related
- http://www.youtube.com/watch?v=grdSaHUkofE&feature=related
- http://www.youtube.com/watch?v=VUwvyNvihd8&feature=related
- http://www.youtube.com/watch?v=LR8YrFyIQzM&feature=related
- http://www.youtube.com/watch?v=dM1eYNGZYHY&feature=related
- http://www.youtube.com/watch?v=f1Vyyz93wwY&feature=related
- http://www.youtube.com/watch?v=80P8xAXpbuM&feature=related
- http://www.youtube.com/watch?v=z5sV9ESjSyE&feature=related
Well, it’s about time to digg into the tutorials after poking around haphazardly. I’ll be back when I finish them. Later!
patch 2
Now what? Time for some coffee…as I mull over my next direction. My ultimate plan is to read every ounce of documentation. However, before I delve too heavily into the docs, I want to see what online resources are available online at Cycling ’74.
I checked out every link on the interesting work page, but if you really want to get a sense of the max/msp community at large and what’s possible check out the C74 Perspectives channel on youtube.
I’ll definitely want to come back and read these articles and interviews, once I have a deeper understanding of max/msp itself. For now, I think I’ll check out some more videos before returning to the help docs. It’s a chance to discover what’s new in Max 5, although I don’t even know what’s old! Of course, I’m going to continue documenting my trivial discoveries because it’s fun and keeps me motivated.
patching and workflow
Right off the bat, keyboard shortcuts. “Type n and get an object box at the current cursor position, m for message box, and so on.”. Trying out the “and so on” part:
- b for button
- c for comment
- f for flonum
- i for number
- t for toggle button
There’s a Presentation mode to which you can add objects:

Here, I’ve added 3 objects to presentation mode:

The object’s size or location in Presentation mode doesn’t have to correspond to its size or position in Edit mode:

debugging
I’m interested to see what kind of debugging capabilities max/msp has. I don’t imagine we’ll be stepping thru lines of code, but something more robust than console output would be great.
First, simple error messaging. Trying to send a “foo” string to a number input results in an error – which is correct. And our initial suspicion of the Max window being a console output is verified.

Wow. Max/msp supports watches and breakpoints, what a nice surprise. Now, let’s see if we can get a demo of watchpoints up and running. The first thing, would be to bring up the watchpoints window…


But what to do isn’t clear to me yet. Time to drop into the help docs and do a search for “watchpoints”, which turns up this promising looking result:

So, a watchpoint monitors messages being passed thru patch cords. In that case, lets attach a slider to a number and then a watch var between them.

The newly added watchpoint:

While running the patch, you can see the value traced to the window:

I’ll cover signal probes, and breakpoints later on. I’m not ready to utilize all the debugging facilities just yet, but knowing of their existence is half the battle.
integrated documentation
Ah…integrated docs, probably the number 1 reason I chose to pickup max 5. It looks as if the integrated help system has even more functionality, starting with the Clue window.

You know, before we get into the Clue window, one of the things I hate about Mac is the mess of floating windows.

Flash CS3 has a great panel docking/flyout mechanism. I wish max/msp had something similar. Imagine it, a toolbar of objects on the left side, with zoom and pan (hand icon) tools. A maximized patcher surface, where multiple patch windows appear in tabs across the top. On the right and bottom sides, docked panels for the max window, clue window, etc.
And while I’m thinking about UI, I’ve got to say, the single worse UI design choice in max is the placement of the forward/back buttons for the help docs. Every single browser has these buttons located at the top left – it’s called spatial memory people! I always find myself instinctively moving the mouse up and to the left, before I remember, damn…it’s at the friggin bottom. </rant>
Back to the Clue window. Hovering your mouse over the item in question reveals only a title.

Only when drop into edit the object text, does a description appear.

I’m not sure if this was intended or is a bug. Either way, the Clue window doesn’t appear to be useful, we’ll see.
Clicking on the left inlet of an object reveals a reference menu. Below, I’ve clicked on the left inlet of a Number object:

The listing of attributes, messages, and actions is quite nice. Clicking on the top-most attribute bgcolor inserts a message object and connects it to the number’s inlet.

I replace the args with a red color and test it out.

The quick ref panel might be handy.
The last thing to note is given a selected object, it will then appear in the Help menu.

Until next time!
patch 1
As my exploration of max/msp continues, I think I’ll simply increment the patch count in the post title.
Last time, I had this <sarcasm>awesome</sarcasm> patch:

Now, what I’d like to do is change the range of the slider from its default 0-127. Option click the slider and the .maxhelp has an example.

Now I’m wondering what type of object the “size $1″ button is. So, lets quickly drop into Edit mode and Option click it and quickly jump back out, so as not to disturb things. If you do mess things up, not to worry, it’ll prompt you to save the changes to which you should obviously say no.
Ok, so “size $1″ button is actually a Message object. So, ‘size’ is the message and $1 is a placeholder for an argument, received from the number box. I have a feeling the Message object is going to be quite common and very useful. If you open up the Slider reference doc and scroll down a bit, you can see that ‘size’ is an attribute of the Slider object with a well written description. Size is a float to indicate the number of steps (range) and the default value is 128 or 0-127.

Even with such a trivial patch, I noticed a couple of UI usability issues. First, when I toggled the bang, the button didn’t flicker because the slider was set to 0. Second, if I want the range 0-500, I have to remember to set the Number box to 501. I wonder if it’s possible to add a +1 object…

Nice, you can have objects that do basic arithmetic. Another problem is preventing users from selecting a negative number. How do I do that? Wait a minute…the Number box in the Slider .maxhelp has a 30-90 range. How did they do that?If you drop into Edit mode and mouse over the left hand side of the object, a little “i” icon appears.
![]()
Clicking it opens the following window, where the ‘Value’ tab reveals what we’re looking for! Is it me or is this UI fairly intuitive?

I guess the “i” stands for Inspector. I also discovered you can open this window by using a keyboard shortcut (Command-I) or right clicking on the object.
My original goal was to change the slider range and the objects above the slider accomplish that goal in an indirect, clunky way. However, now that I’m aware of the Inspector, I can now simplify things by delete the objects and setting the range directly. I would like the range to go from 250 to 1000 ms.

The ‘Output Minimum’ is 250 and the ‘Range’ is 751. Remember, range indicates the number of steps inclusive. For example, a minimum of 0 with 4 steps would give you what range?
Finally, the patch I initially had in mind:

I wonder if I could hook this up to a MIDI slider on my controller? Woah.
First, I’ll need to install the latest M-audio drivers for my midi interface and then configure it using the ‘Audio MIDI Setup’ util that comes with OS X, which is kind of like a patcher window itself:

A good post about the ‘Audio MIDI Setup’ util can be found here. As you can see, I’ve added a device for my Radium 49 midi controller. This is optional, but allows programs to display the controller as “Radium 49″ instead of “MIDISPORT 8×8/s Port 1″.
Back to max/msp. Now, I imagine the first thing I would need to do is configure MIDI.

And would you look at that…everything looks to be in order already!

And now, if I just start typing “midi” in a new object…

Intellisense is awesome.
Hmm…the sliders move during testing, but they’re acting a little crazy, why? It’s almost as if their range is very small within the 751 units available. Oh yeah, it’s MIDI…duh. 7 out of 8 bits are used for payload, and 2^7 = 128 or 0-127. If you don’t believe me, type 2^7 into Google. So, I need to revert the range settings to the sliders default values:

And voila! The patch works nicely.

That was ridiculously easy. Glancing at the midiin object help docs, I can see there’s a lot more to learn and I’ll certainly revisit it. For now, I’m still in the exploration stage – it’s about pushing buttons and trying things out, without fear, to see what happens.
Until next time!
patch 0
Purchased a copy of Max/MSP today over at Cycling ’74. I decided to go with version 5′s new hotness over Pd. User interface does matter. Documentation, tutorials, and a slick integrated help system are even more important.
After installation, it took under 5 minutes before I was creating and experimenting with my first patch. Here’s how it went down.
The first thing I did was open the help file.

And prominently displayed in the upper right corner is a listing of tutorials…

The documentation is also available online, so you can view the above page here.
I think Max/MSP – when loaded the first time – should display the help documentation or better yet, a window to play the Tutorial Zero Video. Instead, they simply show the Max window, which could be a little disconcerting for first time users.

The Tutorial Zero Video is short and sweet. I only watched a portion of it before I was playing around with the button and metronome objects. Behold! The “Hello Metro” patch in all it’s glory!

I love it; because I have an appreciation for the amount of work it would take to code something similar.
Now, depending on your preference, you may want to toggle on ‘Segmented Patch Cords’ from the Options menu.

Which means the difference between these two layouts. The second one (with segmented patch cords) looks more organized but can be time consuming.

Or you could do this, to give it that printed circuit board look…

Or this awesomeness…

The Zoom tool is a little awkward at first.

I guess I was hoping for a Zoom tool similar to the one found in Adobe products – where you also hold down the space bar to pan around.
Enabling grid snapping at the bottom of the window is handy.
![]()
As are Align commands in the Arrange menu.

Ok, enough of that, back to the patch. When hovering over an inlet/outlet, a tooltip appears. This is the first stage of help integration.

Even better is Alt or Option clicking an object (ie. the metro object). This launches a window that displays a .maxhelp file for the object – the second stage of help integration. What’s really cool about this window is that it contains working patches that you can play with.

It’s too bad you can’t Option click the patcher items even further…wait a minute. Maybe you can’t Option click items because the patch is running. I wonder what happens when you drop into Edit mode…

Aha! I discovered your magic, it’s just another patcher window. (Yeah, I’m a little slow sometimes.) Well, I’m gonna lock that sucker back up because I don’t want to mess around editing the help files.
At the top right is a link to open a detailed reference manual – the third stage of help integration. You can view the reference for the metro object here. Awesome.
So, now I want to hook up a horizontal slider object to my metro object. Add a slider…

Hmm…the slider is vertical by default. That number above the icon sure looks interesting. I wonder what would happen if I clicked it…

Shaweet. Now I’ll quickly add a number box to view the output of the slider. The new patch looks like this…

It appears the default range of the slider is 0-127, which is quite handy for MIDI.
Well, that’s all for now. Until next time!
jack
From time to time, Jack winces at the thought, “Jack of all trades, master of none.”
A love of learning keeps Jack motivated. A lot of shiny toys make it hard to hold Jack’s attention for long. Jack accrues skills over time, revisiting points of interest in an iterative fashion. Given enough time Jack should become a master in all fields, but time and progress wait for no man.
At times, the sheer amount of stuff to learn makes Jack depressed. During such times a little voice in the back of Jack’s mind whispers, “focus”. “Specialization is dangerous,” he argues, “look at the Panda bear! Look at the Cheetah! Specialization is great for short-term gains. Over the long-term, it’s detrimental.” ”Yes”, whispers the voice, “but your life is half over. You will never be a success unless you focus on the one”. Jack resists, Jack is stubborn.
Eventually, Jack submits, “But what to focus on? How can I commit to just one thing? What if I choose to eat nothing but Bamboo and I’m faced with deforestation? What if I choose to run fast and prey can still outpace me?” The voice whispers back, “Jack of all trades, master of one.”