This patch is an example of a sampling synthesizer in Max. The kslider may be used to control the patch if a MIDI controller is not available. The gtrvoice patch used inside of the patcher guitar6strings may be found in the example Managing samples in Max. The guitar samples that are loaded into the buffer subpatch may be found in the file called guitarstrings.zip.
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 matrix~ object to route an audio source—in this case the adc~—to different effect patches represented by the patcher objects.
This example plays the first sixteen harmonics based on a fundamental frequency where the rate at which each harmonic play is period / # of harmonic. For example, with a period of 10000 ms—meaning the fundamental plays every 10000 ms—the 4th harmonic will be heard every 10000/4 ms, or 2500 ms.
This example shows how to use the function object for making tendency masks with breakpoint line segment functions (à la Koenig and as explained by Rowe) using a line object to progress through the functions that describe the minimum and maximum of the function’s range.
Here is a patch for choosing between multiple video effects.
Once you get to a large number of booleans, you might want to pack all those 0/1 states together as a single integer and use that integer to look up a behavior. Here’s an example using four booleans; extend and alter to suit your needs.
This example demonstrates how to visually alter a numbox when it receives a value. This is particularly useful to detect when the value hasn't changed but is still received.
To create an inlet for a subpatch that accepts both signals and data, try using t signal. See the patch example for this implementation within the subpatcher.