<?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="el.granulesf~">
    
	<digest>
		A soundfile granulation tool.
	</digest>
	<description>
		<o>el.granulesf~</o> granulates a soundfile stored in a buffer.
    </description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Eric Lyon
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			LyonPotpourri
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="soundfile buffer" type="symbol" optional="0">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				The MSP buffer containing the soundfile to be granulated. This buffer may be mono or stereo.
			</description>
		</objarg>
		<objarg name="envelope buffer" type="symbol" optional="0">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				The MSP buffer containing the envelope to be applied to each grain. This buffer must be mono.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="constrain_scale">
			<arglist>
                <arg name="toggle" type="int" optional="0" id="1" />
                
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
				When set, forces scale to conform to specified minimum and maximum frequencies. See message "grist". This option is off by default.
            </description>
		</method>
        
		<method name="events">
			<arglist>
                <arg name="event counts" type="int" optional="0" id="1" />
                
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
				The number of events to generate on each call to "spray" or "pitchspray".
            </description>
		</method>
        
		<method name="grain">
			<arglist>
                <arg name="event specification" type="list" optional="0" id="1" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description> Generate a single grain according to specifications. This can be useful for creating your own granular synthesis algorithma using Max or JavaScript. Parameters are:<p/> <i>grain duration, increment, amplitude, pan (0-1), skip.</i>
                <p/>
                The increment may be negative or positive. The skip time should leave enough samples in the file for a complete grain at the given increment. For example, a 2000 ms long file, with an increment of -1, a grain duration of 1000 ms, and a skiptime of 500 ms will fail; The skip time should be at least 1000 ms to allow enough samples for the grain.<p/>
				Grain messages will only be received when the DACs are turned on. This is to avoid overflowing the internal queue.
            </description>
		</method>
        
		<method name="grist">
			<arglist>
                <arg name="internal algorithm parameters" type="list" optional="0" id="1" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description> Specifies global control parameters. The parameters are:<p/>
                <i>number of events per trigger, event horizon, minimum increment, maximum increment, left pan boundary, right pan boundary, minimum amplitude, maximum amplitude, minimum grain size, maximum grain size.</i>
                <p/>
                The event horizon is the time window following a trigger. To get continuous sound, a trigger should be sent regularly at the periodicity of the event horizon. In most cases, a trigger would be a metro, connected to a "spray" or "pitchspray" message. Pan boundaries are between 0 - 1. The frequency boundaries will be ignored if a custom scale is used with pitchspray, unless the constrain_scale toggle has been set to 1.
                <p/>
            </description>
		</method>
        
		<method name="highblock">
			<arglist>
                <arg name="maximum increment" type="float" optional="0" id="1" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description> Set cutoff for high increments, irrespective of global settings or pitch scale.
            </description>
		</method>
        
		<method name="info">
			<arglist>
                <!--arg name="maximum frequency" type="float" optional="0" id="1" /-->
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description> Print current state to Max window.
            </description>
		</method>
        
        
        
        
		<method name="interpolate">
			<arglist>
                <arg name="toggle" type="int" optional="0" id="1" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
                When turned on, the soundfile read is interpolated. This toggle is on by default.
            </description>
		</method>
        
		<method name="interpolate_envelope">
			<arglist>
                <arg name="toggle" type="int" optional="0" id="1" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
                When turned on, the envelope is interpolated. This toggle is off by default.
            </description>
		</method>
        
		<method name="lowblock">
			<arglist>
                <arg name="minimum increment" type="float" optional="0" id="1" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description> Set hard cutoff for low increments, irrespective of global settings or pitch scale.
            </description>
		</method>
        
		<method name="nopan">
			<arglist>
                <arg name="toggle" type="int" optional="0" id="1" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description> When toggle is set, random panning is turned off and all grains go to the center.
            </description>
		</method>
        
		<method name="pitchdev">
			<arglist>
                <arg name="deviation" type="float" optional="0" id="1" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description> Sets random deviation for scale members according to the formula
                <p/>
                <i>new_incr = incr * random(1.0/(1.0 + deviation), 1.0 + deviation)</i>
                <p/>
                Only positive values are accepted. In most cases the deviation should range between 0 - 1.
            </description>
		</method>
        
		<method name="pitchspray">
			<arglist>
                <!--arg name="deviation" type="float" optional="0" id="1" /-->
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
                Triggers a cloud of events according to global parameters, and quantized to the current pitch scale.
            </description>
		</method>
        
        
		<method name="retro_odds">
			<arglist>
                <!--arg name="deviation" type="float" optional="0" id="1" /-->
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
                The odds that a given grain will read backwards. Constrained between (0 - 1). By default, the odds are 0.5.
            </description>
		</method>
        
		<method name="seed">
			<arglist>
                <arg name="seed" type="int" optional="0" id="1" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
                Sets the random seed.
            </description>
		</method>
        
		<method name="setbuf">
			<arglist>
                <arg name="buffer names" type="list" optional="0" id="1" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
                Choose new buffers for the soundfile and envelope.
            </description>
		</method>
        
		<method name="setscale">
			<arglist>
                <arg name="frequencies" type="list" optional="0" id="1" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
                Defines the pitch scale as a series of ascending frequencies.
            </description>
		</method>
        
		<method name="spray">
			<arglist>
                <!--arg name="deviation" type="float" optional="0" id="1" /-->
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
                Triggers a cloud of events according to global parameters, with random frequencies.
            </description>
		</method>
        
		<method name="steady">
			<arglist>
                <arg name="toggle" type="int" optional="0" id="1" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
                When set, events occur at regular time intervals defined as
                <p/>
                <i> event_horizon / event_count</i>
                <p/>
                
                This option is off by default.
            </description>
		</method>
        
		<method name="transpose">
			<arglist>
                <arg name="factor" type="float" optional="0" id="1" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
                A global transposition factor applied to the grains, irrespective of state. By default the factor is 1.0
            </description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
	</attributelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="gizmo~"/>
        <seealso name="fftz.pvoc~"/>
	</seealsolist>
    
</c74object>
