How to have a track fade in at a specific time during a timeline?

Hi everyone,

I have an event setup with a timeline that has 4 tracks. I have 3 parameters setup that can fade in/out 3 of the 4 tracks to add variety/depth depending on what part of the game the player is at.

I was wondering if there is a way to setup a marker or region somehow that would allow me to fade in the track when the marker/region is reached on the timeline? For example, let’s say the game triggers the “fade in” parameter for the strings layer, but I don’t want it to fade in until the second half of the song, and it triggered at the beginning. I’m sure this can be done in code, but is there a way to take care of this easily in FMOD?

Thanks in advance!

Have you considered automating the volume tracks or instruments on the timeline? If you automate the volume of instruments on your controlling parameters but the volume of the audio tracks on the timeline such that the track is silent before the second half of the song, you should get the behavior you described.

Hi Joseph,

I see what you’re saying and that totally would work with what I described but I left out some details. I would want the track to be able to be looped, and if the string part that we faded in is also looped I would want the beginning of the track to be audible when looped. So I would want it to be possible to have each layer be audible the entirity of the timeline sometimes but also have only one part of it be audible under certain conditions.

1st play of track - Only background layer is audible
2nd play of track - Background and strings are audible, strings fades in at desired point (not sure how to do that)
3rd play of track - Background, strings and winds are audible, background and strings are audible the whole track, winds fade in at desired point.

Does that make sense? Not sure if this is possible or not

It’s definitely possible, and only a step more complex. All you need is a way of adjusting the volume of certain signals at the end of specific loops in such a way as to ensure they’re guaranteed to be inaudible on the first playthrough, but become audible on subsequent playthroughs.

One easy way would be to use a command instrument set to “increment parameter” mode, such that it increases the value of a parameter at the end of each loop. If you give that parameter a seek speed (to ensure the change in value is ramped rather than instant) and use it to automate the volume of instruments or tracks, you should be able to get the behaviour you described.

For an example of a parameter being used to automate the volume of multiple tracks in a piece of music, I recommend looking at the “Music/Level 02” event in the “examples.fspro” project included with each installation of FMOD Studio.

Thanks so much Jospeh, I will look into your suggestions! I really appreciate your time in responding.

Do you happen to know of any source material for learning about command instruments? I tried to look on YouTube and google but couldn’t really find anything helpful.

You can read about command instruments in our documentation. if you have any questions that our documentation doesn’t answer, please don’t hesitate to ask us.

Thanks Joseph. I do have another question if you don’t mind.

So I set up a command instrument with the “Increment Parameter” command type and have the target as one of my parameters that sets my track volume from -infinity to 0 db. However I don’t know how to trigger the command event at the end of a loop. Also, not sure if I am following what you suggested properly, let me know if I’m misunderstanding.

Command instruments are triggered in the same manner as other instruments: When the playback position overlaps them and their parameter conditions are met, they trigger. Thus, if you want the command instrument to trigger at the end of a loop region, put it at the end of that loop region such that the playback position hits the command instrument right before it hits the end of the loop region.

Okay that makes sense. Can I walk you through my thinking to see if I am understanding?

I currently have my project setup with 3 parameters that each correlate to a layer of my total track. Bringing one of these parameters (Pianos for example) to “1” takes the Pianos track from -infinity to 0 db, fading it in. Am I correct in thinking that I would need a command instrument for each of these different layers? Each command instrument would then require an additional parameter set as a “condition” maybe called “CanFadeInPianos” (for example) which would then be triggered by game code. Once triggered it would set my the Pianos parameters to 1? Seems like a lot of parameters and command instruments just to get this working, but maybe I am over complicating it. Is there a simpler way? Thanks for all your help, Joseph. I included a picture to show my current setup without adding additional conditions yet.

Maybe: If you want to control each layer separately, then you will need one parameter for each layer, and one command instrument for each parameter. On the other hand, if you are willing to automate multiple layers on the same parameter, you will need only one parameter for all of those layers, and thus only one command instrument. Without knowing more about what behavior you’re trying to achieve, I’m afraid I don’t know which is more appropriate for your event.