# AHDSR and instrument sync issues

**URL:** <https://qa.fmod.com/t/ahdsr-and-instrument-sync-issues/19658>\
**Category:** FMOD Studio\
**Created:** [December 19, 2022, 12:38pm UTC](https://qa.fmod.com/t/ahdsr-and-instrument-sync-issues/19658 "2022-12-19T12:38:31Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Goran1](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@Goran1](https://qa.fmod.com/u/Goran1)\
**Post date:** [December 19, 2022, 12:38pm UTC](https://qa.fmod.com/t/ahdsr-and-instrument-sync-issues/19658/1 "2022-12-19T12:38:31Z")

</div>

Hey friends. Need some help here.

I got a 2D music event containing 8 tracks (layers) with nested instruments.

I’ve also set a parameter to switch between layers and markers (values 0-7) and also conditioned the instruments to trigger based on a certain value.

I used nested instruments so I could use the AHDSR when I switch between layers.  
I couldn’t find a better way.

So… the AHDSR behaves like it should now, but the tracks are out of sync now and I’m at a dead end.

I’m sure there is a better way to do this, but I just miss it.

How would you guys best approach this?

Thanks in advance!

---

<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:** [December 27, 2022, 11:33pm UTC](https://qa.fmod.com/t/ahdsr-and-instrument-sync-issues/19658/2 "2022-12-27T23:33:21Z")

</div>

Hi,

Apologies for the delayed response.

Is it possible to get a screenshot of the event and how you have the AHDSR is set up? Could you also elaborate on the aim of your set up?

Thanks!

---

<div class="post-metadata">

**Author:** ![Goran1](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@Goran1](https://qa.fmod.com/u/Goran1)\
**Post date:** [December 28, 2022, 8:24pm UTC](https://qa.fmod.com/t/ahdsr-and-instrument-sync-issues/19658/3 "2022-12-28T20:24:52Z")

</div>

Basically, I just want to be able punch in and out, back and forth between the tracks and markers with applied ahdsr (for transition) without losing sync.

I managed to make the ahdsr behave like I wanted by putting it on the nested instruments (not on master).

However, I also set trigger conditions on the instruments as well and when they are triggered they are not in sync. I’m aware that that’s a problem, but I cant find a way where they are triggered at the same time and the ahdsr works as intended.

 ![Capture2](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/c/c1c6e3f7de4f43c495bf8d0e0183414d09780842.jpeg)

---

<div class="post-metadata">

**Author:** ![Goran1](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@Goran1](https://qa.fmod.com/u/Goran1)\
**Post date:** [January 4, 2023, 10:01am UTC](https://qa.fmod.com/t/ahdsr-and-instrument-sync-issues/19658/4 "2023-01-04T10:01:14Z")

</div>

Any solutions? @Connor_FMOD

---

<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:** [January 4, 2023, 2:17pm UTC](https://qa.fmod.com/t/ahdsr-and-instrument-sync-issues/19658/5 "2023-01-04T14:17:56Z")

</div>

I don’t get the event structure. Since nested events are always async, they will play all along and nothing will happen when you transition from One to Seven or anything else. Am I missing something?

---

<div class="post-metadata">

**Author:** ![Goran1](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@Goran1](https://qa.fmod.com/u/Goran1)\
**Post date:** [January 4, 2023, 3:51pm UTC](https://qa.fmod.com/t/ahdsr-and-instrument-sync-issues/19658/6 "2023-01-04T15:51:42Z")

</div>

When you transition between the instruments (the nested events) the tracks get out of sync, because they are trigger conditioned. The only way for them to be in sync is if they are all triggered in the same time.  
I don’t want that.  
I want to be able punch in and out (transition) between them back and forth with AHDSR applied and for them to be in sync.

So here is an example.  
I have 8 markers and a “Intensity” parameter set (none to seven).  
“None” plays track one only , “One” plays tracks one and two, “Two” plays track one, two, three and so on.

Lets say I want to get back to parameter “None”, tracks two, three and four should fade out (AHDSR). Then I wan to to go to “Six”, tracks two, three, four, five and six should slowly fade in (AHDSR)

---

<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:** [January 4, 2023, 3:57pm UTC](https://qa.fmod.com/t/ahdsr-and-instrument-sync-issues/19658/7 "2023-01-04T15:57:25Z")

</div>

I think I get it: the purpose of the timeline is to execute the conditional trigger behavior.  
But what do you mean exactly by “in sync”? Do you want the new track to begin at start, in sync with the beat? Do you want the new track to begin where it should be if it had played from the beginning when the event has started?

---

<div class="post-metadata">

**Author:** ![Goran1](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@Goran1](https://qa.fmod.com/u/Goran1)\
**Post date:** [January 4, 2023, 4:17pm UTC](https://qa.fmod.com/t/ahdsr-and-instrument-sync-issues/19658/8 "2023-01-04T16:17:30Z")

</div>

The second one, yes. I want the next track to begin where it should be, just like if it had played from the beginning when the event has started.

---

<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:** [January 4, 2023, 5:00pm UTC](https://qa.fmod.com/t/ahdsr-and-instrument-sync-issues/19658/9 "2023-01-04T17:00:37Z")

</div>

In fact, no, I still don’t see the purpose of your timeline. The instruments conditional trigger behavior comes from a parameter, not from the regions. So what’s the point with those regions?

---

<div class="post-metadata">

**Author:** ![Goran1](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@Goran1](https://qa.fmod.com/u/Goran1)\
**Post date:** [January 4, 2023, 5:34pm UTC](https://qa.fmod.com/t/ahdsr-and-instrument-sync-issues/19658/10 "2023-01-04T17:34:08Z")

</div>

It’s not a full screen.

This approach is for both vertical and horizontal music composition.

The regions are for certain other SFX instruments which are not sync dependent.  
Ignore the regions for now.

Even without the regions, I’m still not able to punch in and out between the nested music tracks, where sync and ahdsr are important.

---

<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:** [January 4, 2023, 6:23pm UTC](https://qa.fmod.com/t/ahdsr-and-instrument-sync-issues/19658/11 "2023-01-04T18:23:47Z")

</div>

Ok. You can’t do that by punching-in nested events, cause nested events are async, which means they always start at their beginning. You can use nested events but you’ll have to play them from the beginning, and automate the volume. Note that the synchronisation between tracks will never be checked anymore, so it can be somewhat risky ; it’s safer to use synced instruments. Either ways, the problem is the volume automation (or AHDSR). In fact you’ll be facing the problem that FMOD lacks an essential feature, which I asked for almost 2 years ago, and which is the most asked feature on this forum :

> [@Suggestion: seek speed on... everything!](https://qa.fmod.com/t/suggestion-seek-speed-on-everything/16947):
>
> We already talked about the limitation of discrete parameters for smoothly changing continuous values. An improvement is planned, from what I understood. I think a great improvement, resolving this case as well as others, would be to have a configurable seek speed on continuous settings themselves (especially volume). The seek speed on the parameter causes some problems: while changing parameter value, we often want some things to happen immediately (trigger a sound, transition somewere else on…

and

> [@Crossfade On Labelled Parameter](https://qa.fmod.com/t/crossfade-on-labelled-parameter/18189):
>
> Hey Everyone! Hope you all had nice holidays! I’m trying to implement a weather system and the programmers and I have decided to use the labelled parameters for ease so clear, rain, snow etc. I have my audio in the parameter sheet as opposed to the timeline and am switching between each value but there doesn’t seem to be any kind of crossfade. I’ve looked into AHDSR’s but they seem to only work when triggering the event for the first time only and not switching between values. Anybody have any…

You’ll find some workarounds on those links, though.

---

<div class="post-metadata">

**Author:** ![Goran1](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@Goran1](https://qa.fmod.com/u/Goran1)\
**Post date:** [January 4, 2023, 7:05pm UTC](https://qa.fmod.com/t/ahdsr-and-instrument-sync-issues/19658/12 "2023-01-04T19:05:10Z")

</div>

Damn.  
That’s exactly what I need.  
It would be great if this feature could be added this year.  
I have a workaround, a less elegant one, but good enough.  
But it is what it is, I guess.  
Thank you for your time and response.  
Cheers!

---

<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 4, 2023, 9:52pm UTC](https://qa.fmod.com/t/ahdsr-and-instrument-sync-issues/19658/13 "2023-01-04T21:52:00Z")

</div>

Hi,

@Goran1, apologies for not getting back to you.

@Alcibiade, thank you for your help!

I can confirm this feature is in development.
