Manage MIDI processing using Gate
This example shows how to use the gate object to route midi note data to different patcher objects that could be used for a variety of processing options.
This example shows how to use the gate object to route midi note data to different patcher objects that could be used for a variety of processing options.
Upon patch initialization, one might be tempted to use multiple loadbang objects attached to delay objects in order to control the order of operations. A different approach, however, would be to use a single loadbang at the top level and use send or forward to send the messages you want, where you want, and in the order you want.
This patch shows several techniques relevant to granular synthesis, playing a stream of short excerpts of recorded sound. (The patch uses one abstraction, called pan~, that's provided in the example titled "Constant-intensity panning subpatch". You'll need to download that abstraction and save it with the name pan~ somewhere in Max's file search path.)
A common need in computer music is to schedule events to occur at regular intervals of time. This patch can be used as an abstraction for easily scheduling a specific number of events to occur at regular intervals.
This patch provides examples that compare linear rate changes to exponential rate changes. As with pitch and loudness, our sense of change in the rate of events is based on the ratio of tempos rather than the (subtractive) difference between tempos. In these examples, the rate changes by a factor of 16, from 1 event per second to 16 events per second, or vice versa.
Max can interface with other applications via ReWire. Max can act as either a ReWire host or a ReWire client. Max can be a client to an open host application just by choosing "ad_rewire" as the MSP audio driver in the DSP Status window. Alternatively, you can use Max as the host (mixer) application by including the rewire~ object in your program.
This example demonstrates creating a RAM buffer to hold a 10-second stereo recording, recording live audio into it (with input volume adjustment), and then playing randomly chosen backward clips of that sound, with a trapezoidal window to taper the beginning and ending of each clip to avoid clicks.
The timepoint object sends out a bang when the transport reaches a specified time position. This can be useful for causing something to happen—or for starting an entire process—at a particular instant during the transport's progress. A timepoint might, for example, even trigger a new time position value to be sent to the transport object itself, thus causing the transport to leap to a different time.
Even though Max is graphical, object-based, and event-driven (responds to user events like mouse clicks, key strokes, MIDI data, etc.), it's still sequential. Every message is sent (or scheduled to be sent) at a specific time, and nothing happens truly simultaneously. Therefore, it's important to be conscious of the precise order in which things occur. Study the example above to be sure you understand the way that Max orders messages.