Uzi
Uzi sends out a specified number of bangs rapidly.[uzi 5] will bang 5 times as fast as possible.
We have for example used it to produce 5 randomly placed mines in the minesweeper game.
Ggate
ggate (note the two g!), is a special version of gate. It is a visual gate which passes the input to one of the two outlets:
Switch
In short: switch outputs messages from a specific inlet. We already have learned about the gate. In some sense, the switch is a bit like its opposite. It has several inlets and one outlet. We can tell it to which inlet it should ‘listen’.
Split
Split decides if an input falls within a specified range. If it does fall within the range, it sends the number out the left outlet. If it does not fall within the specified range, it sends the number out the right outlet.
Change
The change object filters out number repetitions. It only puts numbers out, if they have changed.
Line
Line is used to generate a ramp from one value to another within a specified amount of time. For example:
Hi
[hi] is one of my fave objects. [hi] stands for human interface. It can be used to connect usb (game) controllers to MAX. Usually it is easy to read out actions like pushing buttons or tilting joysticks or jumping on dance mats. If you have a game controller, connect it and try to trigger some sounds with it. [hi] is especially cool because you can also destroy the outside of the game controllers and just use the buttons and sensors in any way you want. Personally, I have used joysticks and dance matts to trigger sounds on several occasions.
Coll
We won’t use coll today but you should know about it. Coll can be used for the storage, organization, editing, and retrieval of different messages. An easy way of putting in messages into store is double clicking and typing in the messages into the text-editor which appears.
Double clicking on coll allows you to put messages into it:
Make sure you save the content when you close the text-editor.
Another way is by sending it messages like this:
If we now double click we will see the content of the coll:
We can also retrieve its content like this:
We can also use it for saving combinations of numbers and so on. In case you save words, and so on, you will get the word symbol appended to the output. If you want to get rid of such an word, you could for example use route:
zl group
The easy patch looks like this:
We have made a patch for checking whether “hello” has been typed. Unfortunately, this has one disadvantage. Let’s assume the user starts with a wrong letter like ” j” and then continues with “hello hello”. None of the following “hello” will be detected because what the computer sees is ” j h e l l” and then “o h e l l”. The computer always counts till 5. Idealy, we would check whether the last five typed letters make the word “hello”. We could do that using a few [int] objects in a row. Here is an example, which always holds the numbers of the last 5 keypresses: