<?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="grab" module="max" category="Control">
	<digest>
		Intercept the output of another object
	</digest>
	<description>
		<o>grab</o> can send a message and extract the result from the receiving object.
		<br />
		<b>Note:</b> The <o>grab</o> object cannot be used to communicate from a <o>send</o> to a <o>receive</o> between Max for Live devices.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Control
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Message to Send to Object
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Message to Send to Object
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Result of Remote Message
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Connect to Object That Will Receive Message
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="number-of-outlets" optional="1" type="int">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				The first argument sets the number of outlets, in addition to the right outlet. If there is no argument, <o>grab</o> has 1 additional outlet.
			</description>
		</objarg>
		<objarg name="receive-name" optional="1" type="symbol">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				If a symbol is present as a second argument, the message received in the inlet is sent to all <o>receive</o> objects named by the symbol, instead of being sent out the right outlet. In this case the rightmost outlet, which would normally send out the incoming message if no second argument were present, will not exist.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Performs the same function as <m>anything</m>.
			</digest>
			<description>
				Performs the same function as <m>anything</m>.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Performs the same function as <m>anything</m>.
			</digest>
			<description>
				Performs the same function as <m>anything</m>.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Performs the same function as <m>anything</m>.
			</digest>
			<description>
				Performs the same function as <m>anything</m>.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Performs the same function as <m>anything</m>.
			</digest>
			<description>
				Performs the same function as <m>anything</m>.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				The message is sent out the right outlet, or if a second argument is present the message is sent to <o>receive</o> objects named by the second argument.
			</digest>
			<description>
				The message is sent out the right outlet, or if a second argument is present the message is sent to <o>receive</o> objects named by the second argument.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="input" optional="0" type="symbol" />
			</arglist>
			<digest>
				If a second argument has been typed into <o>grab</o> specifying the name of a <o>receive</o> object, then the word <m>set</m>, followed by a symbol, specifies the name of a (different)
			</digest>
			<description>
				If a second argument has been typed into <o>grab</o> specifying the name of a <o>receive</o> object, then the word <m>set</m>, followed by a symbol, specifies the name of a (different) <o>receive</o> object via which <o>grab</o> can grab messages from remote objects.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="grab.png" caption="Get an object's output by 'grabbing' it before it comes out the outlet... grab can communicate with any receive object specified by a set message" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="preset" />
		<seealso name="table" />
	</seealsolist>
	<misc name="Output">
		<entry name="anything">
			<description>
				Out right outlet: The right outlet should be connected only to the leftmost inlet of other objects. The message received in the inlet is sent out to the left inlet of all objects connected to the right outlet. Whatever goes out their outlets, however, is then intercepted by <o>grab</o>.				<br />
				<br />
				Out other outlets: Whatever would normally be sent out the outlets of the objects connected to the right outlet, is sent out the <o>grab</o> object's outlets instead, in response to a message from <o>grab</o>. Whatever would be sent out the leftmost outlet of the other objects is sent out the leftmost outlet of <o>grab</o>, and so on. Note: Only the output that is sent out the outlets of other objects can be intercepted by <o>grab</o>. Other types of output, such as transmission of MIDI messages or printing in the Max Console, cannot be intercepted by <o>grab</o>. Also, <o>grab</o> does not intercept the output of timing objects such as <o>seq</o>, <o>metro</o>, and <o>clocker</o>.				<br />
				<br />
				Connecting the right outlet of <o>grab</o> to the inlet of a patcher object, however, will not grab the output of the subpatch. It will simply grab the output of the <o>inlet</o> object inside the subpatch, which is exactly the same as its input. However, <o>grab</o> can communicate with remote objects via a <o>receive</o> object named as the second argument to <o>grab</o>.				<br />
				<br />
				If a second argument is present, the message received in the inlet is sent directly to <o>receive</o> objects named by the argument instead of being sent out the right outlet. Any such <o>receive</o> objects should be connected only to the leftmost inlet of other objects. The rightmost outlet, which would otherwise be used to grab the output of other objects, does not appear if the second argument is used.
				<br />
				<br />
				Note that if <o>grab</o> is connected to other objects remotely via numerous <o>receive</o> objects of the same name, the order in which <o>grab</o> communicates with those other objects is undefined, so the order in which their output will be sent out of the <o>grab</o> object's other outlets is unpredictable.
			</description>
		</entry>
	</misc>
</c74object>
