I’m french, so please excuse my poor english, and I hope I’ll be clear enough to explain my problem.
I’m working as sound designer for a 2D beat them up style game developped on Unity and I can’t figure out how to do something in Fmod Studio.
Let me explain…
My characters has multiple sounds for mouvement and voices. Each animation (like kicks, punchs, jumps, etc…) triggers a different Event for the movement and voice of the character.
I would like my character to be unable to have multiple “Vocal” Event at the same time, so you can’t hear two vocal sound overlaying… For exemple, I would like the scream sound from the event “punch” to cut the scream sound of the “kick” event.
I understood that the “polyphony” parameter in the event is useful to allow only a certain number of instance of ONE event, but a want a “group” of events to be allowed to be played only one at a time, and every new event triggered in that “group” to cut the previous one that was played.
How could I achieve this effect ?
The second part of my problem, is that there can be multiple instances of one type of character (like enemies, for example) on screen, and I would like each of them to be able to have only one “vocal” event playing at the same time, but each one of them to have is own ability to play “vocal” event, regardless of another character already playing an event.
Is there a way to do that in Fmod Studio, or should we do that in code ?
Thank you very much for your answers, and keep up the good work !
It’s possible to do what you describe in a number of ways. The easiest is to use a ‘programmer sound module,’ and to create a single event for each character that is used to play all the lines of dialogue for that character; As long as that event’s polyphony is low enough, it will prevent multiple instances of the event from existing at the same time. (More information on programmer sound modules can be found by searching for “audio table” and “programmer sound module” in our Programmer’s API Documentation and in the FMOD Studio Manual.)
Alternatively, you could create for each character a single event with a polyphony of 1, and control which line of dialog it plays when triggered via a parameter updated before the event plays, as in our “Explosions/Single Explosion” example.
As you’ve observed, just limiting polyphony will not allow you to have two instances of the same character speaking at once; You could work around it by placing the event I described above inside another event as an event reference sound module, and limiting the polyphony of the event reference sound module instead of the event that contains it. Then, you can simply create one instance of the parent event for each on-screen character, and re-trigger the event reference sound module every time the associated character needs to say something.
Ok, thank you for your answer. This seems to be working well , but when I re-trigger the event reference, I now have a small “click sound” due to the previous sound stopping. Is there a way to fade out the previous sound when restarting the event ?
I now have a new issue with the method you described. On some actions of my character, I want the vocal sounds to be triggered with a probability lower than 100%. I don’t want for the previous sound to be cut if no other vocal sound is played, so re-triggering the event is not a good solution, since it will cut the previous sound, and then play a sound or not, depending on the probability parameter
So I came up with this idea :
I create seperate events for each action of the character, with an event module with the probabilty parameter, witch contains the sounds I want to be played and a mixer snapshot ducking any other vocal events that i want to be cut by the new vocal sound.
I think It should work, but it seems a little bit complex and heavy for a large number of events… Is there a simplier way to achieve the desire behaviour ?