New Objects Overview

Before we start patching, I want to give you an overview the objects we will be using. That way you will already have heard about them once we are using them in a bigger context.

Button (“bang”)

Button

The button is one of the most important and most frequently used max objects. It provides visual feedback if you click on it and is used to trigger processes and messages.

print

print

 

 

 

 

 

The print objects prints messages to the Max window. It is useful for debugging and analysis purposes.

For example, print allows us to discover one of the most important Max-rules: with the help of print, we can see in which order messages are processed in Max:

rule1

The messages arrive in the following order: right-> left. You can see this in the Max window (where they are printed):

Max Window

 

toggle

On/off

Screen Shot 2013-11-18 at 22.02.27

The toggle is an on/off switch. It is used to turn processes on and off. It provides visual feedback.

Number boxes

number

 

 

 

Number boxes are used to display and output a number. It is important to distinguish between float and integer number boxes.

key

key

The key object reports keypresses and outputs them in various formats (e.g., their ASCII code).

select

select

Select can be used to test whether an input matches a certain value. If the input value matches, it outputs a bang out of the left outlet. If the input does not match the specified value, it will output it on the right-most outlet.

metro

metro

Metro is like a metronome. It outputs bangs at regular intervals (every x milliseconds).

delay

delay

The delay object delays a bang for x milliseconds.

plus (int)

plus

The plus object adds the two numbers it receives in its right and left inlet. The left inlet triggers the calculation. (It calculates and outputs the result when it receives something in its left inlet).

plus (float)

Like above, but with floats instead of integers.

plusfloat

See how important the point is:

pointless

 

Don’t forget the rule:

Rule

Have a look at what happens if you put a float into an integer number box:

float to int

simple math(-,*,/)

Like plus, but with other common mathematical operations (minus, multiplication, division).

math

a self-made counter

With what we know we can already build our own little counter:

count

On the first button click 1 is added to 0. The result is fed back into the plus object (imagine a [ + 1] now). The next time the button is pressed, 1 is added to 1 ([1 + 1]). The result is fed back into the plus object again (imagine [ + 2]).

We can combine this with the key object and the select object to count how often the spacebar is hit:

spacecount

Note that Max has its own counter object. However, this is one of the most important constructions/concepts you will have to learn. So we will build our own counters for now…

trigger

trigger

Because patch cords can get very messy and the sequence of messages can get very unclear we always use a trigger object when the order of messages is important. Trigger outputs the received message to many places in right-to-left order.