<?xml version='1.0' encoding='utf-8' standalone='yes'?>

<c74object name='live.scope~' module="m4l" category='Live UI Objects'>

	<digest>Visualize an audio signal</digest>
	<description>Use <o>live.scope~</o> to visualize an audio signal. This object can be used as an alternative to <o>scope~</o>.</description>


	<!--METADATA-->

	<metadatalist>
		<metadata name='author'>Cycling '74 </metadata>
		<metadata name='tag'>Live</metadata>
	</metadatalist>


	<!--ARGUMENTS-->

	<objarglist>

	</objarglist>


	<!--MESSAGES-->

	<methodlist>

		<method name='bang'>
			<digest>
				Trigger a new waveform drawing
			</digest>
			<description>
				When sent to either inlet of <o>live.scope~</o>, a bang will trigger a new waveform drawing.
			</description>
		</method>

		<method name='signal'>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				Left inlet: signal to display in <o>live.scope~</o> <br/>
				Right inlet: trigger signal
			</description>
		</method>

	</methodlist>


	<!--ATTRIBUTES-->

	<attributelist>

		<attribute name='active' get='1' set='1' type='long' size='1' >
			<digest>
				Active mode enable
			</digest>
			<description>
				Toggles the object's active mode. When the <at>active</at> attribute is set to 0, waveform drawing stops.
				When the <at>active</at> attribute is set to 1, waveform drawing is enabled and the active colors are used.
			</description>
		</attribute>

		<attribute name='line_width' get='1' set='1' type='float64' size='1' >
			<digest>
				Waveform line width
			</digest>
			<description>
				The width of the waveform line. The defult value is 1.
			</description>
		</attribute>

		<attribute name='grid_line_width' get='1' set='1' type='float64' size='1' >
			<digest>
				Grid line width
			</digest>
			<description>
				The width of the grid lines. The defult value is 1.
			</description>
		</attribute>

		<attribute name='vertical_divisions' get='1' set='1' type='long' size='1' >
			<digest>
				Y-axis grid divisions
			</digest>
			<description>
				The amount of grid divisions on the y-axis. To view these divisions, the <at>grid</at> attribute must be set to
				either 'vertical' or 'horizontal and vertical'.
			</description>
		</attribute>

		<attribute name='grid' get='1' set='1' type='long' size='1' >
			<digest>
				Grid lines
			</digest>
			<description>
				Sets which grid lines to display. Possible values are: <br/>
				0: off <br/>
				1: horizontal <br/>
				2: vertical <br/>
				3: horizontal and vertical
				<br/>
				<br/>
				If 1 (horizontal) is selected, the x-axis is segmented, giving you horizontal divisions of the grid. If 2 (vertical)
				is selected, the y-axis is segmented, giving you vertical divisions of the grid.
			</description>
		</attribute>

		<attribute name='smooth' get='1' set='1' type='long' size='1' >
			<digest>
				Visually smooth the waveform line
			</digest>
			<description>
				The <at>smooth</at> attribute allows you to visually smooth a waveform's lines. There are three values for this attribute: off, type 1, and type 2. <br/>
				Off: No smoothing applied. Without smoothing, low frequency waveforms might look rough. However, for high and complex frequency waveforms, not
				using any smoothing will show the most accurate results. <br/>
				Type 1: Improves visual appearance while also retaining as much accuracy as possible. <br/>
				Type 2: The most visually pleasing at low frequencies, however, at higher frequencies, the accuracy decreases significantely.
			</description>
		</attribute>

		<attribute name='trigger_direction' get='1' set='1' type='long' size='1' >
			<digest>
				Trigger direction
			</digest>
			<description>
				The direction the trigger signal needs to be traveling, when passing the trigger threshold, in order to trigger a new waveform drawing.
				i.e. if the direction is set to 'up', and the treshold is set to '0', a new waveform will be drawn when the signal passes 0,
				while moving towards +1. This attribute works in conjunction with the <at>trigger_threshold</at> attribute. <at>mode</at> must be set
				to 'trigger' for either attribute to function.
			</description>
		</attribute>

		<attribute name='active' get='1' set='1' type='long' size='1' >
			<digest>The active state </digest>
			<description>The active state </description>
		</attribute>

		<attribute name='trigger_threshold' get='1' set='1' type='float64' size='1' >
			<digest>
				Trigger threshold
			</digest>
			<description>
				Sets the trigger threshold value. This is the value the trigger signal (connected to the second inlet of <o>live.scope~</o>) must pass
				in order to trigger a new waveform drawing. This attribute works in conjunction with the <at>trigger_direction</at> attribute. <at>mode</at>
				must be set to 'trigger' for either attribute to function.
			</description>
		</attribute>

		<attribute name='samples' get='1' set='1' type='float64' size='1' >
			<digest>
				Number of samples to capture
			</digest>
			<description>
				Sets the number of samples to capture.
			</description>
		</attribute>

		<attribute name='range' get='1' set='1' type='float64' size='1' >
			<digest>
				Minimum/maximum displayed amplitude
			</digest>
			<description>
				The minimum and maximum amplitude that is displayed in the <o>live.scope~</o> object. When the amplitude exceeds the specified range, the
				visual display is clipped.
			</description>
		</attribute>

		<attribute name='decay_time' get='1' set='1' type='float64' size='1' >
			<digest>
				Visual fade out
			</digest>
			<description>
				Sets the time in milliseconds that the waveform line takes to fade out.
			</description>
		</attribute>

		<attribute name='mode' get='1' set='1' type='long' size='1' >
			<digest>
				Drawing mode
			</digest>
			<description>
				Sets the drawing mode for <o>live.scope~</o>. There are two possible modes: history and trigger. History mode captures and displays the
				last N samples, whereas trigger mode captures and displays based on an external trigger signal that is sent to the second inlet.
				When in trigger mode, you can adjust the attributes <at>trigger_direction</at> and <at>trigger_threshold</at>. When the signal in the second
				inlet passes the <at>trigger_threshold</at> value, live.scope~ will start capturing the signal from the first inlet.
			</description>
		</attribute>

		<attribute name='interval' get='1' set='1' type='float64' size='1' >
			<digest>
				Update interval in milliseconds
			</digest>
			<description>
				Sets the time in milliseconds that the waveform drawing is updated.
			</description>
		</attribute>

		<attribute name='horizontal_divisions' get='1' set='1' type='long' size='1' >
			<digest>
				X-axis grid divisions
			</digest>
			<description>
				The amount of grid divisions on the x-axis. To view these divisions, the <at>grid</at> attribute must be set to
				either 'horizontal' or 'horizontal and vertical'.
			</description>
		</attribute>

		<attribute name='rounded' get='1' set='1' type='float64' size='1' >
			<digest>
				Roundness of box corners
			</digest>
			<description>
				The amount the corners of the <o>live.scope~</o> object are rounded. Possible values are 0-10.
			</description>
		</attribute>

		<attribute name="bgcolor" get="1" set="1" type="float" size="4">
			<digest>
				Background color
			</digest>
			<description>
				Sets the background color in RGBA format, when the <at>active</at> attribute is set to 0.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="defaultname" get="1" set="1" type="float" size="4" value="0.156862 0.156862 0.156862 1." />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Background Color (Inactive)" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
			</attributelist>
		</attribute>

		<attribute name="activebgcolor" get="1" set="1" type="float" size="4">
			<digest>
				Active background color
			</digest>
			<description>
				Sets the background color in RGBA format, when the <at>active</at> attribute is set to 1.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="defaultname" get="1" set="1" type="float" size="4" value="0.156862 0.156862 0.156862 1." />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Background Color (Active)" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
			</attributelist>
		</attribute>

		<attribute name="linecolor" get="1" set="1" type="float" size="4">
			<digest>
				Waveform color
			</digest>
			<description>
				Sets the color of the waveform line in RGBA format, when the <at>active</at> attribute is set to 0.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="defaultname" get="1" set="1" type="float" size="4" value="0.549019 0.549019 0.549019 1." />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Waveform Color (Inactive)" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
			</attributelist>
		</attribute>

		<attribute name="activelinecolor" get="1" set="1" type="float" size="4">
			<digest>
				Active waveform color
			</digest>
			<description>
				Sets the color of the waveform line in RGBA format, when the <at>active</at> attribute is set to 1.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="defaultname" get="1" set="1" type="float" size="4" value="1. 0.709803 0.196078 1." />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Waveform Color (Active)" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
			</attributelist>
		</attribute>

		<attribute name="gridcolor" get="1" set="1" type="float" size="4">
			<digest>
				Grid color
			</digest>
			<description>
				Sets the grid color in RGBA format, when the <at>active</at> attribute is set to 0.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="defaultname" get="1" set="1" type="float" size="4" value="0.313725 0.313725 0.313725 1." />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Grid Color (Inactive)" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
			</attributelist>
		</attribute>

		<attribute name="activegridcolor" get="1" set="1" type="float" size="4">
			<digest>
				Active grid color
			</digest>
			<description>
				Sets the grid color in RGBA format, when the <at>active</at> attribute is set to 1.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="defaultname" get="1" set="1" type="float" size="4" value="0.313725 0.313725 0.313725 1." />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Grid Color (Active)" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
			</attributelist>
		</attribute>

	</attributelist>


	<!--RELATED-->

	<seealsolist>
		<seealso name='scope~' />
		<seealso name='meter~' />
		<seealso name='live.meter~' />
	</seealsolist>


</c74object>
