# Play sound with random attack, hold and decay

**URL:** https://qa.fmod.com/t/play-sound-with-random-attack-hold-and-decay/19212
**Category:** FMOD Studio
**Created:** [August 31, 2022, 7:43am UTC](https://qa.fmod.com/t/play-sound-with-random-attack-hold-and-decay/19212 "2022-08-31T07:43:53Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![deHaan](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/dehaan/32/68_2.png) [@deHaan](https://qa.fmod.com/u/deHaan)
#### Post date: [August 31, 2022, 7:43am UTC](https://qa.fmod.com/t/play-sound-with-random-attack-hold-and-decay/19212/1 "2022-08-31T07:43:53Z")

</div>

I have a looping sound playing with a random start offset. Is it possible to randomize the attack, hold and decay so it plays for a random amount of time with random fade in and out times as well? I tried randomizing an ADSHR, but that did not work (seemed a bit buggy)

---

<div class="post-metadata">

### Author: ![Alcibiade](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alcibiade/32/4284_2.png) [@Alcibiade](https://qa.fmod.com/u/Alcibiade)
#### Post date: [August 31, 2022, 3:26pm UTC](https://qa.fmod.com/t/play-sound-with-random-attack-hold-and-decay/19212/2 "2022-08-31T15:26:06Z")

</div>

It doesn’t seem to be possible to randomize AHDSR (only automation) ; how did you try to do that?

---

<div class="post-metadata">

### Author: ![deHaan](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/dehaan/32/68_2.png) [@deHaan](https://qa.fmod.com/u/deHaan)
#### Post date: [August 31, 2022, 8:34pm UTC](https://qa.fmod.com/t/play-sound-with-random-attack-hold-and-decay/19212/3 "2022-08-31T20:34:23Z")

</div>

I automared it with a parameter that had its value randomized 🙂

---

<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: [August 31, 2022, 11:28pm UTC](https://qa.fmod.com/t/play-sound-with-random-attack-hold-and-decay/19212/4 "2022-08-31T23:28:35Z")

</div>

> [@deHaan](#):
>
> I tried randomizing an ADSHR, but that did not work (seemed a bit buggy)

Automating the properties of an AHDSR modulator, and randomizing the values of the parameters used to automate it, should work.

Can you describe what you mean by it “seeming a bit buggy?” It seems to be working fine when I test it here.

---

<div class="post-metadata">

### Author: ![deHaan](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/dehaan/32/68_2.png) [@deHaan](https://qa.fmod.com/u/deHaan)
#### Post date: [September 7, 2022, 11:02am UTC](https://qa.fmod.com/t/play-sound-with-random-attack-hold-and-decay/19212/5 "2022-09-07T11:02:21Z")

</div>

Here’s an example: [FMOD Random Hold ADSHR not working - YouTube](https://youtu.be/D2A_5eyFEtE)

I am automating the hold value, but most of the times the volume just goes straight to silence instead of holding…

---

<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: [September 8, 2022, 5:13am UTC](https://qa.fmod.com/t/play-sound-with-random-attack-hold-and-decay/19212/6 "2022-09-08T05:13:00Z")

</div>

Thanks for reporting this issue to us. We’ve been able to reproduce the behavior you describe. It seems as if the attack, hold, and decay periods of an AHDSR modulator are sometimes skipped if at least one of those properties is automated on a parameter subject to modulation.

I’ve added this issue to our bug tracker. It will be fixed in an upcoming release of FMOD Studio.
