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

<c74object name="sdt.motor~">

	<digest>
		[machines] Combustion engine sound.
	</digest>

	<description>
		<o>sdt.motor~</o>: Simulates a 2 or 4-stroke engine by means of two or four periodic waveforms.
		For a 4-stroke engine, these represent the moving parts of each combustion chamber (intake and
		outtake valves, piston, fuel ignition).
		These waveforms are then used as input signals or feedback gain modifiers for a set of
		interconnected digital waveguides which model the pipes composing the exhaust system.
	</description>

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

	<!--INLETS
	<inletlist>
		<inlet id="0" type="signal">
			<digest>Revolutions Per Minute (RPM)</digest>
			<description></description>
		</inlet>

		<inlet id="1" type="signal">
			<digest>Throttle load [0., 1.]</digest>
			<description></description>
		</inlet>
	</inletlist>
	-->

	<!--OUTLETS
	<outletlist>
		<outlet id="0" type="signal">
			<digest>Intake noise, from the front of the vehicle.</digest>
		</outlet>

		<outlet id="1" type="signal">
			<digest>Engine vibrations, from the inside of the vehicle.</digest>
		</outlet>

		<outlet id="2" type="signal">
			<digest>Exhaust noise, from the back of the vehicle.</digest>
		</outlet>
	</outletlist>
	-->

	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="Buffer-size" optional="1" type="int">
			<digest>Buffer size of the internal digital waveguides, in samples.</digest>
			<description>Buffer size of the internal digital waveguides, in samples. Default to 44100,
				which allows for a maximum length of ca. 343 m for each tube section at 44.1 kHz sampling rate.</description>
		</objarg>
	</objarglist>

	<!--MESSAGES-->
	<methodlist>
		<method name="signal">
			<digest>
				Inlet 0: Revolutions Per Minute (RPM). <br/>
				Inlet 1: Throttle load [0., 1.].
			</digest>
			<description></description>
		</method>
	</methodlist>

	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="nCylinders" get="1" set="1" type="int" size="1" >
		    <digest>Number of cylinders in the engine block [1, 12].</digest>
		    <description></description>
	  </attribute>

		<attribute name="cycle" get="1" set="1" type="int" size="1">
		    <digest>0 to select four-stroke, 1 to select two-stroke.</digest>
		    <description></description>
	  </attribute>

		<attribute name="sparkTime" get="1" set="1" type="float" size="1" >
				<digest>Fuel ignition time, compared to a full cycle [0.000001, 1.].</digest>
				<description></description>
		</attribute>

		<attribute name="compressionRatio" get="1" set="1" type="float" size="1" >
				<digest>Engine compression ratio [5., 20.].</digest>
				<description></description>
		</attribute>

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

		<attribute name="cylinderSize" get="1" set="1" type="float" size="1" >
				<digest>Volume of each cylinder (cc).</digest>
				<description></description>
		</attribute>

		<attribute name="intakeSize" get="1" set="1" type="float" size="1" >
				<digest>Average length of the intake collectors (m).</digest>
				<description></description>
		</attribute>

		<attribute name="extractorSize" get="1" set="1" type="float" size="1" >
				<digest>Average length of the exhaust collectors (m).</digest>
				<description></description>
		</attribute>

		<attribute name="exhaustSize" get="1" set="1" type="float" size="1" >
				<digest>Length of the main exhaust pipe (m).</digest>
				<description></description>
		</attribute>

		<attribute name="expansion" get="1" set="1" type="float" size="1" >
				<digest>Impedance mismatch between extractors and exhaust pipe,
					present in two-stroke engines to limit the expulsion of unburnt fuel [0., 1.].</digest>
				<description></description>
		</attribute>

		<attribute name="mufflerSize" get="1" set="1" type="float" size="1" >
				<digest>Average size of the muffler resonators (m).</digest>
				<description></description>
		</attribute>

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

		<attribute name="outletSize" get="1" set="1" type="float" size="1" >
				<digest>Length of the exhaust outlet (m).</digest>
				<description></description>
		</attribute>

		<attribute name="backfire" get="1" set="1" type="float" size="1" >
				<digest>Amount of backfiring when the engine revs down [0., 1.].</digest>
				<description></description>
		</attribute>
	</attributelist>

	<!--SEEALSO-->
	<seealsolist>
		<seealso name="sdt.dcmotor~"/>
	</seealsolist>

	<!--MISC
	<misc name="Output">
		<entry name="signal">
			<description>
				Outlet 0: Intake noise
				<br />
				<br />
				Outlet 1: Engine vibrations
				<br />
				<br />
				Outlet 2: Exhaust noise
			</description>
		</entry>
	</misc>
	-->

</c74object>
