Max/MSP is designed to allow realtime audio processing and control.
Max objects are processed/updated at 1 millisecond intervals (referred to as the "control rate").
Between control increments, MSP objects must perform their computations to satisfy the audio sample rate (typically 44100 samples per second on most Macintosh built-in audio devices).
MSP objects perform "vectorized" computations ... they compute a set number of output samples before sending that data to the next "object" in the audio network. The number of samples per "vector" can be controlled in the DSP Status window (opened from the Options menu) via the "Signal Vector Size" parameter.
Audio samples to be sent to the digital-to-analog converter (DAC) or read from the analog-to-digital converter (ADC) are "bundled" in buffers as well. The size of these input/output buffers is set via the "I/O Vector Size" parameter in the DSP Status window.
Audio file data can be read into a buffer~ object and subsequently used by various other MSP objects.
A buffer~ object should be given a unique name so that it can be identified by other objects.
A "read" message to a buffer~ object will open a dialog box for selecting a specific file to import. If the read message is given a specific file name and that file is found in the MSP path, a dialog box will not be opened.
A cycle~ object can read its "wavetable" from a buffer~ by specifying the buffer name as a parameter. However, the cycle~ object will only read 512 samples from a buffer. A buffer offset argument can be provided to the cycle~ object.
A phasor~ object produces a sawtooth ramp generator in the range 0 - 1. It can be used to increment the phase of an oscillator (cycle~).
The gain~ object provides an interpolating logarithmic signal fader.
The meter~ object provides a graphical signal level meter.
The scope~ object provides a graphical signal display. It responds to a variety of special messages.
Exponential envelopes tend to produce more natural sounds.
The curve~ object generates exponential or logarithmic envelopes.
In addition to target and duration parameters, the curve~ object takes a "curve" parameter that controls the rate of increase/decrease of the envelope. A value of 0 produces linear line segments. A value between 0 and 1 produces an exponential curve, while values between 0 and -1 produce logarithmic curves.
With newer version of Max/MSP, it is possible to make use of the function object to design envelopes for use by the curve~ object. However, because the list of parameters to the curve~ object is different from the line~ object, the ``Mode'' of the function object must be set to ``Curve'' in the inspector and setcurve messages must be used to initially set the curve parameters of breakpoints (they default to linear line segments).
The gate~ object can be used to patch a single input to one of several outputs.
The selector~ object can be used to patch one of several inputs to a single output.
The matrix~ object can be used to route various inputs to various outputs. The matrixctrl object provides a graphical control for the matrix~ object.
It is possible to turn off audio in a specific subpatch by connecting a mute~ object to the inlet of the subpatch. A pass~ object should be used inside any subpatch (connected just above subpatch outlets) that might be muted.
Audio and MIDI operations can be turned off in a subpatch by sending an enable 0 message to a pcontrol object connected to a subpatch.