In the I/O Mappings window within the Audio Status… window you can map the outputs numbered 3-16 to play through outputs 1 or 2 of your available stereo output device (say, Built-In Audio, for example). This allows for testing patches on hardware that has less than the desired number of channels.
If gain is set to 1, a teeth~ object with ‘feedforward gain’ and ‘feedback gain’ arguments set to 0 is bypassed/transparent, which can be used as a dry/wet control. This can be confirmed by reading the details tab of the help file, which shows the formula used by teeth~, or by making a simple test patch like this one to test the hypothesis yourself.
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.
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.
This example demonstrates how the settings of a resonant bandpass filter can be altered in a rhythmic way for musical effect. The three table objects each contain 16 numbers, which will be used as the parameter settings for gain, center frequency, and Q in a reson~ object. The numbers in the table objects are looked up by a counter that cycles repeatedly through the table indices, 0 to 15.
This patch shows a simple way to control the balance between two sounds, and also illustrates the relationship between a) mixing two sounds to one location and b) panning one sound to two locations.
In "Constant power panning using square root of intensity" we used the square root of the desired intensity for each speaker to calculate the amplitude of each speaker. However, square root calculations are somewhat computationally intensive, and it would be nice if we could somehow avoid having to perform two such calculations for every single audio sample. As it happens, the sum of the squares of sine and cosine functions also equals 1.
The intensity of sound is proportional to the square of its amplitude. So if we want to have a linear change in intensity as we go from 0 to 1 or 1 to 0, we need to use the square root of that linear change to calculate the amplitude. This example patch is exactly like "Linear amplitude panning", except that we consider the linearly changing signal from line~ to be the intensity rather than the amplitude, and we take the square root of that value to obtain the actual amplitude for each speaker.
The simplest and most common way to localize a sound in a stereo field is to vary the relative intensity between the two speakers. To make a sound seem to move from one side to the other, for example, you can start with the level of one speaker set to 1 and the other speaker set to 0, then gradually turn one down to 0 as you bring the other up to 1. This patch demonstrates a direct linear pan from one speaker to the other.
This patch allows you to try out various filter settings of the biquad~ object, via the filtergraph~ object. For adjusting the parameters you can drag on filtergraph~ with the mouse, or you can send values in its three rightmost inlets for frequency, gain, and Q. The spectroscope~ object tries to draw the spectrum of the signal.