I’m trying a scatter instrument and wondering about 2 things:  playing out the last spawned sound when event is stopped, and  using AHDSR per spawned sound
If a sound from the playlist is spawned, but the event is stopped, the sound cuts out right? I mean the scatter instrument is stopped and interrupts all sound. How do you let the spawned sound play out?
Putting an AHDSR on the track with a release just fades it out while spawning new sounds… not quite want I’d want…
Do i need to set up a transition to an end tail? or is there a simpler way to tell FMOD to just let the last spawned sound play out?
I have a longer file used in the playlist of a scatter instrument. I have the offset randomized so that different parts of this longer file are played back when spawned. I would like the playback of each spawned sound to be faded in and faded out (not cut in and out). I have therefore tried to set up an AHDSR on the sound itself in the scatter instrument’s playlist (screenshot below to clarify where the AHDSR is setup). The Attack seems to work, but the Release doesn’t – each time the sound ends it just cuts. What am I doing wrong?
There are two different parts to what you want to do.
The first part is that you want an event to not stop immediately when it receives a stop command. There are two different ways to do this:
The first method is to add an AHDSR modulator to a property of the event (but not a property of an instrument). It doesn’t matter which property it is; it could even be a property that your event doesn’t actually use, such as the volume of a track with no content. If such a modulator is present, the event will enter the “stopping” state when it recieves a non-immediate stop command, and will remain in that state for the duration of the AHDSR modulator’s release property (or of the longest release period of any AHDSR modulator on an event property, if there are multiple such modulators present).
The second method is to add an event state trigger condition to any logic marker or instrument in the event. If such a condition is present, the event will enter the “stopping” state when it recieves a non-immediate stop command, and will remain in that state until the event reaches a natural end (i.e.: no instruments are currently producing output and the timeline playback position is to the right of all other instruments and markers on the timeline.
Both of these ways will work. Without knowing more about your event, I can’t say for sure which of these options is more appropriate for you. (However, I do suspect the latter will be more useful for you, for reasons I’ll describe below.)
The second part of what you want to do is ensure that a scatterer instrument plays out whatever sounds it is currently playing, without spawning more, when your event receives a stop command. This is easy to achieve, because “playing out whatever sounds it’s currently playing without spawning more” is actually the default behaviour of scatterer instruments when they’re untriggered. As such, the only thing you need to do is ensure the instrument is untriggered when the event receives a stop command. There are a number of ways to do this, but the simplest is to give the scatterer instrument an “event state - not stopping” trigger condition, in addition to any existing trigger conditions it might have.
As I said above, adding an event state trigger condition to an instrument ensures the event will enter the “stopping” play state instead of stopping immediately - so adding one to your scatterer instrument is actually adding killing two birds with one stone, in your case. You will, however, need to ensure that the event reaches a natural end (by ensuring the event’s timeline playback position ends up to the right of all content on the timeline and that all instruments in the event are untriggered some time after the event recieves a stop command), or the event instance may leak.
The release period of an AHDSR modulator begins when the parent instrument or event is untriggered (in the case of an instrument) or non-immediately stopped (in the case of an event). In your scatterer instrument, these instruments are never being untriggered, so their release periods never begin.
To ensure the instrument is untriggered, I recommend replacing the single instrument in your scatterer instrument’s playlist with an event instrument. Then place a new single instrument inside the corresponding nested event, on the nested event’s timeline, add an AHDSR modulator to that single instrument’s volume, set the instrument to asynchronous mode, and adjust its length such that it is untriggered before it finishes playing.