The dsp Object -- Controlling and Automating MSP
In order to provide low-level control over the MSP environment from within Max, a special object named dsp has been defined. This object is similar to the object max that can accept messages to change various options in the Max application environment. Sending a message to the dsp object is done by placing a semicolon in a message box, followed by dsp and then the message and arguments (if any). An example is shown below.
Turn the audio on or off without a dac~ or adc~ object
You need not connect the message box to anything, although you may want to connect something to the inlet of the message box to supply a message argument or trigger it from a loadbang object to configure MSP signal processing parameters when your patcher file is opened.
Here is a list of messages the dsp object understands:
Message Parameters
; dsp start Start Audio
; dsp stop Stop Audio
; dsp set N N = 1, Start Audio;
N = 0, Stop Audio
; dsp status Open DSP Status Window
; dsp open Open DSP Status Window
; dsp sr N N = New Sampling Rate in Hz
; dsp iovs N N = New I/O Vector Size
; dsp sigvs N N = New Signal Vector Size
; dsp debug N N = 1, Internal debugging on;
N = 0, Internal debugging off
; dsp takeover N N = 1, Scheduler in Audio Interrupt On;
N = 0, Scheduler in Audio Interrupt Off
; dsp wclose Close DSP Status window
; dsp inremap X Y Maps physical device input channel Y to logical input X
; dsp outremap X Y Maps logical output X to physical device output channel Y

; dsp setdriver D S If D is a number starting at 0, a new audio driver is chosen based on its index into the currently generated menu of drivers created by the adstatus driver object.
If D is a symbol, a new driver is selected by name (if D names a valid driver). The second argument S is optional and names the ‘subdriver.’ For instance, with ASIO drivers, ASIO is the name of the driver and PCI-324 is an example of a subdriver name.
; dsp timecode N N = 1 or 0 to start/stop timecode reading by the audio driver (only supported currently by ASIO 2 drivers).
; dsp optimize NN = 1 or 0 to turn Altivec optimization on/off
; dsp cpulimit NSets a utilization limit for the CPU, above this limit, MSP will not process audio vectors until the utilization comes back down, causing a click. N is a number between 0 and 100. If N is 0 or 100, there is no limit checking.
Certain audio drivers can be controlled with the ; dsp driver message. Refer to the Audio Input and Output section for more information on drivers that support this capability.