Fades on looped Multi Instrument bug?

Hi All,

I am attempting to shorten a multi instrument with using fades within a loop region, however the moment that the fade is engaged, the playback is erratic, sound like some of the elements in the multi aren’t being triggered or abruptly cut off. Does anyone have any ideas? Alternatively, fading a single instrument within a loop results in normal behaviour.

Hi, can you give us a screenshot?
The problem could be that the multi is defined as “async”, with audio elements inside that do not match the container size. So the fades on the container do not apply well to the audio inside.

How are the fades applied - by an AHDSR modulator, by fade in and fade out curves on the instrument, by automation on the instrument’s volume, or by automation on a track’s volume?

Also, where are the beginning and end of the loop region positioned relative to the start and end of the instrument and the start and end of the fades? A screenshot (as Alcibiade suggests) would help us understand your setup.

Here’s a screenshot of the setup. The fade is done using the handles and the multi Instrument is currently sitting within the Loop Region but not touching it or going beyond it. I’ve also tried AHDSR with the same results, and automating the track’s volume was slightly better but still sounded glitchy, as if it wasn’t capturing the entirety of the audio. Behavior is completely normal across all methods if it’s a single instrument and not a multi OR by removing the loop constraint and have it essentially a one shot trigger.

I confirm having fades on multi in a similar configuration introduces pops. However, on my system it happens with slightly different timings (and AHDSR seems fine). Here’s the project, so the devs could check that (you’ll have to solo one track):

Even in the pop-free version (with the single instrument), there’s still some inconsistencies across repetitions: the sound isn’t exactly the same each time. This doesn’t seem to occur without fades.

Maybe could you share your event too, @Arnej?

You nailed it on the head, checked it out and that’s in essence what I’m getting.

That’s a very audible problem. I’ve added it to our bug tracker, so it will be fixed in an upcoming release of FMOD Studio.

In the mean time, this issue appears to only occur in the specific circumstance that the end of a loop region is in close proximity to the end of a multi instrument with a fade curve, so it should be possible to work around it in at least some cases.

I’m noticing this issue also with the ADSR envelope as well. I’m attempting to automate the decay over distance but it’s creating as equal inconsistencies as described before. I’ve yet found a usable way of automating the length of a looped audio event over distance.

That’s not surprising. Fade curves, AHDSR modutors, and automation curves all use the same under-the-hood code, so most bugs that affect one of them also affect the other two. On the plus side, this means that fixing a bug for one of them usually fixes it for the others, as well.

Have you considered adding a transition region to the event, and assigning it a parameter trigger condition based on a parameter with velocity, such that it only triggers once the parameter reaches a certain value? It’d allow you to set the amount of time until the loop ends by setting the value of the parameter.

However if you want a continuous automating between event duration and distance, joseph’s method will require to implement it in the code.

I found a way to fully automate within FMOD Studio the duration of an event, but it will stop all instances of the event, so it works only if there’s one event instance running at a time. Is that the case in your project? My solution requires using an action sheet, along with the timeline sheet, a silence instrument and a command instrument. I let you search a little :wink:

Ah, you’re automating the length of a silence instrument over a distance built-in parameter? Good idea - that’d allow you to avoid having to do any special code support for the event.

If you want to only stop the current instance of the event, you could do it by using a set parameter command instrument to target a local parameter instead of a stop event command instrument. Set parameter command instruments that target local parameters in the same event only affect that event instance’s instance of the parameter, so if you set up the event such that the event ends when the parameter is set to a certain value (this can be achieved using parameter trigger conditions) then you can cause the event instance to end without affecting other instances.

1 Like

That went a little over my head :slight_smile: I am still fairly new to FMOD and what’s available but not audio production. The ADSR approach was essentially what I would do in a typical DAW, shortening the decay over time to achieve a shorter “staccato” sound.

On the topic of shortening multi instruments, I noticed that you can trim the length with the right handle, but can’t trim the start with the left handle, seems to act as an offset/move instead, is this by design or bug?

It’s by design. Left edge trimming was added only for single instruments.

If we ever decide to extend left edge trimming to other instrument types, we’ll have to consider carefully. Other instrument types have additional complexities and requirements that single instruments do not, and so would require additional design.

Gottcha, would be a nice feature to have if ever possible. Additionally, it would be nice to be able to bypass/mute individual sounds in a multi instrument, at least during the design stage. I’m finding myself adding more than required then manually deleting instances to get the desired sound with the least # of instances possible, but would be much more efficient if you can just mute/bypass them until you’re satisfied with the result.

I’m afraid I don’t understand what you mean. The number of instances of a multi instrument is dependent on the number of times the instrument is triggered, which is usually determined by how often instances of the event are played, the timeline logic in the event, and how the event’s parameters are changed by your game’s code.

Do you mean you want to exclude specific playlist entries in a multi instrument from being selected? It is technically possible to do this by setting the playlist entry’s play percentage to 0, but this does have the side effect of making it impossible to guarantee that the same playlist entry will be selected twice in a row, even when the playlist is set to shuffle selection mode.

Correct, that is what I mean. If I’m designing a multi instrument effect with 8 instances (randomized), often I will try to bring this down to 3-4 by auditioning different sounds until I get the desired effect, so being able to mute individual sounds would greatly aid in this.

Good idea!

With joseph, we thought you were talking about automating an instrument length over the distance (between the listener and the event, in the 3D space). What does it have to do with ADSR? Maybe we didn’t understand what you wanted.

Sorry perhaps I didn’t make it as clear as I could. What I’ve been attempting to do is shorten the sound over time (distance) and the only method I could think of was to adjust the ADSR, the decay specifically, which is essentially what I would do traditionally in a DAW.

Aren’t you aware that you can ajust AHDSR on everything in FMOD? Right click, add modulation, AHDSR.