This patch requires the abstraction for hexagonal radial panning to be saved in the Max file search path with the name "hexagonalradialpanner~". It demonstrates the 6-channel panner, and shows how the sound can be moved around the space in a repeating circle by using a phasor~ to supply the panning angle.
This exmaple demonstrates a simple way to ramp amplitude with number~.
This example shows different ways to interpolate between values, for the purpose of automating volume control.
This example shows how you can turn on and off audio files with a single toggle –– as in swapping between one and the other. Since 1 is on and 0 is off, you can use a == 0 object to produce the opposite (to turn one thing off when you turn the other on and vice versa). This can be seen in action in the example on the left.
The idea of “sample and hold” is to capture the amplitude of a signal at a particular instant in time, and hold it constant for a while. In MSP, the sah~ object allows you to do just that.
As explained in MSP Tutorial 2, in order to avoid creating clicks in audio when you change the amplitude, you need to interpolate smoothly from one gain value to another. Example A in this patch shows how to use the line~ object to do that. The gain value from the number box is combined with a transition time in the pack object (10 ms in this case) and the two numbers are sent as a list to line~.
Amplification of audio (turning the volume up or down) corresponds to the mathematical operation of multiplication 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.
Audio delay is achieved by creating a buffer in which the most recent past sound can be stored. Usually this is called a "ring buffer" or "circular buffer", because when the buffer is filled (with, let's say, the past one second of sound), it loops around and begins refilling itself at the beginning, thus overwriting the sound that was stored more than one second ago.