A newer version of Max is available. Click here to access the latest version of this document.

adstatus

Report and control audio driver settings

Description

The adstatus object controls different audio settings depending on the argument you use. The possible arguments are listed in the Arguments section below.

Arguments

Name Type Opt Description
Controllable-settings: symbol Obligatory. The first argument is a symbol that specifies the setting to be controlled by the adstatus object. Some settings require an additional integer argument. The possible settings are:
cpu symbol Reports current CPU utilization.
cpulimit symbol Reports and sets the CPU utilization limit as a percentage from 0-100.
driver symbol Lists the available audio drivers and allows the current one to be changed.
info symbol Reports the number of function calls and signals used in the top level DSP chain.
input symbol Requires an additional argument specifying a logical channel number (used by the adc~ object) between 1 and 512. Lists the available audio driver input channels and allows the current setting to be changed.
iovs symbol Reports the available I/O vector sizes of the current audio driver and allows the current I/O vector size setting to be changed.
latency symbol If supported by the audio driver, reports the input and output latencies of the driver in samples.
numinputs symbol Reports the number of input channels of the current audio driver.
numoutputs symbol Reports the number of output channels of the current audio driver.
optimize symbol Turns the optimization flag on or off. On the Macintosh, this is used to control the use of Altivec (G4 processor) optimizations.
option symbol Requires an additional argument specifying the option number (starting at 1). If the current audio driver uses the numbered option, reports the available choices for setting the value of the option.
optionname symbol Requires an additional argument specifying the option number (starting at 1). If the current audio driver uses the numbered option, the name of the option is reported.
output symbol Requires an additional argument specifying a logical channel number (used by the dac~ object) between 1 and 512. Lists the available audio driver output channels and allows the current setting to be changed.
overdrive symbol Controls the setting of overdrive mode (where the scheduler runs in a high-priority interrupt).
sigvs symbol Reports the available signal vector sizes and allows the current signal vector size setting to be changed.
sr symbol Reports the available sampling rates and allows the current sampling rate setting to be changed.
switch symbol Turns the DSP on or off.
takeover symbol Controls the setting of scheduler in audio interrupt mode.
timecode symbol If supported by the audio driver, reports the current timecode value.

Messages

bang In left inlet: Reports the current state of the setting. In many cases, messages are sent out the adstatus object's left outlet to set a pop-up menu object to display the current setting with a set message. In these cases, the numerical value of the setting is sent out the adstatus object's right outlet. The exact behaviors are listed in the Output section below.
int input [int]
In left inlet: Changes the setting. In most cases, the number will correspond to the index of the menu item whose value was set by the bang message to adstatus.
  (inlet1) input [int]
In right inlet: If the adstatus object is used with the input, iovs, output, sigvs, sr settings, an int in the right inlet sets the value numerically rather than by using a menu index (see the reset or loadbang message below). For all other settings, a number in the right inlet behaves identically to one in the left inlet.
float input [float]
Same as int.

loadbang In left inlet: Reports the state of the setting upon loading the patch. In many cases, messages are sent out the adstatus object's left outlet to set a pop-up menu object to display the current setting with a set message. In these cases, the numerical value of the setting is sent out the adstatus object's right outlet. The exact behaviors are listed in the Output section below.
override flag (0 or 1) [int]
In left inlet: The word override, followed by a 1, turns on override mode for the setting associated with the object. When override mode is enabled, any change to the setting is not saved in the MSP Preferences file. The message override 0 turns override mode off. By default, override is off for all settings. However, some settings are specific to audio drivers and may not be saved by the driver.
set logical-channel-number (1 through 512) [int]
In left inlet: The word set, followed by a number between 1 and 512, changes the logical channel associated with an adstatus input or adstatus output object. The current real audio driver input or output channel set for the new logical channel is sent out the object's outlets.

Information for box attributes common to all objects

Output

cpu: Reports CPU utilization as a percentage (normally from 0 to 100).
cpulimit: Reports the current CPU utilization limit.
driver: Lists all current audio driver choices.
float: Out left outlet: For objects that don't use a menu-style output, the current value of the setting is sent out the left outlet. Here are details for specific settings:
float: Out right outlet: Here are the objects that output something out the value outlet of the object:
info: Reports the number of function calls used in the top-level DSP chain.
info: Reports the number of signals used in the top-level DSP chain.
input: Lists audio input channels for the audio driver currently in use.
input: Reports the current input channel for the specified logical channel.
int: Out left outlet: For objects that don't use a menu-style output, the current value of the setting is sent out the left outlet. Here are details for specific settings:
int: Out right outlet: Here are the objects that output something out the value outlet of the object:
iovs: Lists I/O vector sizes for the audio driver currently in use.
iovs: Reports the current I/O vector size.
latency: If supported by the audio driver, reports the input latency of the audio driver.
numinputs: Reports the number of inputs in the current audio driver.
numinputs: Reports the number of inputs in the current audio driver (same as left outlet).
numoutputs: Reports the number of outputs in the current audio driver.
numoutputs: Reports the number of outputs in the current audio driver (same as left outlet).
optimize: Creates an On/Off menu for use with this setting.
option: Creates a list of choices for the specified option.
option: Reports the menu item index of the option's current value.
optionname: Sets a menu that names the specified option. Intended for use with a pop-up menu object in label mode.
output: Lists audio output channels for the audio driver currently in use.
output: Reports the current output channel for the specified logical channel.
overdrive: Creates an On/Off menu for use with this setting.
overdrive: Reports the current on/off setting of overdrive mode.
overdrive: Reports the current on/off setting of overdrive mode.
set: Out left outlet: When a bang message is received or when the value of the setting that has a menu-style output is changed, the word set, followed by a number with a menu item index (starting at 0) is sent out. Here are details of outputs from the left outlet for specific settings with menu-style outputs:
sigvs: Lists signal vector sizes for the audio driver currently in use.
sigvs: Reports the current signal vector size.
sr: Lists sampling rates available for the audio driver currently in use.
sr: Reports the current sampling rate.
switch: Creates an On/Off menu for turning the DSP on and off.
switch: Reports the current on/off setting of the DSP.
takeover: Creates an On/Off menu for switching scheduler in audio interrupt mode.
takeover: Reports the current on/off setting of takeover mode.
timecode: If supported by the audio driver, reports the current timecode as a list in the following format:

1. time code sample count most significant word

2. time code sample count least significant word

3. time code subframes

4. time code flags

5. time code frame rate
various: Out left outlet: For many settings, a series of messages intended to set up a pop-up menu object are sent out the left outlet when the reset or loadbang message is received by adstatus. See the reset message in the Input section for more details.

The following settings have a menu-style output: driver, input, iovs, optimize, output, sigvs, sr, switch, and takeover.

Examples

adstatus lets you monitor and change audio parameters from within your patch

See Also

Name Description
dspstate~ Report current DSP settings
adoutput~ Access audio driver output channel
MSP: Audio Input and Output MSP: Audio Input and Output
MSP Tutorial 26: Frequency Domain Signal Processing with pfft~ MSP Tutorial 26: Frequency Domain Signal Processing with pfft~