<?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="bucket" module="max" category="Data">
	<digest>
		Pass numbers from outlet to outlet
	</digest>
	<description>
		Outputs incoming values to outlets in bucket-brigade fashion. <o>bucket</o> acts as an n-stage shift register which can shift its contents from outlet to outlet in either direction.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Data
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Number to Bucket-brigade
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Number to Bucket-brigade
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Delay Stage 1
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="outlets" optional="1" type="int">
			<digest>
				The number of outlets
			</digest>
			<description>
				Sets the number of outlets. If there is no argument, there will be one outlet.
			</description>
		</objarg>
		<objarg name="output-flag" optional="1" type="int">
			<digest>
				Echo to output mode flag
			</digest>
			<description>
				A second non-zero argument sets the <o>bucket</o> object to &quot;echo to output&quot; mode, whereby the number received in the inlet is stored and sent out the left outlet when it is received. This makes it somewhat easier to visualize the data coming from the outlets.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output current values
			</digest>
			<description>
				All stored values are sent out, but their position is not shifted.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Store and shift data
			</digest>
			<description>
				The numbers currently stored in <o>bucket</o> are sent out, then each number is moved one outlet to the right and the new number is stored to be sent out the left outlet the next time a number is received.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Store and shift data
			</digest>
			<description>
				The numbers currently stored in <o>bucket</o> are sent out, then each number is moved one outlet to the right and the new number is stored to be sent out the left outlet the next time a number is received.
			</description>
		</method>
		<method name="L2R">
			<arglist />
			<digest>
				Set shift function left-to-right
			</digest>
			<description>
				Sets <o>bucket</o> to shift its stored values from left to right (the default) whenever it receives a number in its inlet.
			</description>
		</method>
		<method name="R2L">
			<arglist />
			<digest>
				Set shift function right-to-left
			</digest>
			<description>
				Sets <o>bucket</o> to shift its stored values from right to left whenever it receives a number in its inlet, placing the incoming number in the rightmost outlet.
			</description>
		</method>
		<method name="freeze">
			<arglist />
			<digest>
				Suspend output
			</digest>
			<description>
				Suspends the <o>bucket</o> output, but new incoming numbers continue to shift the stored values internally.
			</description>
		</method>
		<method name="l2r">
			<arglist />
			<digest>
				Set shift function left-to-right
			</digest>
			<description>
				Sets <o>bucket</o> to shift its stored values from left to right (the default) whenever it receives a number in its inlet.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="input" optional="0" type="number" />
			</arglist>
			<digest>
				Store and output one value in all locations
			</digest>
			<description>
				The word <m>set</m>, followed by a number, sends that number out each outlet, and stores the number as the next value to be sent out each of its outlets.
			</description>
		</method>
		<method name="r2l">
			<arglist />
			<digest>
				Set shift function right-to-left
			</digest>
			<description>
				Sets <o>bucket</o> to shift its stored values from right to left whenever it receives a number in its inlet, placing the incoming number in the rightmost outlet.
			</description>
		</method>
		<method name="roll">
			<arglist />
			<digest>
				Use the end value as input
			</digest>
			<description>
				The word <m>roll</m>, followed by any number, causes <o>bucket</o> to use the value stored in its rightmost outlet as input; thus, it sends its output, shifts all stored values to the right, then stores the value which had been in the rightmost outlet in the leftmost outlet (as if it had been received in the inlet).
			</description>
		</method>
		<method name="thaw">
			<arglist />
			<digest>
				Release a previous freeze action
			</digest>
			<description>
				Resumes <o>bucket</o> output.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="bucket.png" caption="Numbers are passed from one outlet to another" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="cycle" />
		<seealso name="decode" />
		<seealso name="gate" />
		<seealso name="spray" />
		<seealso name="basicchapter15" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="int or float">
			<description>
				When a number is received, it is not sent out immediately, but the numbers stored in <o>bucket</o> are sent out. The numbers are all moved one outlet to the right, and the newly received number is stored in the left position. When using the &quot;echo to output&quot; mode (set with a non-zero second argument to the object) the number received is sent out immediately, instead of the previous input value.
			</description>
		</entry>
	</misc>
</c74object>
