<?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="gizmo~" module="msp" category="MSP FFT">
	<digest>
		Frequency-domain pitch shifter for pfft~
	</digest>
	<description>
		The <o>gizmo~</o> object implements a frequency-domain pitch shifter. It works by analyzing the frequency bins of an FFT'd signal, finding the peaks in the spectrum, and shifting them along the frequency axis to transpose the sound.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP FFT
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="signal">
			<digest>
				(signal) Real Signal from fftin~
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="signal">
			<digest>
				(signal) Imaginary Signal from fftin~
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="2" type="float">
			<digest>
				(float) Scalar to Shift Pitch (1.0 = No Transposition)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="signal">
			<digest>
				(signal) Pitch-shifted Real Signal
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="signal">
			<digest>
				(signal) Pitch-shifted Imaginary Signal
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="default-pitch-scalar" optional="1" type="float or int">
			<digest>
				Pitch shift scalar
			</digest>
			<description>
				A numerical argument will be used as the default pitch shift scalar. The default is 1.0 (no pitch scaling).
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="clip">
			<arglist>
				<arg name="frequency-clipping-flag (0 or nonzero)" optional="0" type="int" />
			</arglist>
			<digest>
				Disable/enable frequency clipping
			</digest>
			<description>
				In left inlet: The word <m>clip</m>, followed by a zero or one, disables or enables the clipping of clips any out-of-range peaks caused by transposition rather than of folding them over. The default is off (equivalent to the message <m>clip 0</m>, so the <o>gizmo~</o> object behaves like a time-domain transposer. Clipping may be turned off to avoid unwanted aliasing, and its use will probably depend on the sound being transposed and the range of transposition.
			</description>
		</method>
		<method name="freqshift">
			<arglist>
				<arg name="frequency-shift" optional="0" units="hz" type="float" />
			</arglist>
			<digest>
				Set a frequency offset
			</digest>
			<description>
				In left inlet: The word <m>freqshift</m> followed by a numerical value representing a positive or negative frequency in Hertz will be used as a frequency offet for the scaled amplitude peaks in the frequency spectrum. This corresponds to a frequency-shift of the transposed signal (see the <o>freqshift~</o> or <o>fbinshift~</o> objects for additional information).
			</description>
		</method>
		<method name="ft2">
			<arglist>
				<arg name="pitch-scalar" optional="0" type="float" />
			</arglist>
			<digest>
				Set the frequency scalar
			</digest>
			<description>
				In rightmost inlet: a float in the right inlet will be used as a frequency scalar for pitch-shifting. Scaling the pitch by 2 will raise it one octave, sclaing the pitch by 0.5 will lower it one octave.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: The signal present at the left inlet is the real part of a frequencydomain signal coming from a <o>fftin~</o> object inside a <o>pfft~</o>.				<br />
				<br />
				In middle inlet: The signal input to the middle inlet is the imaginary part of a frequency-domain signal coming from a <o>fftin~</o> object inside a <o>pfft~</o>. Both real and imaginary inputs must be connected for <o>gizmo~</o> to work.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="gizmo~.png" caption="gizmo~ shifts the pitch of an incoming sound so you can use it for harmonization effects" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="fbinshift~" />
		<seealso name="freqshift~" />
		<seealso name="hilbert~" />
		<seealso name="pitchshift~" />
		<seealso name="retune~" />
	</seealsolist>
	<discussion>
		The <o>gizmo~</o> object must be used inside a <o>pfft~</o> with an overlap of 4 or more -- using an overlap of 2 will produce quite audible amplitude modulation. When used outside a <o>pfft~</o> it does nothing.
	</discussion>
	<misc name="Output">
		<entry name="signal">
			<description>
				The output is the pitch-shifted complex signal. The left outlet is the real component, and the right outlet is the imaginary component. These may be connected to the real and imaginary inputs of a <o>fftout~</o> object inside a <o>pfft~</o>.
			</description>
		</entry>
	</misc>
</c74object>
