abstraction

Linear mapping equation (lmap)

The term "mapping" refers to making a map of correspondences between a source domain and some other "target" range. (Think of the game where you are given words in one category and are challenged to try to find an appropriate correspondence in another category, as in "Kitten is to cat as puppy is to ...".) The simplest kind of numerical mapping is called "linear mapping". That's when a one-to-one correspondence is drawn from every value in a source range X to a value that holds an exactly comparable position in a target range Y.

A useful subpatch for mixing and balancing two sounds

To mix two sounds together equally, you just add them together. If you know that both sounds will frequently be at or near full amplitude (peak amplitude at or near 1) then you probably want to multiply each sound by 0.5 after you add them together, to avoid clipping. However, if you want to mix two sounds unequally, with one sound having a higher gain than the other, a good way to accomplish that is to give one sound a gain between 0 and 1 and give the other sound a gain that's equal to 1 minus that amount.

Phase distortion synthesis in a poly~ subpatch

This shows an implementation of phase distortion synthesis in MSP—using the phasor~, kink~, and cycle~ objects—in a patch that is designed to be used inside the poly~ object. For an explanation of this sort of phase distortion synthesis, see “A demonstration of phase distortion synthesis.” The main point of this example, though, is to show how a synthesis patch can be designed to respond directly to MIDI input.

Abstraction for crossfading delay times of a remote tapin~ object

If we want to use the delay crossfading technique shown in "Abstraction for crossfading between delay times" for multiple different delays of the same sound, the simplest solution is just to make multiple copies of that abstraction and send the same audio signal to each one. However, that's a bit inefficient in terms of memory usage because each subpatch would have its own tapin~ object, each of which would be containing the same audio data.

Generating a simple 2-operator FM tone

In order to enable and disable portions of an audio program easily, and to be able to reuse them multiple times, you will probably want to encapsulate an entire audio-generating or audio-processing procedure inside a single patch with inlets and outlets so that it can be used as a subpatch object in some other patch. This patch shows an example of a simple 2-oscillator frequency modulation tone generator that could easily be used as a subpatch in some other patch.