# Command instruments and switching a parameter back to a specified value after a certain amount of time

**URL:** https://qa.fmod.com/t/command-instruments-and-switching-a-parameter-back-to-a-specified-value-after-a-certain-amount-of-time/16406
**Category:** FMOD Studio
**Created:** [November 6, 2020, 4:08pm UTC](https://qa.fmod.com/t/command-instruments-and-switching-a-parameter-back-to-a-specified-value-after-a-certain-amount-of-time/16406 "2020-11-06T16:08:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![richard\_glowforth](https://avatars.discourse-cdn.com/v4/letter/r/65b543/32.png) [@richard\_glowforth](https://qa.fmod.com/u/richard_glowforth)
#### Post date: [November 6, 2020, 4:08pm UTC](https://qa.fmod.com/t/command-instruments-and-switching-a-parameter-back-to-a-specified-value-after-a-certain-amount-of-time/16406/1 "2020-11-06T16:08:28Z")

</div>

I’m really loving the new command instrument functionality in 2.01.  
I’m interested in setting up an integer parameter which sets itself back to 0 after a defined quantized amount of time, which would be different on a case per case basis.  
basically, so that if i switch it to 2, in 1 bars it pops back to 0, if i set it to 3, in 2 bars it switches back 0, etc.  
I managed to get this working by having a conditional command instrument have a set time delay but i’d like the delay to be quantized so the parameter switching back doesn’t depend on the exact moment or changing the parameter.  
I guess i could create a chain of quantized parameters to achieve this but that seems a bit clunky.

Any ideas?

Thanks!

---

<div class="post-metadata">

### Author: ![joseph](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joseph/32/264_2.png) [@joseph](https://qa.fmod.com/u/joseph)
#### Post date: [November 8, 2020, 11:09pm UTC](https://qa.fmod.com/t/command-instruments-and-switching-a-parameter-back-to-a-specified-value-after-a-certain-amount-of-time/16406/2 "2020-11-08T23:09:55Z")

</div>

If I understand you correctly, you want the parameter value to reset itself to a specific value after a period of time based on the value to which it was set, in a manner similar to the behavior of a parameter with velocity, but for the parameter’s reset to its default value to be instantaneous rather than ramped, and for the change to be quantized to the bar. That’s a tricky one…

Have you considered using a pair of set parameter command instruments, where the second in the pair has a quantized delay? Or does that not suit your project’s needs?
