<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<c74object name="sdt.scraping~">

	<digest>
			[solids, control] Control algorithm to render scraping/sliding/rubbing sound textures.
	</digest>

	<description>
		<o>sdt.scraping~</o> simulates a probe sliding over a surface.
		The resulting interaction force is applied to a resonator object.
		<br />
		N.B. It must be used as a control layer for either <o>sdt.impact~</o> or <o>sdt.friction~</o>
		in conjuction with at least one <o>sdt.modal</o> object.
		<br />
		<br />
		It is fed by a signal representing the surface profile, and it takes three control
		parameters: the <i> granularity</i> of the surface (or equivalently, the probe width),
		the <i>velocity</i> and the external <i>force</i> applied to the probe.
		<br />
		It outputs a signal representing a normal force (N) to be applied to <o>sdt.modal</o>
		(through <o>sdt.impact~</o> or <o>sdt.friction~</o>).
	</description>

	<!--METADATA-->
	<metadatalist>
		<metadata name="tag">Sound Design Toolkit</metadata>
	</metadatalist>

	<!--INLETS
	<inletlist>
		<inlet id="0" type="messages to the scraping object">
			<digest>Messages to the bouncing object.</digest>
			<description>messages to the bouncing object, bang starts the process.</description>
		</inlet>

		<inlet id="0" type="signal">
			<digest>Input representing the surface profile.</digest>
			<description></description>
		</inlet>
	</inletlist>
	-->

	<!--OUTLETS
	<outletlist>
		<outlet id="0" type="signal">
			<digest>Audio signal: Normal force in N.</digest>
		</outlet>
	</outletlist>
	-->

	<!--ARGUMENTS
	<objarglist>
		<objarg name="" optional="" type="">
			<digest></digest>
		</objarg>
	</objarglist>-->

	<!--MESSAGES-->
	<methodlist>
		<method name="signal">
			<digest>
				Input representing the morphology of the surface.
			</digest>
			<description>
			</description>
		</method>
	</methodlist>

	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="grain" get="1" set="1" type="float" size="1" >
		    <digest>Granularity of micro-impacts [0., 1.]. Can bee also iterpreted as the probe width.</digest>
		    <description></description>
	  </attribute>

		<attribute name="velocity" get="1" set="1" type="float" size="1">
		    <digest>Velocity of the probe (m/s).</digest>
		    <description></description>
	  </attribute>

		<attribute name="force" get="1" set="1" type="float" size="1" >
				<digest>Normal force applied to the probe (N).</digest>
				<description></description>
		</attribute>
	</attributelist>

	<!--SEEALSO-->
	<seealsolist>
		<seealso name="sdt.inertial"/>
		<seealso name="sdt.modal"/>
		<seealso name="sdt.impact~"/>
		<seealso name="sdt.friction~"/>
		<seealso name="sdt.bouncing~"/>
		<seealso name="sdt.breaking~"/>
		<seealso name="sdt.crumpling~"/>
		<seealso name="sdt.rolling~"/>
	</seealsolist>

	<!--MISC
	<misc name="Input">
		<entry name="signal">
			<description>
				Inlet 0: Surface profile. The profile of the surface is obtained as a signal input,
				and it can be either recorded as an audio file or generated in real time.
				Usually, bandpass filtered noise or fractal noise are two good surface profile generators.
			</description>
		</entry>
	</misc>

	<misc name="Output">
		<entry name="signal">
			<description>
				Outlet 0: Normal force acting on the surface, meant to be directly applied to a resonator.
				Friction with another object can also simulate rubbing phenomena.
			</description>
		</entry>
	</misc>
	-->

</c74object>
