<?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="tri~" module="msp" category="MSP Synthesis">
	<digest>
		Antialiased triangular oscillator
	</digest>
	<description>
		<o>tri~</o> generates a triangle wave whose component frequencies are resistant to aliasing.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			oscillator
		</metadata>
		<metadata name="tag">
			MSP Synthesis
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="signal/float">
			<digest>
				(signal/float) frequency
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="signal/float">
			<digest>
				(signal/float) duty cycle
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="2" type="signal/float">
			<digest>
				(signal/float) sync input
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="signal">
			<digest>
				(signal) Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="initial-frequency" optional="1" units="hz" type="number">
			<digest>
				Initial oscillator frequency
			</digest>
			<description>
				The first argument sets the initial frequency of the oscillator. The default is 0.
			</description>
		</objarg>
		<objarg name="duty-cycle" optional="1" type="float">
			<digest>
				Duty Cycle
			</digest>
			<description>
				The second argument sets the duty cycle. The default is 0.5.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="frequency" optional="0" units="hz" type="int" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: Sets the frequency of the oscillator.
				<br />
				<br />
				In middle inlet: Sets the duty cycle of the oscillator. Signal is wrapped into the range 0-1. A value of 0.5 will produce a triangular wave that spends equal amounts of time sloping positively and negatively.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="frequency" optional="0" units="hz" type="float" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: Sets the frequency of the oscillator.
				<br />
				<br />
				In middle inlet: Sets the duty cycle of the oscillator. Signal is wrapped into the range 0-1. A value of 0.5 will produce a triangular wave that spends equal amounts of time sloping positively and negatively.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: Sets the frequency of the oscillator.
				<br />
				<br />
				In middle inlet: Sets the duty cycle of the oscillator. Signal is wrapped into the range 0-1. A value of 0.5 will produce a triangular wave that spends equal amounts of time sloping positively and negatively.
				<br />
				<br />
				In right inlet: (optional) A sync signal. When the control signal crosses from below 0.5 to above 0.5, the oscillator resets itself. A <o>phasor~</o> object works well for this purpose. The classic use is to &quot;sweep&quot; this control signal in a frequency range somewhere at least three or four octaves higher than the fundamental frequency.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="tri~.png" caption="Spectral comparison of tri~ and an ideal triangular wave" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="cycle~" />
		<seealso name="phasor~" />
		<seealso name="rect~" />
		<seealso name="saw~" />
		<seealso name="techno~" />
		<seealso name="triangle~" />
		<seealso name="05_mspbasicchapter03" module="msp" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="signal">
			<description>
				An antialiased triangular waveform. An ideal, straight-line triangular wave generated in a computer contains aliased frequencies that can sound irritating. <o>tri~</o> produces a nice, analog-esque output waveform.
			</description>
		</entry>
	</misc>
</c74object>
