This example demonstrates how to harmonize a single MIDI note with multiple pitches.
To use floating point numbers with the poly object separate the integer portion and the fractional portion. Then recombine them after the poly object, as in the example.
This example show 2 ways to increase and decrease a value on a number box. One uses a set of trigger, textbutton, int, and + objects, the other simply uses the incdec object.
This patch demonstrates a way to generate random numbers within a specified range.
Similarly to the sample and hold object sah~, the snapshot~ object can be used to capture the amplitude of a signal at a specific instant.
Recursion, feedback loops, and unlimited untimed (as fast as possible) loops are not feasible in Max. In effect, you’d be asking Max to do an unlimited number of things all at the same time. Its scheduler (its internal “to-do” list) would get filled and it would be unable to do anything more. In computer lingo, its “stack” (its inbox of tasks to do) would overflow.
The left part of this example shows the use of the random object to make arbitrary note choices. Every time random receives a bang in its inlet, it sends out a randomly chosen number from 0 to one less than its argument. In this case it chooses one of 61 possible key numbers, sending out a number from 0 to 60. We then use a + object to offset that value by 36 semitones, transposing up three octaves to the range 36 to 96––cello low C to flute high C.
There are many objects available for delaying events (i.e., for scheduling events to happen at a specific future moment). For timing and scheduling events, the most common object is the metro object (send bang periodically at a specified time interval), which can be used to trigger events, start/stop entire processes, or trigger a counter to step through a table or a coll or any sort of sequence of things.