<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="adstatus" module="msp" category="MSP System">
	<digest>
		Report and control audio driver settings
	</digest>
	<description>
		Use the <o>adstatus</o> object to control Max audio settings.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP System
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<!--OUTLETS-->
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="Controllable-settings:" optional="0" type="symbol">
			<digest>
				Audio setting to be controlled
			</digest>
			<description>
				The first argument is a symbol that specifies the setting to be controlled by the <o>adstatus</o> object. Some settings require an additional integer argument. The possible settings are:
				<br />
				<br />
				cpu: Reports current CPU utilization.
				<br />
				cpulimit: Reports and sets the CPU utilization limit as a percentage from 0-100.
				<br />
				driver: Lists the available audio drivers and allows the current one to be changed.
				<br />
				info: Reports the number of function calls and signals used in the top level
				<br />
				input (Requires an additional argument specifying a logical channel number (used by the <o>adc~</o> object) between 1 and 512): Lists the available audio driver input channels and allows the current setting to be changed.
				<br />
				iovs: Reports the available I/O vector sizes of the current audio driver and
				<br />
				latency: If supported by the audio driver, reports the input and output latencies of the driver in samples.
				<br />
				numinputs: Reports the number of input channels of the current audio driver.
				<br />
				numoutputs: Reports the number of output channels of the current audio driver.
				<br />
				option (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.
				<br />
				optionname (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.
				<br />
				output (Requires an additional argument specifying a logical channel number (used by the <o>dac~</o> object) between 1 and 512): Lists the available audio driver output channels and allows the current setting to be changed.
				<br />
				overdrive: Controls the setting of overdrive mode (where the scheduler runs in a
				<br />
				sigvs: Reports the available signal vector sizes and allows the current signal vector size setting to be changed.
				<br />
				sr: Reports the available sampling rates and allows the current sampling rate setting to be changed.
				<br />
				switch: Turns the DSP on or off.
				<br />
				takeover: Controls the setting of scheduler in audio interrupt mode.
				<br />
				timecode: If supported by the audio driver, reports the current timecode value.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Report the current state of the setting
			</digest>
			<description>
				In left inlet: Reports the current state of the setting. In many cases, messages are sent out the <o>adstatus</o> object's left outlet to set a pop-up menu object to display the current setting with a <m>set</m> message. In these cases, the numerical value of the setting is sent out the <o>adstatus</o> object's right outlet. The exact behaviors are listed in the Output section below.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Change a setting
			</digest>
			<description>
				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 <m>bang</m> message to <o>adstatus</o>.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Change a setting
			</digest>
			<description>
				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 <m>bang</m> message to <o>adstatus</o>.
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Use numerical value rather than menu index (input/iovs/output/sigvs/sr)
			</digest>
			<description>
				In right inlet: If the <o>adstatus</o> 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 <m>reset</m> or <m>loadbang</m> messages). For all other settings, a number in the right inlet behaves identically to one in the left inlet.
			</description>
		</method>
		<method name="loadbang">
			<arglist />
			<digest>
				Report the state of the setting upon loading the patch
			</digest>
			<description>
				In left inlet: Reports the state of the setting upon loading the patch. In many cases, messages are sent out the <o>adstatus</o> object's left outlet to set a pop-up menu object to display the current setting with a <m>set</m> message. In these cases, the numerical value of the setting is sent out the <o>adstatus</o> object's right outlet. The exact behaviors are listed in the Output section below.
			</description>
		</method>
		<method name="override">
			<arglist>
				<arg name="flag" optional="0" type="int" />
			</arglist>
			<digest>
				Turn on override mode for a setting
			</digest>
			<description>
				In left inlet: The word <m>override</m>, 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 <m>override 0</m> 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.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="logical-channel-number" optional="0" type="int" />
			</arglist>
			<digest>
				Change the logical channel associated with an <o>adstatus</o> input or <o>adstatus</o> output object
			</digest>
			<description>
				In left inlet: The word <m>set</m>, followed by a number between 1 and 512, changes the logical channel associated with an <o>adstatus</o> input or <o>adstatus</o> output object. The current real audio driver input or output channel set for the new logical channel is sent out the object's outlets.
			</description>
		</method>
		<method name="update">
			<arglist />
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="adstatus.png" caption="adstatus lets you monitor and change audio parameters from within your patch" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="dspstate~" />
		<seealso name="adoutput~" />
		<seealso name="04_mspaudioio" module="msp" type="tutorial" />
		<seealso name="14_analysischapter04" module="msp" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="various">
			<description>
				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 <o>adstatus</o>. See the <m>reset</m> message in the Input section for more details.
				<br />
				<br />
				The following settings have a menu-style output: <m>driver</m>, <m>input</m>, <m>iovs</m>, <m>output</m>, <m>sigvs</m>, <m>sr</m>, <m>switch</m>, and <m>takeover</m>.
			</description>
		</entry>
		<entry name="set">
			<description>
				Out left outlet: When a <m>bang</m> message is received or when the value of the setting that has a menu-style output is changed, the word <m>set</m>, 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:
			</description>
		</entry>
		<entry name="driver">
			<description>
				Lists all current audio driver choices.
			</description>
		</entry>
		<entry name="input">
			<description>
				Lists audio input channels for the audio driver currently in use.
			</description>
		</entry>
		<entry name="iovs">
			<description>
				Lists I/O vector sizes for the audio driver currently in use.
			</description>
		</entry>
		<entry name="option">
			<description>
				Creates a list of choices for the specified option.
			</description>
		</entry>
		<entry name="optionname">
			<description>
				Sets a menu that names the specified option. Intended for use with a pop-up menu object in label mode.
			</description>
		</entry>
		<entry name="output">
			<description>
				Lists audio output channels for the audio driver currently in use.
			</description>
		</entry>
		<entry name="overdrive">
			<description>
				Creates an On/Off menu for use with this setting.
			</description>
		</entry>
		<entry name="sigvs">
			<description>
				Lists signal vector sizes for the audio driver currently in use.
			</description>
		</entry>
		<entry name="sr">
			<description>
				Lists sampling rates available for the audio driver currently in use.
			</description>
		</entry>
		<entry name="switch">
			<description>
				Creates an On/Off menu for turning the DSP on and off.
			</description>
		</entry>
		<entry name="takeover">
			<description>
				Creates an On/Off menu for switching scheduler in audio interrupt mode.
			</description>
		</entry>
		<entry name="int">
			<description>
				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:
			</description>
		</entry>
		<entry name="float">
			<description>
				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:
			</description>
		</entry>
		<entry name="cpu">
			<description>
				Reports CPU utilization as a percentage (normally from 0 to 100).
			</description>
		</entry>
		<entry name="cpulimit">
			<description>
				Reports the current CPU utilization limit.
			</description>
		</entry>
		<entry name="info">
			<description>
				Reports the number of function calls used in the top-level DSP chain.
			</description>
		</entry>
		<entry name="latency">
			<description>
				If supported by the audio driver, reports the input latency of the audio driver.
			</description>
		</entry>
		<entry name="numinputs">
			<description>
				Reports the number of inputs in the current audio driver.
			</description>
		</entry>
		<entry name="numoutputs">
			<description>
				Reports the number of outputs in the current audio driver.
			</description>
		</entry>
		<entry name="timecode">
			<description>
				If supported by the audio driver, reports the current timecode as a list in the following format:
				<br />
				<br />
				1. time code sample count most significant word
				<br />
				<br />
				2. time code sample count least significant word
				<br />
				<br />
				3. time code subframes
				<br />
				<br />
				4. time code flags
				<br />
				<br />
				5. time code frame rate
			</description>
		</entry>
		<entry name="int">
			<description>
				Out right outlet: Here are the objects that output something out the value outlet of the object:
			</description>
		</entry>
		<entry name="float">
			<description>
				Out right outlet: Here are the objects that output something out the value outlet of the object:
			</description>
		</entry>
		<entry name="info">
			<description>
				Reports the number of signals used in the top-level DSP chain.
			</description>
		</entry>
		<entry name="iovs">
			<description>
				Reports the current I/O vector size.
			</description>
		</entry>
		<entry name="sigvs">
			<description>
				Reports the current signal vector size.
			</description>
		</entry>
		<entry name="option">
			<description>
				Reports the menu item index of the option's current value.
			</description>
		</entry>
		<entry name="switch">
			<description>
				Reports the current on/off setting of the DSP.
			</description>
		</entry>
		<entry name="takeover">
			<description>
				Reports the current on/off setting of takeover mode.
			</description>
		</entry>
		<entry name="input">
			<description>
				Reports the current input channel for the specified logical channel.
			</description>
		</entry>
		<entry name="output">
			<description>
				Reports the current output channel for the specified logical channel.
			</description>
		</entry>
		<entry name="overdrive">
			<description>
				Reports the current on/off setting of overdrive mode.
			</description>
		</entry>
		<entry name="sr">
			<description>
				Reports the current sampling rate.
			</description>
		</entry>
		<entry name="numinputs">
			<description>
				Reports the number of inputs in the current audio driver (same as left outlet).
			</description>
		</entry>
		<entry name="numoutputs">
			<description>
				Reports the number of outputs in the current audio driver (same as left outlet).
			</description>
		</entry>
		<entry name="overdrive">
			<description>
				Reports the current on/off setting of overdrive mode.
			</description>
		</entry>
	</misc>
</c74object>
