Page 1 of 3

Max for Live Tips & Tricks

Posted: Fri Dec 11, 2009 5:17 pm
by stringtapper
I think this needs its own thread outside the main T&T sticky.

It would be nice to build this up for the community.

Here's a simple one:

A great feature in Max is the ability to create Clippings. Clippings are small bits of code that you use frequently enough to not want to have to rebuild every time you need them.

One example for M4L is a toggle between a frequency-driven [phasor~] and a note value-driven [phasor~]. This is something you find in a lot of the Live devices and it can be handy when you're making your own specialized effects that you want to have the ability to lock to Live's transport (or not).

Here's the code for that from the Max AutoPanner building block:

Code: Select all

----------begin_max5_patcher----------
2180.3oc6as0iaaqD94c+UHHTfSKvFeDotX4h1GZQZQeHsuz7VPvBYIZa1HS
5JQ6MIE87a+vqxT1R1R1xWRQCPVIyqyLblONbzv+5wGbmR+Hpz04acdmyCO7
WO9vCxhDE7f92O3tL4io4Ikxl4lRWtDQXtOopig9HSV928J0+LULiRXk3OiD
UB7F4oKFmIaMc5e7J.vzVx5kXRNhImAf0.PRVJG.2en.mja0b5Zlo8lQdUBK
cAlL+4BTJSwQvI97I1IT92.AQ3.hG447dQO96GeT7mmNS99sTmRDxYA8EG1B
jS45oRBAU37Bs3CkO4jSS+frpkIXhioxDRlSFc8zbzqRyw7VPIxF8CoL7lDF
ppgbIEmebXTG5JDY24fOhINDzKNufIYzWFYHubLAkRWSjzXPmWRfwW5kDeXn
XY.NQsXDHWefC7ZxO8mq4BwbDIEIjP+xm6tRIbxEWBDNVx6d.wiIfKhVYeX4
vvdxxN+HMOq+7crhUCjOf9mEeOKmxmXCMrpfxnrOwsOLz4avaP8PBLY3j.vC
HABrk.13QlkuBbYJWuUJIGMNTWrZzE7mZbDbeBeM2wcZBYt6II.4XFbNeO8F
VQBoLWf+PnLD2FZMpzYQOTlh7FNQI33hRfxVBB1SVtmPycPMv9Mt3oGREvUw
DCpMwTPK9mmI1ZNeutGrH7bXQLCsT6FhK.FSDJ2OI9STv128gDlcEY10T8NH
xpU7Jxrqo58XqFwKOyphpWCrZSrUSrHIaJxlfroGqlTiZraB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esC9
knbx65RSdcPeJbxYPS7e72O9+A7l3lAE
-----------end_max5_patcher-----------
Now to create a clipping out of this you need to make a new patcher in Max, paste that code into the patcher and then save it in the "clippings" folder found in the Max5 application folder (on Macs it's Max5/patches/clippings/M4L.clippings --someone please post the Windows path). You want to save it with a descriptive name so you can easily discern what its function is.

Now whenever you're patching you can right-click the patcher window and choose "Paste From" in the contextual menu. That will take you to the list of clippings (and the subfolder of M4L-specific clippings) where you can choose the one you want. This is a powerful way to save time by keeping bits of oft-used code just a couple of clicks away.

Here's the (shorter) description of Clippings from the manual:

http://www.cycling74.com/docs/max5/vign ... pings.html

Re: Max for Live Tips & Tricks

Posted: Sun Dec 13, 2009 4:03 am
by mastahlee
Hey stringtapper, thanks for the tip. I haven't tried it yet, but it looks pretty useful. I think this thread is a great idea and it's a shame that no one else has responded yet. I'm just getting back into Max now with M4L after not touching it since college, so I don't have much to add to this topic but I did discover one nice little UI features Cycling74 have added since my last foray into Max/MSP version 4:

Double clicking on an unlocked canvas brings up the object creation context menu. If you add a new object from this menu, and hover your mouse over the left side of the object before typing anything a little (=) will appear. Clicking on that brings up a context menu of all the object names organized by function. Combining that with right-clicking on objects and bringing up their help patch is a great way to explore and discover new functions.

Re: Max for Live Tips & Tricks

Posted: Sun Dec 13, 2009 4:47 am
by Gregory Taylor
You could choose "What's New in Max 5?" from the Help menu, read through and click on whatever links appear interesting to you. This might prove particularly useful if you haven't worked with Max in a while, and interesting even if you have NEVER worked with it.

Re: Max for Live Tips & Tricks

Posted: Sun Dec 13, 2009 3:56 pm
by Gregory Taylor
If you've never been near Max (unlike our original poster) and you wouldn't necessarily be drawn to cool things that were added in Max 5 - lots of which were about using the interface), then cruising the "What's New" vignette might seem like an odd idea, even if it IS chock-full of cool stuff. So here's another option for you.

Do you find chasing through documentation a difficult thing to do (It's how I discovered most of the cool "little" things I learned that the help files didn't show me, but your mileage may vary)? Next time you've got an edit window open and you're staring at a patch wondering what the "quabbo" object does, try this:

1. Choose "Clue Window" from the Max Window menu. A little window will appear.

2. Move your cursor around the patch. Want to know what those icons at the bottom of the toolbar do? roll over them with the cursor (just like Live).

3. Want to do a quick peruse of the objects in a patch? Open one of the really knotty tutorial patches. Click on the Presentation Mode icon in the toolbar (which you've just located by mousing about) to show the patch rather than the interface, and click on the lock icon to lock the patch.

4. Now, roll over the objects in the patch and watch the Clue Window. It'll show you what each object in the patch is and does (This is a great way to peruse the objects in someone else's patch. Remember that it only works in a locked patcher, though).

5. Click on the Lock icon in the toolbar again to unlock the patch for editing. You've probably noticed that if you position your mouse over an inlet or outlet of a Max object, the little assistance bubble will tell you what the inlet or outlet of an object does and the kind of data it expects to have, right? Now, move your cursor over the left inlet of any object, hold down the shift key, and click (might take a little practice, but I'm sure you'll get it).

You'll see a menu appear that lists *all* of the various kinds of messages this Max object understands. Both attributes (those things you can set in the Inspector or by sending messages) *and* messages. While that menu's up, roll your cursor over any of the listed messages or attributes and watch the Clue Window. You'll see a description of what the message is and what it does.

What you're actually doing here is "reading" the entries in the object's refpage without opening a document window.

The menu has a few other things, but I'll let you discover them yourself. I hardly ever have a refpage open in the docs window while patching, thanks to this neat little feature.

Re: Max for Live Tips & Tricks

Posted: Sun Dec 13, 2009 4:02 pm
by jon_moore
Great tips Greg. The integrated helper apps within Max have really helped me acclimatise myself to the world of Max programming.

Re: Max for Live Tips & Tricks

Posted: Sun Dec 13, 2009 7:01 pm
by Tone Deft
mastahlee wrote:Double clicking on an unlocked canvas brings up the object creation context menu.
no need to double click, just hit 'n' then type the name of the object. max autocompletes the object's name for you, making it easier to type in the name.

Re: Max for Live Tips & Tricks

Posted: Sun Dec 13, 2009 7:07 pm
by gavspav
Following on from that, when a patcher is unlocked:

As well as N bringing up a new object,
P brings up the Palette window.
I creates an integer box
F creates float.
M creates a message box

And there are others which I forget.

Also Command Click (Ctrl on PC?) toggles Lock/Unlock.
And as I posted elsewhere Alt Drag duplicates objects and patch cords.

I'm sure this is all in the documentation but I only just realized it and it makes for less mousing.

Re: Max for Live Tips & Tricks

Posted: Sun Dec 13, 2009 7:28 pm
by stringtapper
More:

t = create a toggle object
c = create a comment object
b = create a button object
j = create a Jitter object (with contextual menu of all jit.* objects)
l = create a Live object (with contextual menu of all live.* objects)
p = bring up object palette
r = bring up object palette with recent object tab selected

Tone Deft wrote:
mastahlee wrote:Double clicking on an unlocked canvas brings up the object creation context menu.
no need to double click, just hit 'n' then type the name of the object. max autocompletes the object's name for you, making it easier to type in the name.
@mastahlee: that's called the "object palette" that comes up when you double click.

@Tone: I wouldn't say "no need." The object palette can be useful for people starting out to get a visual cue as to what an object's function is.

Notice, however, that only the most used objects and GUI objects appear in the object palette. For other objects, indeed use Tone's tip of hitting 'n' for a new object.

Re: Max for Live Tips & Tricks

Posted: Sun Dec 13, 2009 7:31 pm
by Gregory Taylor
The canonical listing can be found by typing the word "shortcuts" into the Max Help window. There are also some very cool things that the Max File Browser does that you might find of use in terms of speeding up your programming [the quickest way to find the File Browser vignette would be to type "File Browser" in the Max Help window, too].

I tend to send people to the "What's new in Max 5?" screen because so very much of what makes Max a lot easier to work with appeared in version 5; usability was a real focus on its development.

Re: Max for Live Tips & Tricks

Posted: Sun Dec 13, 2009 7:37 pm
by stringtapper
You won't, however, find these single keystrokes we've listed under the "shortcuts" that Greg mentioned. Instead search for "key commands" in the Max Help window to find the list. (I always thought it was weird that these were separate, and in fact there isn't even a link from the "shortcuts" page to the "key commands" page)

Re: Max for Live Tips & Tricks

Posted: Sun Dec 13, 2009 7:43 pm
by jon_moore
stringtapper wrote:You won't, however, find these single keystrokes we've listed under the "shortcuts" that Greg mentioned. Instead search for "key commands" in the Max Help window to find the list. (I always thought it was weird that these were separate, and in fact there isn't even a link from the "shortcuts" page to the "key commands" page)
Found that strange myself. Thanks for pointing it out.

Re: Max for Live Tips & Tricks

Posted: Sun Dec 13, 2009 8:13 pm
by Tone Deft
I'm watching videos over here
http://darwingrosse.blogspot.com/

and as he draws wires I hear a click as he sets corners for the routing, how is he doing that?

Re: Max for Live Tips & Tricks

Posted: Sun Dec 13, 2009 8:18 pm
by stringtapper
Tone Deft wrote:I'm watching videos over here
http://darwingrosse.blogspot.com/

and as he draws wires I hear a click as he sets corners for the routing, how is he doing that?
Hold shift when you click an outlet to start drawing a cable. Then you can click at each point where you want the cable to segment after that.

OR you can have "Segmented Patch Cords" chosen in the Options menu which will let you do it without holding shift first.

Re: Max for Live Tips & Tricks

Posted: Sun Dec 13, 2009 8:28 pm
by gavspav
Thanks - that's a good one!

I feel like Live.APIexplorer should be included in this thread.

In case anyone hasnt discovered it, it is a M4L device which is an incredibly useful tool for exploring what can be done with the API.

I can't remember who made it - if it is third party device or if it is part of M4L but hopefully someone can confirm?

Re: Max for Live Tips & Tricks

Posted: Sun Dec 13, 2009 8:54 pm
by jon_moore
gavspav wrote:Thanks - that's a good one!

I feel like Live.APIexplorer should be included in this thread.

In case anyone hasnt discovered it, it is a M4L device which is an incredibly useful tool for exploring what can be done with the API.

I can't remember who made it - if it is third party device or if it is part of M4L but hopefully someone can confirm?
Really helpful device made by Mathieu Chamagne the chap behind maxobjects.com

It can be downloaded @ http://forum.ableton.com/viewtopic.php?f=35&t=125694 If the links dead let me know and I'll re-upload it.