This tutorial is about the Presentation Mode feature of Max. Using Presentation Mode, you can create a UI specific to performance that is completely different from your programming model.
One of the difficulties of creating a good performance patch has always been “hiding” your programming so you would only be presented with useful performance controls. This is especially true when it was desirable to have large controls and clear signal routing. As we will see, many issues regarding performance layout are solved by including objects in the Presentation Mode and arranging them separately from their role in the program.
To open the tutorial patch, click on the green Open Tutorial button in the upper right-hand corner of the documentation window.
Overview of the patch
This is a patch similar to some of the drawing patches we’ve recently used; it scales your mouse movements to perform drawing in an lcd object. In this case, the "paintbrush" is a box (a , in lcd terms). Rather than simply drawing boxes in the lcd, the size, shape and color of the boxes are constantly being changed based on the settings of the one horizontal rslider and two vertical slider objects at the top of the patch. These boxes and the state of the metro object polling the mouse are all initialized when the patcher is opened with loadbang and loadmess objects (loadmess objects simply transmit an argument as a message, rather than a , when the patcher opens). With the metro running, move your mouse around to see that the drawing is constantly shifting in response to your mouse movements. If you squint your eyes, it might even seem Mondrian to you…
This patch, however, also shows one of the limitations of typical Max programming. The logic for the patch covers most of the working space, and somewhat overwhelms the result that is drawn in the lcd workspace. One option to make this more useable would be to hide all of the logic with encapsulation and resize the user interface elements. However, this may change the logical layout of the patch, and may make it more difficult to easily expand later. What we need is a way to create a performance interface that doesn’t interfere with our patch’s logical layout.
Using Presentation Mode
Max solves this problem by providing a special user-interface view of the patch: Presentation Mode. We enter presentation mode by clicking on the small icon at the bottom of the patcher that looks like a whiteboard on an easel. When we do this, we will see the patcher logic disappear, and the user interface elements in the patcher move into a more convenient layout for performance. Clicking on the icon again returns you to "patching" mode (the normal way of looking at patchers), where we can edit the logic of the patch. Presentation Mode simplifies the process of making a user-focused view of the patch.
When we are in the normal (patching) mode of our patch, we can define the items that will appear in Presentation Mode. Unlock the tutorial patch; you will see that the user interface elements have a pink halo. This is the indicator that an object will be included in the Presentation Mode. Let’s add a few objects to the Presentation Mode.
Two objects that would be interesting in our performance patch are the two number boxes that display the current box sizing. These number boxes are just below the two scale objects in the middle of the patch. Select one of the number boxes, then choose Add to Presentation from the Object menu. If you switch to Presentation Mode, you will see this number box, but the size and location remains unchanged from where it is in the normal mode. It would probably make sense to move this box under the rslider that controls its range. You can click and drag the number box in Presentation Mode just like you can in "patching" mode – you can even resize it if you like. Changes in size and location will not affect the layout in the normal patcher. You can check this by switching back and forth between the two modes.
Return to the normal mode and select the other number box. Again, select Add to Presentation Mode, then switch modes. You can move and resize this number box as well, probably moving it underneath the rslideras well. When you are in Presentation Mode, you can lock the patch (just like you can in patching mode) by clicking on the lock icon at the bottom of the patcher. This way, you can move the controls without altering the screen layout.
When in Presentation Mode, you can add objects to your patcher that are then automatically added to Presentation Mode. Unlock the Presentation Mode view, then double-click to bring up the object palette. Add a comment object, and edit it to create a “Current Size” label. Move this to the area of the patch with the new number boxes are so that their use is more obvious. If you return to Patching mode, you will see that the object exists in this layer as well, in the position that it was originally created. It also has the reddish halo, showing that it is included in the Presentation Layer.
What do you do if you want to work on both the "patching" and Presentation view at the same time? Max has a little trick up its sleeve – it allows you to have multiple views of the same patcher open simultaneously. With the patch window selected for focus, choose the New View option in the View menu; it will open a new window with all the same patch contents. In fact, it is the same patcher, as you can see by the contents of the lcd object and the state of the various number boxes. If you change the patcher on one window, they are reflected in the other. You can have one of the windows in Presentation Mode (to tweak the performance layout) while working on the patcher's logic in the other. The use of multiple views is also useful for working on large patches that might overwhelm your screen; instead, you can open two views and scroll to different regions of the patch; be assured that all of your changes are occurring on a single version of the patch.
Presentation Mode provides the means to create easy-to-operate performance interfaces without destroying the logical layout of your patch. Objects in Presentation Mode operate the same as outside of it, but can have different sizes, geometries and locations – whatever is necessary for making the best interface layout. Additionally, the ability to have multiple views of a patch gives you options for more efficient programming and access to large patches even on small screens.
|Configuring Objects In A Patcher
|Configuring Objects In A Patcher