# Dynamic initial value in AHDSR

**URL:** <https://qa.fmod.com/t/dynamic-initial-value-in-ahdsr/19686>\
**Category:** FMOD Studio\
**Tags:** unity\
**Created:** [December 28, 2022, 12:15pm UTC](https://qa.fmod.com/t/dynamic-initial-value-in-ahdsr/19686 "2022-12-28T12:15:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hzo420](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/hzo420/32/3827_2.png) [@Hzo420](https://qa.fmod.com/u/Hzo420)\
**Post date:** [December 28, 2022, 12:15pm UTC](https://qa.fmod.com/t/dynamic-initial-value-in-ahdsr/19686/1 "2022-12-28T12:15:45Z")

</div>

Hi,

I’m working on a Unity project in which I’m trying to automate a snapshot that applies a few effects (flanger, distortion, chorus) on my music tracks for a short amount of time.

The gist of the problem is this: I’m invoking this snapshot through C# code, and I’m using an AHDSR envelope to dictate the attack and decay rates of the effect’s intensity. But in the case where this effect gets invoked a 2nd time before the first one was fully released, I’d like to dynamically change the AHDSR’s initial value to match what it was at the moment of the 2nd initialization (see attached picture).

 ![FMOD example v2](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/1/10f9574bda82f3e8acffc801c1ddc097ad8ad022.jpeg)

Is there any way to automate the initial value to match the current value of the intensity? If that’s not possible, maybe there’s a way to make the modulation additive with its previous value rather than overriding? (I imagine this would achieve almost the same result).

Thanks.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [January 3, 2023, 3:41am UTC](https://qa.fmod.com/t/dynamic-initial-value-in-ahdsr/19686/2 "2023-01-03T03:41:03Z")

</div>

Hi,

Unfortunately, this behavior does not exist. I will suggest it to our development team to look into further.
