Namespaces

Variants
Actions

20Concepts Lesson 10 - Presets and The Pattr Object

From Cycling '74 Wiki
Revision as of 05:44, 29 November 2012 by Ddg@cycling74.com (Talk | contribs)

Jump to: navigation, search



(Needed: Example Video)

(Needed: Overview Text)

(Needed: Fixture Patches with download)

The Pattr Object

Working with preset content in Max is all about learning to work with the pattr object. This object manages connections to your on-screen UI objects, maintains a set of preset "slots" to select, and interacts with other objects for the storage and communication of the preset data. Perhaps the best way to learn about the pattr object is to review a set of videos created by Gregory Taylor that maps it all out:

Once you've reviewed these tutorials, we can start building toward our example patch.

More about autopattr

20Concepts-1001.gif

Now that we've learned about the overall use of pattr, let's look into some details. First, the important autopattr object. One important part of the autopattr autonaming function is that it just uses the object's default name, and adds an array index (such as [1]) after similar objects after the first. If you want to manage the names better, you need to name the object before you instantiate (create) the autopattr object.

Secondly, if you want to exclude a control from the autopattr default management, you need to connect this object to the second outlet of the autopattr (as with the above patch). This is useful for controls that select a preset from a pattrstorage object, or when you have controls (like a master volume control) that shouldn't change from preset to preset.

Finally, if you add an object to the patch after you've created the autopattr object, you will need to either reload the patcher (by saving, closing and reopening the patch) or reinstantiate the autopattr object (normally by editing the content of the object box). This will cause autopattr to rerun its collection of objects, do any necessary naming (if @autoname is set to 1) and add new objects to the internal pattr system.

More about pattrstorage

(Needed: text)

Rerouting Data using pattr

(Needed: text)

Creating Complex Controls using Preset Morphing

(Needed: text)

Web Links

(Needed: text and links)

Exercises

(Needed: text and exercises)


by Darwin Grosse and Cory Metcalf