We have just mentioned the timing on a macroscopic level; let's quickly introduce one of the most important things we'll learn about Max: microscopic timing, as I call it, or message ordering. Consider this situation: we'd like to use a MIDI [notein]
object to trigger a custom sequence or function. So, we know that we need to construct something that takes pitch and velocity and produces a bang (always a good design strategy; think what's coming in and out, and then what needs to be in there). Simple enough. However, [notein]
also sends note-off messages (a velocity of zero), so we need to filter those out. On an incoming velocity, we first need to test it (is it zero?) and then decide whether to pass it or not. That's what you can see in the following patcher; it's the contents of the ourStripnote
subpatcher contained in the Micro_Timing_and_Message_Order.maxpat
patcher:
The first do this then do that process is expressed by [t i i]
. It...