<?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="counter~" category="Generators">
<!--METADATA-->
<metadatalist>
<metadata name="author">Cycling '74</metadata>
<metadata name="tag">RNBO</metadata>
<metadata name="tag">RNBO Generators</metadata>
</metadatalist>
<digest>counter~</digest>
<description><p>
Add an amount to the current count every sample.
</p></description>
<!--ARGUMENTS-->
<objarglist>
<objarg name="reset" optional="1" type="auto">
<digest>non zero value resets the count</digest>
<description><p>
A non-zero value resets the counter to zero and stops counting. A zero value starts the counter.
</p></description>
</objarg>
<objarg name="limit" optional="1" type="auto">
<digest>count limit (zero means no limit)</digest>
<description><p>
The upper limit for counting. Values above the limit are wrapped between 0 and the limit value.
</p></description>
</objarg>
</objarglist>
<!--OPTIONS-->
<rnbooptionlist>
<option name="init" size="1" type="number">
<digest>Initial value</digest>
<attributelist>
<attribute name="default" type="number" value="0"></attribute>
</attributelist>
<description><p>
The initial value from which to begin counting. Note that this only applies to the first count loop and only when counting is enabled at startup (reset 0), because resetting the counter~ during run time will always start counting from zero.
</p></description>
</option>
</rnbooptionlist>
<!--ATTRIBUTES-->
<rnboattributelist>
<attribute name="a" size="1" type="auto">
<digest>amount to add per sample</digest>
<description><p>
A value received in the left inlet is added to the internal value every sample.
</p></description>
</attribute>
<attribute name="limit" size="1" type="auto">
<digest>count limit (zero means no limit)</digest>
<description><p>
The upper limit for counting. Values above the limit are wrapped between 0 and the limit value.
</p></description>
</attribute>
<attribute name="reset" size="1" type="auto">
<digest>non zero value resets the count</digest>
<description><p>
A non-zero value resets the counter to zero and stops counting. A zero value starts the counter.
</p></description>
</attribute>
</rnboattributelist>
<!--INLETS-->
<rnboinletlist>
<inlet id="inlet_a" name="a" type="auto">
<digest>amount to add per sample</digest>
<description><p>
A value received in the left inlet is added to the internal value every sample.
</p></description>
</inlet>
<inlet id="inlet_reset" name="reset" type="auto">
<digest>non zero value resets the count</digest>
<description><p>
A non-zero value resets the counter to zero and stops counting. A zero value starts the counter.
</p></description>
</inlet>
<inlet id="inlet_limit" name="limit" type="auto">
<digest>count limit (zero means no limit)</digest>
<description><p>
The upper limit for counting. Values above the limit are wrapped between 0 and the limit value.
</p></description>
</inlet>
</rnboinletlist>
<!--OUTLETS-->
<rnbooutletlist>
<outlet id="outlet_out1" name="out1" type="signal">
<digest>current count (running total)</digest>
<description><p>
The current value of the counter as a signal.
</p></description>
</outlet>
<outlet id="outlet_out2" name="out2" type="signal">
<digest>carry flag (counter hit maximum)</digest>
<description><p>
Outputs a signal value of 1. whenever the limit value is reached, otherwise outputs a 0.
</p></description>
</outlet>
<outlet id="outlet_out3" name="out3" type="signal">
<digest>carry count</digest>
<description><p>
The total number of times the counter~ object has reached the limit since the last reset, as a signal value. Sending a non-zero value to the middle inlet resets the carry count.
</p></description>
</outlet>
</rnbooutletlist>
<!--SEE ALSO-->
<seealsolist>
<seealso name="rnbo_accum" type="rnborefpage" module="RNBO" display="accum"></seealso>
<seealso name="counter~" type="refpage" module="MSP"></seealso>
<seealso name="rnbo_counter" type="rnborefpage" module="RNBO" display="counter"></seealso>
</seealsolist>
</c74object>