<?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="kink~" module="msp" category="MSP Synthesis">
	<digest>
		Distort a sawtooth waveform
	</digest>
	<description>
		<o>kink~</o> takes <o>phasor~</o> values and distorts them according to a slope factor. If the input times the slope is less than 0.5, that value is output. Otherwise, a complentary slope is used, equal to 0.5 at the same input value but equal to 1 when the input is 1. This creates a bend or &quot;kink&quot; in the phase waveform when the slope is not equal to 1.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP Synthesis
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="signal">
			<digest>
				(signal) Phase Input from 0-1
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="signal/float">
			<digest>
				(signal/float) Slope (Kinkiness)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="signal">
			<digest>
				(signal) Disorted Phase Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="slope-multiplier" optional="1" type="float">
			<digest>
				Slope multiplier
			</digest>
			<description>
				Sets the default slope multiplier. If a signal is attached to the right inlet, this argument is ignored.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="float">
			<arglist>
				<arg name="slope-multiplier" optional="0" type="float" />
			</arglist>
			<digest>
				Set the slope multiplier
			</digest>
			<description>
				In right inlet: The multiplier that affects the slope of the output between an output (Y) value of 0 and 0.5. After the output reaches 0.5, the waveform will increase to 1 so that the entire output moves from 0 to 1 in the same period of time as the input. A slope multiplier of 1(the default) produces no distortion Slope multipliers below 1 have a slower rise to 0.5 than the input, and slope multipliers above 1 have a faster rise to 0.5 than the input. If a signal is attached to the right inlet, <m>float</m> input is ignored.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: The input to <o>kink~</o> should be a sawtooth waveform output from a <o>phasor~</o> object that repeatedly goes from 0 to 1.
				<br />
				<br />
				In right inlet: The multiplier that affects the slope of the output between an output (Y) value of 0 and 0.5. After the output reaches 0.5, the waveform will increase to 1 so that the entire output moves from 0 to 1 in the same period of time as the input. A slope multiplier of 1(the default) produces no distortion Slope multipliers below 1 have a slower rise to 0.5 than the input, and slope multipliers above 1 have a faster rise to 0.5 than the input.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="kink~.png" caption="Typical use of kink~ between phasor~ and cycle~" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="phasor~" />
		<seealso name="triangle~" />
	</seealsolist>
	<discussion>
		If you feed the output of <o>kink~</o> into a <o>cycle~</o>, the result is that the first part (before the kink) of the wavetable is scanned much more quickly than the second part (after the kink).
	</discussion>
	<misc name="Output">
		<entry name="signal">
			<description>
				The output of <o>kink~</o> should be fed to the right inlet of <o>cycle~</o> (at zero frequency) to produce a distorted sine wave (a technique known as phase distortion synthesis). As the slope multiplier in the right inlet of <o>kink~</o> deviates from 1, additional harmonics are introduced into the waveform output of <o>cycle~</o>. If the slope multiplier is rapidly increased and then decreased using a <o>line~</o>, the output of <o>cycle~</o> may resemble an attack portion of an instrumental sound.
			</description>
		</entry>
	</misc>
</c74object>
