Hi everyone. I have emailed this question, but have posted it here in case this is a more appropriate place for the question.
I am working in FMOD Studio 1.07.04, wanting to create an adaptive piece of music which reacts when a character in the game dies.
The way I have set it up is like is:
Inside one event, I have a background piece of music that has been created at 127 bpm and the FMOD tempo marker has also been set to correspond at 127bpm. This music is designed to play throughout the level except when the character dies. At that point I want to trigger Fmod to switch to the death music in perfect sync with the background music and then return back to the background music when it has completed the death music piece.
I currently have a transition region set to transport the playbar to the start of the Death music when the transition parameter is set to 1. The problem I am having is getting Fmod to return to the background music when it has completed, as once it is set to 1 I can’t find a way to make it return to zero within FMOD (without physically moving/changing the parameter dial in FMOD Studio application).
I guess what I’m looking for is either an in FMOD parameter cooldown/reset or some sort of ability to automate a parameter to 0 when the death music finishes. Is there something that does this inside FMOD or do I need my programmers to work something into the code to make this happen?
If this is the case, does anyone have any code examples of how to make this work?
We are using the latest FMOD release 1.07.04 and accompanying programmer API/FMOD unity plugin. We are also using a mix of Macs and Pc’s to implement in UNITY 5.
Here’s an official FMOD video about adaptive music where they’re transitioning into and out of death music. I’m not sure if it’s exactly what you’re looking for, but hopefully it will help you out: https://www.youtube.com/watch?v=mt9fRuPc9c8
Thanks Joshua. I did watch that video before posting the question, but it wasn’t quite what I needed as it was more a question of controlling and toggling transition points rather than trying to use submixes to control eq automations etc.
However, after smashing my head against walls I now think I have sussed it by using a combination of logic transitions/parameters, sustain cues and keyoff commands in Unity.
Thanks for trying to help though Joshua. Much appreciated.
FMOD Studio does not currently support “oneshot” parameters. If the game sets a parameter value to 1, it will stay in that state until manually changed to a different value. So I think you’ll need to (get your programmer to) write some code to reset the parameter back to 0 once the Death music has commenced.
Probably the easiest way to do that is to note the time passed since the character last died. If that is less than, say 1 or 2 seconds, then set the Transitions parameter to 1. Otherwise, set the parameter to 0. The code should perform this logic on each update.
We are considering adding the concept of “parameter velocity” in a future release. I think something like that would provide a solution in your situation. You would setup the Transitions parameter with a downwards velocity. In Unity, the game would set the parameter to 1, the event would transition to the Death music, and the parameter would decay back to 0 automatically.
But for now, I think code is the easiest way.