<?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="dac~" module="msp" category="MSP I/O">
	<digest>
		Audio output and on/off
	</digest>
	<description>
		The <o>dac~</o> object is the Digital-To-Analog-Converter through which you will route all signals from MSP out to your computer speakers or audio hardware to be audible to the human ear. It also gives you access to the Audio Status window which controls your audio settings and hardware.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP I/O
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="signal">
			<digest>
				(signal) Audio Out Ch 1, start (1) and stop (0)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="signal">
			<digest>
				(signal) Audio Out Ch 2
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="outputs" optional="1" type="int/symbol">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				You can create a <o>dac~</o> object that uses one or more audio output channel numbers between 1 and 512. These numbers refer to logical channels and can be dynamically reassigned to physical device channels of a particular driver using either the Audio Status window, its I/O Mappings subwindow, or an <o>adstatus</o> object with an output keyword argument.Arguments, If the computer's built-in audio hardware is being used, there will be two input channels available. Other audio drivers and/or devices may have more than two channels. If no argument is typed in, <o>dac~</o> will have two inlets, for input channels 1 and 2.
				<br />
				<br />
				If a symbol is provided as the first argument to a <o>dac~</o> object, then it will get an independent control section in the Max <link module="core" name="mixer" type="vignette">mixer</link>. If two <o>dac~</o> instances in a patcher hierarchy have the same name they will be on the same &quot;bus&quot; and share controls.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="on/off-flag" optional="0" type="int" />
			</arglist>
			<digest>
				Enable/disable audio processing
			</digest>
			<description>
				A non-zero number turns on audio processing in all loaded patches. <m>0</m> turns off audio processing in all loaded patches.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="output-channel-designations" optional="0" type="list" />
			</arglist>
			<digest>
				Set the logical output channels for each signal inlet
			</digest>
			<description>
				<m>list</m> comprised of integers, sets the logical output channels for each signal inlet in order from left to right.
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Double-click to open the Audio Status window
			</digest>
			<description>
				Double-clicking on <o>dac~</o> opens the Audio Status window.
			</description>
		</method>
		<method name="open">
			<arglist />
			<digest>
				Open the Audio Status window
			</digest>
			<description>
				Opens the Audio Status window.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="output-channel-designation" optional="0" type="int" />
			</arglist>
			<digest>
				Set the output channel for signal inlet where the <m>set</m> message was received
			</digest>
			<description>
				In any inlet: The word <m>set</m>, followed by a number, sets the logical output channel for the signal inlet in which the <m>set</m> message was received. For instance, sending <m>set 3</m> to the left inlet of <o>dac~</o> makes the signal coming in the left inlet output to logical output channel 3.
				<br />
				<br />
				Note that if the audio is on and you use the <m>set</m> message to change a <o>dac~</o> to use logical channels that are not currently in use, no sound will be heard from these channels until the audio is turned off and on again. For example, if you have a <o>dac~</o> object with arguments 1 2 3 4 and signals are only connected to the two leftmost inlets (for channels 1 and 2), the message <m>set 1 3</m> will not immediately route the leftmost audio signal to logical channel 3, because it is not currently in use. A method to get around this is to connect a <o>sig~</o>  <m>0</m> to each channel of a <o>dac~</o> you plan on using for a <m>set</m> message. At this point, you might as well use a <o>matrix~</o> or <o>selector~</o> object to do something similar before the audio signal reaches the <o>dac~</o>.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Function depends on inlet
			</digest>
			<description>
				A signal coming into an inlet of <o>dac~</o> is sent to the audio output channel corresponding to the inlet. The signal must be between -1 and 1 to avoid clipping by the DAC.
			</description>
		</method>
		<method name="start">
			<arglist />
			<digest>
				Turn on audio processing in all loaded patches.
			</digest>
			<description>
				Turns on audio processing in all loaded patches.
			</description>
		</method>
		<method name="startwindow">
			<arglist />
			<digest>
				Enable audio processing in local patch and subpatches only
			</digest>
			<description>
				Turns on audio processing only in the patch in which this <o>dac~</o> is located, and in subpatches of that patch. Turns off audio processing in all other patches.
			</description>
		</method>
		<method name="stop">
			<arglist />
			<digest>
				Disable audio processing in all loaded patches
			</digest>
			<description>
				Turns off audio processing in all loaded patches.
			</description>
		</method>
		<method name="wclose">
			<arglist />
			<digest>
				Close the Audio Status window
			</digest>
			<description>
				Closes the Audio Status window if it is open.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="dac~.png" caption="Switch audio on and off, send signal to the audio outputs" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="adc~" />
		<seealso name="adstatus" />
		<seealso name="ezadc~" />
		<seealso name="ezdac~" />
		<seealso module="msp" name="04_mspaudioio" type="tutorial" />
		<seealso module="msp" name="05_mspbasicchapter01" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="Audio">
			<description>
				<o>dac~</o> produces no output internal to the application. The signal received in the inlet is sent to its assigned logical audio output channel, which is mapped to a physical device output channel in the Ausio Status window which is also made accessible via the <o>dac~</o>.
			</description>
		</entry>
	</misc>
</c74object>
