# Count^ with non-zero default

**URL:** <https://forum.audulus.com/t/count-with-non-zero-default/2688>\
**Category:** Build\
**Created:** [November 17, 2020, 12:37pm UTC](https://forum.audulus.com/t/count-with-non-zero-default/2688 "2020-11-17T12:37:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zilch42](https://forum.audulus.com/user_avatar/forum.audulus.com/zilch42/32/6065_2.png) [@zilch42](https://forum.audulus.com/u/zilch42)\
**Post date:** [November 17, 2020, 12:37pm UTC](https://forum.audulus.com/t/count-with-non-zero-default/2688/1 "2020-11-17T12:37:10Z")

</div>

So I’m using the Count^ (count up) module with a trigger input to select between a few different settings for a patch. I’ve noticed that when I re-open the patch in audulus it default’s back to zero because the sample-hold is re-initialised, which makes sense. But the setting that ‘zero’ relates to isn’t one that I’d like users to open up to.

I know i could re order outputs from my demux so that zero was the one I wanted to initialize to but I feel like that will make the internals of the patch confusing because they wont be in the same order as the UI.

Is there a way that I could use some kind of offset to count up between 0 and 4 but initialze on 3? I can’t figure out a way to do it.

 ![Screen Shot 2020-11-17 at 11.08.48 pm](https://discourse.carlnet.ddnsgeek.com/uploads/default/original/2X/b/b820a47b4713313f0ce5e3e548b6d6520bd327d2.png)

---

<div class="post-metadata">

**Author:** ![J031](https://forum.audulus.com/user_avatar/forum.audulus.com/j031/32/7302_2.png) [@J031](https://forum.audulus.com/u/J031)\
**Post date:** [November 17, 2020, 5:48pm UTC](https://forum.audulus.com/t/count-with-non-zero-default/2688/2 "2020-11-17T17:48:56Z")

</div>

Yup there is a way 😃

You can use an ==0 expression on the output of a timer. This puts out 1 only when the output of the timer is exactly 0 (which is only during the initialization of the patch)

 ![image](https://discourse.carlnet.ddnsgeek.com/uploads/default/original/2X/d/d849e71996297cb32cbddff192a6a6c2eec90219.jpeg)  
You can then use this signal as an additional trigger and for switching between two input signals for the s&h node. A signal for initialization and the signal that is used to count upwards.  
Now the s&h node is initialized with a trigger-signal of 1 and an initialization value as in-signal.  
 ![image](https://discourse.carlnet.ddnsgeek.com/uploads/default/original/2X/a/a5a4ad43f082ce5203899d51d720dfa26e6f33c4.jpeg)

Here is an edited Count^ module with the changes I described.  
[Count^ with init input.audulus](https://forum.audulus.com/uploads/short-url/tshjOS7jts77H6kbIw8pUQnZbOx.audulus) (5.6 KB)

---

<div class="post-metadata">

**Author:** ![zilch42](https://forum.audulus.com/user_avatar/forum.audulus.com/zilch42/32/6065_2.png) [@zilch42](https://forum.audulus.com/u/zilch42)\
**Post date:** [November 18, 2020, 12:56am UTC](https://forum.audulus.com/t/count-with-non-zero-default/2688/3 "2020-11-18T00:56:18Z")

</div>

Ah that’s clever! Very cool thank you @J031

---

<div class="post-metadata">

**Author:** ![robertsyrett](https://forum.audulus.com/user_avatar/forum.audulus.com/robertsyrett/32/6507_2.png) [@robertsyrett](https://forum.audulus.com/u/robertsyrett)\
**Post date:** [March 4, 2021, 2:02am UTC](https://forum.audulus.com/t/count-with-non-zero-default/2688/4 "2021-03-04T02:02:15Z")

</div>

> [@J031](#):
>
> You can use an ==0 expression on the output of a timer. This puts out 1 only when the output of the timer is exactly 0 (which is only during the initialization of the patch)

Great tip
