<?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.-->
<c74object module="rnbo" kind="rnboobject" name="subdiv~" category="">
<!--METADATA-->
<metadatalist>
<metadata name="author">Cycling '74</metadata>
<metadata name="tag">RNBO</metadata>
</metadatalist>
<digest>Predictive subdivision of an input phasor</digest>
<description><p>
The 
<o objname="rnbo_subdiv~">subdiv~</o>
 object evenly subdivides an input phasor signal into any integer number of output phasor signals.
</p></description>
<!--ARGUMENTS-->
<objarglist>
<objarg name="div" optional="1" type="number">
<digest>Sets the number of subdivisions (from 1 to 16384)</digest>

</objarg>
<objarg name="syncupdate" optional="1" type="enum">
<digest>Synchronise detection value changes</digest>
<description><p>
When syncupdate is enabled, messages to change the values to detect do not take effect until the input phasor resets.
A reset is defined as a direction reversal in the signal.
</p></description>
</objarg>
</objarglist>
<!--OPTIONS-->
<!--NONE-->
<!--ATTRIBUTES-->
<rnboattributelist>
<attribute name="div" size="1" type="number">
<digest>Sets the number of subdivisions (from 1 to 16384)</digest>
<attributelist>
<attribute name="default" type="number" value="1"></attribute>
</attributelist>

</attribute>
<attribute name="input" size="1" type="signal, number">
<digest>Input</digest>
<description><p>
The signal input to be subdivided
</p></description>
</attribute>
<attribute name="lockprob" size="1" type="bool">
<digest>Lock probabilty cycles to pattern cycles</digest>
<attributelist>
<attribute name="default" type="bool" value="true"></attribute>
</attributelist>
<description><p>
When lockprob is enabled, the cyclic probability pattern is locked to the cyclic duration pattern, so a probability
decision is made per duration event. When lockprob is disabled, the probabilities follow the subdivided phasor output.
Stated another way, when lockprob is disabled, the probabilities maintain their position within a cyclic duration pattern.
</p></description>
</attribute>
<attribute name="pattern" size="1" type="list">
<digest>Set cyclic patterns for the duration of subdivisions</digest>
<description><p>
Establishes a cyclic duration pattern that can modify the duration the phasor output of each step.
</p>
<p>
Patterns consist of integers 1 and above, permitting you to break up the input into unequal durations. For example, if you are
subdividing the input by 3, setting the pattern to 1 2, which will output a phasor that takes 1/3 of the input time followed by a
second phasor of 2/3 of the input time.
</p>
<p>
Note that subdiv~ does not support duration patterns that do not line up with the current input subdivision. As an example, a pattern of 2 2 2
will not produce expected results because the middle element crosses the point where the input resets. You can often avoid this limitation
by increasing the subdvision and reducing the rate of the input phasor.
</p>
<p>
In general, patterns can span multiples of the current subdivision and will work properly as long as they always reset when the input resets. For example, with a subdivision of 3, you will see expected results
with a pattern of 2 1 1 2 1 1 1 because the output ramps will always reset when the input resets. If the pattern does not end at input reset boundary, it is padded with a last element.
For example, if the subdivision is 5, setting the pattern to 1 2 will result in a third step of 2 before the pattern resets.
</p></description>
</attribute>
<attribute name="prob" size="1" type="list">
<digest>Set probabilities for phasor ramps to occur</digest>
<description><p>
With the prob you can set a pattern of probabilities for each output ramp. Patterns consists of 0, 1, or a float between 0 and 1.
</p>
<p>
When the pattern value is 0, the output of subdiv~ will be a constant 0 for that step.
When the pattern value is 1, the output of subdiv~ is the normal phasor ramp. When the value is between 0 and 1, it is taken
as a probability of the phasor occurring for that step.
</p>
<p>
The pattern does not have to have the same length as the number of subdivisions. Example: a pattern of 0 1 0.5 will, over a
cycle of three steps, never output the first time, always output the second time, and output the third step half the time.
</p>
<p>
To clear the pattern (and always output every step), you can optionally send a bang.
When both prob probability pattern and a pattern duration multiplier pattern are in use, the prob pattern is
consulted whenver a new step in the duration pattern is started.
</p></description>
</attribute>
<attribute name="silentmode" size="1" type="bool">
<digest>Determine the type of output for skipped states when prob probabilities are in use</digest>
<attributelist>
<attribute name="default" type="bool" value="false"></attribute>
</attributelist>
<description><p>
Determines index output for when phasor output is skipped. Possible values include:
</p>
<p>
0 = 'Hold Previous Step' ( Don't change step number )
When silentmode is set to Hold Previous Step (0), the index output of 
<o objname="rnbo_subdiv~">subdiv~</o>
 does not change from the previous step if the phasor output is zero.
</p>
<p>
1 = 'Output -1' ( Output -1 )
When silentmode is set to Output -1 (1), the index output of 
<o objname="rnbo_subdiv~">subdiv~</o>
 is -1 if the phasor output is zero.
</p></description>
</attribute>
<attribute name="syncupdate" size="1" type="enum">
<digest>Synchronise detection value changes</digest>
<attributelist>
<attribute name="enumvals">
<enumlist get="1" set="1" type="atom">
<enum name="off"></enum>
<enum name="output"></enum>
<enum name="input"></enum>
</enumlist>
</attribute>
<attribute name="default" type="enum" value="off"></attribute>
</attributelist>
<description><p>
When syncupdate is enabled, messages to change the values to detect do not take effect until the input phasor resets.
A reset is defined as a direction reversal in the signal.
</p></description>
</attribute>
</rnboattributelist>
<!--INLETS-->
<rnboinletlist>
<inlet id="inlet_input" name="input" type="signal, number">
<digest>Input</digest>
<description><p>
The signal input to be subdivided
</p></description>
</inlet>
</rnboinletlist>
<!--OUTLETS-->
<rnbooutletlist>
<outlet id="outlet_output" name="output" type="signal">
<digest>Output</digest>
<description><p>
The subdivided output
</p></description>
</outlet>
<outlet id="outlet_step" name="step" type="signal">
<digest>Step Number</digest>

</outlet>
<outlet id="outlet_stepmessage" name="stepmessage" type="number">
<digest>Step Number</digest>
<description><p>
The subdivided output
</p></description>
</outlet>
</rnbooutletlist>
<!--SEE ALSO-->
<seealsolist>
<seealso name="what~" type="refpage" module="MSP"></seealso>
<seealso name="subdiv~" type="refpage" module="MSP"></seealso>
<seealso name="rnbo_edge~" type="rnborefpage" module="RNBO" display="edge~"></seealso>
</seealsolist>
</c74object>