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

<c74object name="icst.random" module="ICST Ambisonics">

	<digest>
		Random values from distribution curves.
	</digest>

	<description>
		Random values from distribution curves. Using a table-based input system, the process produces weighted random values controled by a variety of distribution curve inputs.<br/>
	</description>

    <!--METADATA-->
    <metadatalist>
	<metadata name="author">ICST | Zurich University of the Arts</metadata>
	<metadata name="tag">ICST Ambisonics</metadata>
	<metadata name="copyright">
	 © 2009 - 2021 ICST | Zurich University of the Arts
	</metadata>
	<metadata name="version">
	1.2 (Build 02/2021)
	</metadata>
    </metadatalist>

    <!--DISCUSSION-->
    <discussion>

    </discussion>

    <!--INLETS-->
    <!--do not use-->
    <inletlist>
    </inletlist>

    <!--OUTLETS-->
    <!--do not use-->
    <outletlist>
    </outletlist>

    <!--ARGUMENTS-->
    <!-- <objarglist>
    </objarglist> -->

    <!--MESSAGES-->
    <methodlist>
	<method name="bang">
	    <description>
			Outputs last value value.
	    </description>
	</method>
	
	<method name="int">
	    <description>
			<p>Set value into table with incrementing counter index. Used for <m>table</m> input.</p>
	    </description>
	</method>	

	<method name="float">
	    <description>
			<p>Use float to query distribution table at fractional index.</p>
	    </description>
	</method>		

	<method name="list">
	    <description>
			<p>Fill input table with points.</p>
			<ul>
				<li>input mode 0: individual points x, y, (z)</li>
				<li>input mode 1: list of points x , y pairs &#8212; fill with more than 3 elements</li>
				<li>input mode 2: list of points in line format: y , delta x; </li>
				<li>input mode 3: list of points in multislider format: y , no x; </li>
			</ul>
	    </description>
	</method>
	
	<method name="anything">
	    <description>
			<p>Export internal tables to named reference dictionary:</p>
			<ul>	
				<li>export_to_dict_in &#8212; export input table</li>
				<li>export_to_dict_integr &#8212; export intergration table </li>
				<li>export_to_dict_invintegr &#8212; export inverse integration table</li>
				<li>export_to_dict_rand &#8212; export random table</li>
			</ul>
			<p>Dump messages are obsolete (deactivated), use referenced dictionary export instead:</p>
			<ul>
				<li>intable_dump &#8212; dumps input table to 2nd outlet.</li>
				<li>integr_dump &#8212; dumps integration table to 2nd outlet.</li>
				<li>invIntegr_dump &#8212; dumps inverted integration table to 2nd outlet.</li>
				<li>randtable_dump &#8212; dumps final random table to 2nd outlet.</li>
			</ul>
	    </description>
	</method>

	<method name="calc">
	    <description>
			<p>Calculate the internal value tables..</p>
	    </description>
	</method>
	
	<method name="clear">
	    <description>
			<p>Clear input table.</p>
	    </description>
	</method>
	
	<method name="reset">
	    <description>
			<p>Reset input points to two defaults: 0.0 0.0 and 1.0 1.0 respectively, recalculate internal value table.</p>
	    </description>
	</method>
	
	<method name="version">
	    <description>
			Print version information to Max' console window.
	    </description>
	</method>
	
	<method name="report">
	    <description>
			Print version information to Max' console window.
	    </description>
	</method>
    </methodlist>

    <!--ATTRIBUTES-->
    <attributelist>
	
	
		<attribute name="min" get="0" set="0" type="float" size="1" value="Minimum">
		    <description>
				<p>Lower bounds of output range (default: 0.0).</p>
		    </description>
		</attribute>
		

		<attribute name="max" get="0" set="0" type="float" size="1" value="Maximum">
		    <description>
				<p>Upper bounds of output range (default: 1.0).</p>
		    </description>
		</attribute>		
		
		
	<attribute name="mode" get="0" set="0" type="int" size="1" value="Mode">
	    <description>
			<p>The method for breakpoint input.</p>
			<p>Options are:</p>
			<ul>
				<li>0: single xy(z) points &#8212; individual points x , y, z pairs;</li>
				<li>1: list of xy pairs &#8212; fill with more than 3 elements</li>
				<li>2: <m>line</m> format: y , delta x &#8212;  </li>
				<li>3: <m>multislider format</m>: y , no x &#8212;  </li>
			</ul>
	    </description>
	</attribute>
	
	<attribute name="size" get="0" set="0" type="int" size="1" value="Table length">
	    <description>
			<p>The internal distribution-table's size (minimum: 1, default: 10000).</p>
	    </description>
	</attribute>
	
	<attribute name="seed" get="0" set="0" type="unsigned int" size="1" value="Randome Seed">
	    <description>
			<p>The random generator's seed value.</p>
	    </description>
	</attribute>

    </attributelist>
	
	
    <misc name = "Input">
	<entry name ="Inlet 1 [bang, int, float, list, anything]">
	    <description>
			<p>Values for setting internal state and bang for output; other messages.</p>
	    </description>
	</entry>
    </misc>

    <misc name = "Output">
	<entry name ="Outlet 1 [int]">
	    <description>
			<p>Output of random distribution query (float).</p>
	    </description>
	</entry>
	<entry name ="Outlet 2 [symbol]">
	    <description>
			<p>Output table values from dump methods.</p>
	    </description>
	</entry>
    </misc>
	
    <misc name = "Keywords">
	<entry name ="">
	    <description>
		icst.random, weighted random distributions, tables, curves, breakpoint functions
	    </description>
	</entry>
    </misc>
	
    <!--SEEALSO-->
	<seealsolist>

		<seealso name="icst.map"/>
		<!-- <seealso name="icst.random"/> -->
		<seealso name="icst.spline"/>
		<!-- <seealso name="splines"/> -->
		
		<seealso name="icst.button"/>
		<seealso name="icst.intui"/>
		<seealso name="icst.floatui"/>
		<seealso name="icst.listui"/>
		
		<seealso name="ambimonitor"/>
		<seealso name="ambicontrol"/>
		<seealso name="ambipoint"/>

		<seealso name="ambiencode~"/>
		<seealso name="ambidecode~"/>
		<seealso name="ambipanning~"/>
				
		<seealso name="mc.ambiencode~"/>
		<seealso name="mc.ambidecode~"/>
		<seealso name="mc.ambipanning~"/>
		
	</seealsolist>

</c74object>
