Feature Request - Play on Stop

the condition to jump to the marker is “parameter is between 0 and 0.99”. If it starts off at 0, it will trigger immediately. This is why it is set to 1.0 to start with.

The AHDSR multiplies that parameter value with the envelope. It is param * 1.0 during the AHDS stage, and when stop is call, it has a downward slope which makes the release go from 1 to 0 quickly. ie when that ADSR hits .99 or .9 or .8 or whatever, now the parameter will be .99 or .9 or .8 or whatever it happens to hit, making the transition region condition trigger, and it will jump to the marker.

I have similar problem. I designed a sound like this:

It’s sound of a bow shot. First sound is an oneshot, later under loop region there’s scattered sound that keeps playing unless I set the parameter “arrow_release” to 0.5 - 1. Then cursor jumps to Marker A and simultaneously arrow release oneshot sound is played. The problem is whatever I do my event is not released. Usually when there’s nothing to play my events stop automatically without problem but not this time. Do you know what should I do? I suspect loop region to prevent the event from being released. I also tried adding ADSR to arrow_release parameter to no avail.

See Brett’s solution above, its working perfectly for me. If not, then you likely have your ADSR and condition setup wrong. Also dont forget you have to hold the stop button to audition it properly in FMOD (sending the stop event from the game will set the ADSR to release and jump to the marker automatically during runtime).

Thanks for your answer. Brett’s solution works for me but it’s not perfect. When I set parameter “arrow_release” to 0.50 weak shot sound can be played, when I set it to 1.00 perfectly strong shot sound can be played. You can’t do this with simple sound on timeline. But that’s not the problem - my problem is that whenever there’s loop region or scattered sound with infinite total sounds, my event doesn’t get released. When I don’t use scattered sound or region loop it gets released normally so I’m a bit confused. Is it some kind of issue of FMOD? Do I have to tell the programmer to stop the event every time after he sets my parameter?

Or maybe it’s a problem of FMOD studio implementation made by our programmers… I need to evaluate this.

Bump on this.
I too have a looping sound and want to play a sound on stop, not by a programmer calling a parameter, but just by stopping the sound.
If I do as suggested, it works, but there is always a delay from pressing stop, till the end sound is being played.
The parameter itself is set to “instant” and I can see it go down instantly when pressing stop, but still it takes about 0.5 seconds before i get to the “end” sound.
The end sound even goes from gray to brigth blue, as if it is being plaed, but in reality it is being played about 0.5 seconds later.
Maybe an fmod problem?
Thanks.

That’s possibly due to your tail being set to “Stream”, which you can change in the Audio Bin/Asset browser.

I know this is a super old thread but since it’s been bumped recently… This is a feature people have wanted for years, and have commonly had to explore and rig up all the usual workarounds. This seems like some low-hanging fruit for added functionality on Action Sheets. A third new type of action sheet in addition to the existing Consecutive, and Concurrent: “Play on Stop”.

1 Like

We added this feature in FMOD Studio version 2.01.00.

To make an instrument trigger when the event is stopped:

  1. Select the instrument, click its “Add Condition” button in the deck, and select “Add Event Condition” from the context menu. This adds a new condition to the instrument, with a dropdown menu containing two possibilities: “Not Stopping” and “Stopping.”
  2. Set the condition to “Stopping” to ensure that the instrument is only triggered if the event is stopping.

Note that an event must be overlapped by the playback position in order for it to be triggered, in addition to its trigger conditions being met. If you want the instrument to always play when the event is stopped, you must ensure it is under the playback position of its parameter whenever the event is stopped. The easiest way to do this is to stretch it across the full length of a parameter.

Event state conditions are also available for logic markers.

If an instrument with the “Event stopping” condition exists in an event, instances of that event will not stop immediately when stopped, but will naturally end when the normal conditions for ending naturally are met (i.e.: no instruments are currently producing output and the timeline playback position is to the right of all content on the timeline.)

2 Likes

Thanks, just updated and it works. Thanks.
But how do I stop the event completely?

I cannot find any practical use for this? Could you post an example?

My example is:
2 tracks. One track for a looping sound (instrument).
Another track for a stop sound.
They are both located on a parameter called “distance”.(doesnt really matte).
I have a track with an instrument on it. Its set to loop. (on the loop track).
When I press stop, I want the loop to stop, but a release sound to be heard.

As of now, when doing what you describe, when pressing stop, the loop never stops.

Thanks!:slight_smile:

The event conditions function is great news! That feature completely escaped me when I read over the 2.01 release notes. I remember reading it but I definitely misinterpreted it.

@trjaudio A typical use would be just about any looping sound. A machine gun loop stopping followed by a tail. Running water turns off then you hear drips. Car engine shutoff. There’s nothing in real life that just stops making sound when it stops making sound—there’s always at least a subtle tail.

Sounds like you’re using a loop as your stopping sound which definitely is not the intended way of using this feature. It should be a sound which has an end, and FMOD will automatically stop the event when sound stops emitting from it. For what it sounds like you’re trying to do you’d want to use a transition region which reacts to your “distance“ parameter. (BTW, if you’re trying to alter your sound based on how close you are to it, check out the built-in Distance parameter.)

Ok let me explain again.
I have 2 tracks.
1 track with a loop
1 track with a one shot sound (tail).

I want to play the loop and when i press stop, i want to play the tail.
Simple as that.
When I press stop, the event doesnt stop.
The sound itself in the event stops (or does not stop depending on how you have it set up), but the event itself does not stop.

Just try to build what Joseph suggested and maybe you will understand what i mean:) And if you get it working, please post a screenshot.
Thanks

You’re right. The loop persists even when stopping. I got it working though by also adding an event condition to both the loop region and the looping instrument, and setting both to “Not Stopping”.

Also, setting up a transition region (to your tail at a marker) with the “Stopping” condition works as well! This is awesome!

@trjaudio Here are screenshots of both methods.

Transition region, with the “Stopping” event condition only on the transition region:

“Stopping” condition on Tail, and “Not Stopping” condition on both MachineGun and the Loop Region:

Thanks a lot!
Turned out the newest version of fmod crashes for me and other with our unity project, all the time, so will have to roll back and wait to use the newer version that has this feature.
But thanks:)

When you say it crashes “all the time,” do you mean it crashes immediately upon lauching FMOD Studio, or immediately upon connecting FMOD Studio to your game using live update, or just “frequently, without warning?”

Crashes sometimes (often) on starting. sometimes mid game (when testing project).
The rule is that it always crashes at some point within 5 minutes or so.

So I guess often on starting and frequently without warning.

I cannot reproduce it. It just happens randomly.

There is a known bug in version 2.01.04 that causes a crash when a snapshot occurs. Could this be what you’re seeing? If so, we’ve created a fix, which will be included in version 2.01.05.

That could be it. Will look at it at some point in the future, but not planning on updating again soon.

is it just me, or is the Cue::trigger method more responsive than using an Event Condition on a Sustain Point/Loop/Region…?

Key Off seems to fire the next/outgoing instrument faster than the Stop button, for some reason.