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

<c74object name="sdt.breaking~">

	<digest>
		[solids, control] Control algorithm to render breaking sounds.
	</digest>

	<description>
		<o>sdt.breaking~</o> generates a sequence of velocity and fragmentation events
		meant to drive a point-mass hitting a resonator.
		<br />
		N.B. It must be used as a control layer for the structure formed by
		<o>sdt.inertial</o> &#8596; <o>sdt.impact~</o> &#8596; <o>sdt.modal</o>.
		<br />
		<br />
		It takes four control parameters:
		<i>stored energy</i> of the process, <i>crushing energy</i> spent by each micro-impact,
		<i>granularity</i> and <i>fragmentation</i>.
		<br />
		It outputs two signals:
		Outlet 0: impact velocity (m/s) [0., 1.];
		Outlet 1: fragment size, as fraction of the whole object [0., 1.].</description>

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

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

	<!--OUTLETS
	<outletlist>
		<outlet id="0" type="signal">
			<digest>Impact velocity (m/s).</digest>
		</outlet>
		<outlet id="1" type="signal">
			<digest>Fragment size [0., 1.].</digest>
		</outlet>
	</outletlist>
	-->

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

	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<digest>
				Inlet 0: Bang triggers a breaking event.
			</digest>
			<description></description>
		</method>
	</methodlist>

	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="storedEnergy" get="1" set="1" type="float" size="1" >
		    <digest>Stored energy.</digest>
		    <description>Global energy of the process. Typical interval [0.0001, 1000.].</description>
	  </attribute>

		<attribute name="crushingEnergy" get="1" set="1" type="float" size="1" >
		    <digest>Energy of micro-impacts [0., 1.].</digest>
		    <description></description>
	  </attribute>

		<attribute name="granularity" get="1" set="1" type="float" size="1">
		    <digest>Granularity [0., 1.].</digest>
		    <description></description>
	  </attribute>

		<attribute name="fragmentation" get="1" set="1" type="float" size="1" >
				<digest>Fragmentation: tendency to break into smaller pieces [0., 1.].</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.crumpling~"/>
		<seealso name="sdt.rolling~"/>
		<seealso name="sdt.scraping~"/>
	</seealsolist>

</c74object>
