How to make sound play only once?

(Roberto) #1

I’m a FMOD beginner, the image probably describes better my question:

I created a “Speed” parameter that is used to modulate the pitch of “LoveBug_EngineDrive”. Also, and more important, it makes it fade from EngineIdle to EngineDrive. That means that when Speed is over 0.1 EngineDrive is triggered to play.

The problem I’m having happens when Speed rapidly varies between more than 0.1 and less than 0.1, because that triggers EngineDrive many times. You can see in the screenshot the arrows indicating that it’s being played multiple times.

It’s an engine sound, EngineDrive shouldn’t be played again when it’s already being played, is there a way to prevent that?

Thank you.

(リチャード清水) #2

Hi Roberto,

You can achieve this by expanding the “Trigger Behavior” tab on the left hand side of the deck when the instrument is selected.

In here, set the Polyphony’s Limit to 1 and set the Stealing to None. This way only one instance of the instrument can be playing at one time, even if the playback position triggers the instrument multiple times.

You can also enable “Cut” on the instrument if you don’t want the instrument to keep playing after the playback position leaves the trigger region.


(Roberto) #3

Thank you Richard! That fixed the problem but introduced another problem: let’s say Speed goes to 0.5, triggering EngineDrive. While EngineDrive is playing, Speed goes to zero and back to 0.5. This time it won’t trigger another EngineDrive - and that’s what we want - but when this first EngineDrive play finishes everything goes quiet, it doesn’t loop. Setting Stealing to Oldest makes this problem go away because it starts a new EngineDrive and stops the first, but this is not ideal because it starts the playback from the beginning, obviously. Please let me know if I didn’t explain it well.

(リチャード清水) #4

Hi Roberto,

If you use “Cut” then the instrument will stop playing once the playback position leaves the instruments trigger region (ie. when the parameter falls below 0.5). You can use an AHDSR modulator to fade in/out when the instrument triggers and untriggers.

You can also enable looping of the instrument by clicking on the loop button at the top right of the waveform in the deck.