Automatic Fades and Resource Costs?

(Hayden Davenport) #1


I’m using FMOD for the first time for a game and the programmer is concerned about how expensive FMOD is. Basically I have a volume slider that goes from 0 to 1, and whenever the character is in combat I want the slider to slowly fade from 0 to 1. This would require him to set the slider to move up every frame, which he is reluctant to do because that might cause lag or something. Is that a concern he should have? And is there a way to simply set a fade in FMOD to occur over a period of time? So the parameter inCombat would be set to 1 and the fade would automatically start?


(Hayden Davenport) #2

Does anyone know…?

(Jesse Lyon) #3

Not exactly sure what your setup is in FMOD, but if you are using an audio event for the given sound, you could either automate the volume on the event’s master timeline, or you could add an ASDR envelope and then set the attack to the appropriate fade in time.

If you are wanting to add the fade to a mixer channel volume, you can do the same thing as above. Add a Snapshot to engage when in combat, and then on the timeline view for that snapshot either add volume or ADSR automation.

Our audio programmer hasent yet complained about performance issues using automation, only overuse of DSP plugins.

Hope that helps!

(Hayden Davenport) #4

Thank you, Jesse, for the help. I think an ASDR envelope would work nicely. Right now I have the main track (called “Main”) and a secondary track that is supposed to fade in whenever the player is in combat (called “inCombat”). Right now inCombat has a slider that goes from 0 to 1, and the slider controls the volume (so .5 would set it to half volume).

What steps do I need to do in order to make an ASDR envelope fade in the audio for 2 seconds every time inCombat is set to 1, and fade out for 2 seconds every time inCombat is set to 0?

I really appreciate you taking the time to assist me! :slight_smile:

(Jesse Lyon) #5

In the Mixer window you will need to create a Snapshot which you would trigger when you are in combat. Then click on your snapshot in Mixer/Snapshot tab, and then toggle the “Tracks” button at the top of the Snapshot window which will change the mixer view to the track view. From here you can right click on the Master Volume and add any type of automation you would like. Easiest would be to just add volume automation and then draw the curve over two seconds to fade in everytime the snapshot is called. The second option would be to add AHDSR Modulation and set the attack to 2 seconds.

I would recommend reading the FMOD manual in the install folder, its all explained in there in great detail.

Good luck!

(Brett Paterson) #6

I wouldn’t be concerned about volume, it’s basically the cheapest, almost free thing you can have.
I would definitely recommend handling the fade in yourself and not having the programmer do it, you can modulate any volume control with an AHDSR modulator.

It can fade in at the start, or if the programmer calls stop it can do a fade out as well with the ASDR release stage