<?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="dspstate~" module="msp" category="MSP System">
	<digest>
		Report current DSP settings
	</digest>
	<description>
		<o>dspstate~</o> can be used for calculations that require the sampling rate of current DSP processing block size. You can also use the leftmost outlet to trigger some event when the audio is turned on or off.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP System
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Connect signal, bang reports Info
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Connect signal, bang reports Info
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				1 When Audio Turns On, 0 When It Turns Off
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Current Sampling Rate
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				Current DSP Signal Vector Size
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="3" type="OUTLET_TYPE">
			<digest>
				Current I/O Vector Size
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="OBJARG_NAME" type="OBJARG_TYPE" optional="0">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Report audio status, sampling rate, and signal vector size
			</digest>
			<description>
				Triggers a report out the <o>dspstate~</o> object's outlets, telling whether the audio is on or off, the current sampling rate, and the signal vector size.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Report the sampling rate and vector size of the input signal
			</digest>
			<description>
				If a signal is connected to the <o>dspstate~</o> object's inlet, <o>dspstate~</o> reports that signal's sampling rate and vector size, rather than the global sampling rate and signal vector size.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="dspstate~.png" caption="Trigger an action when audio is turned on or off use sample rate to calculate timings" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="adstatus" />
		<seealso name="sampstoms~" />
		<seealso name="mstosamps~" />
		<seealso name="10_midichapter03" module="msp" type="tutorial" />
		<seealso name="14_analysischapter03" module="msp" type="tutorial" />
		<seealso name="14_analysischapter04" module="msp" type="tutorial" />
	</seealsolist>
	<discussion>
		<o>dspstate~</o> outputs state information automatically whenever the audio is turned on or off. You can also get the information by sending a <m>bang</m>. Connecting a signal to the <o>dspstate~</o> object's inlet reports information about that signal, although currently, all signals have the same sampling rate and vector size. Note that <o>dspstate~</o> will not output anything if the audio is not turned on in its window.
	</discussion>
	<misc name="Output">
		<entry name="int">
			<description>
				Out left outlet: If the audio is on or being turned on, 1 is sent out. If the audio is off or being turned off, 0 is sent out.
			</description>
		</entry>
		<entry name="float">
			<description>
				Out second outlet: Sampling rate of the connected <m>signal</m> or the global sampling rate.
			</description>
		</entry>
		<entry name="int">
			<description>
				Out third outlet: Current DSP signal vector size.
			</description>
		</entry>
		<entry name="int">
			<description>
				Out fourth outlet: Current I/O signal vector size.
			</description>
		</entry>
	</misc>
</c74object>
