Hello there everyone on FMOD communities.
First time here and FMOD really helps me but anyways I got two questions to ask.
First question :-
I got two audio (which is a SFX), one is normal and the other one is distorted. What I wanted to do is that when you are playing the music box (it will play the normal one) but when there’s a monster coming to the music box (on distance) it will change the audio to the distorted version but on real time. Meaning if the normal one is playing at for example (10 seconds) and the monster is coming to the distance of the player, the distorted version will be started to play on the (11 seconds). And also the volume become more higher as the monster coming close to the music box.
Second question :-
How do you make a BGM that plays on the background and change volume for example the value of 1 to 0.5 when you are using a music box which is a SFX. And change back the volume when not using the music box.
Third question :-
Anyone knows where and how to use FMOD to play a certain event based on parameter set in FMOD studio on UE4 C++?
This souns like it can be solved by using a Snapshot in Studio.
A snapshot is an instanceable unit of changes to the project mix that can be triggered, controlled, and stopped from game code. Each snapshot represents a different way your game’s mix can change in response to the circumstances in your game as it runs. https://fmod.com/resources/documentation-studio?page=glossary.html#snapshot
For example: Your music is playing as normal, then a monster starts to approach the player. This could trigger the distorted sound to start and also trigger the Snapshot to start. As the monster gets closer to the player, you can increase the snapshots intensity which will decrease the volume of the normal music and increase the volume of the distorted sound. https://fmod.com/resources/documentation-studio?page=mixing.html#triggering-snapshots
But how do you change the distance between monster and player. As i wanted the sohrce of sound from the player but the distoetion will only start if the monster is coming near the player. Sorry I replied late.
Snapshots can have parameters, and these parameters can be updated from your game’s code just as the parameters of an event can be. Snapshot parameters can be used to automate the properties scoped into the snapshot, as well as the snapshot’s intensity.
Alternatively, you could trigger the snapshot by using a snapshot instrument in the monster event, and automate the snapshot instrument’s intensity on the monster event’s distance parameter. This method is less flexible and customizable than the above, but is much easier to implement.
Alright ladies and gentleman’s. I managed to do it. This task was delayed as I was doing other task, that’s why I’m late reply. My bad.
Here’s how I did my stuff if anyone wants to use it as reference.
(As I cannot upload pics I share it using drive links.)
(1) So first was setting up the FMOD Studio. I use 2 audio which contains Normal Music Box and Distorted version Music Box on the same events. https://drive.google.com/open?id=1nqK3m9m_fynVEsFw3pCCILOzsdPwRpKc
I used compressor and sidechain to transition the main BGM to lower the volume as the music box is playing.
(5) Then inside the blueprint music box I have a event begin play in which will call the monster on game instance to play event attached to ask is it valid while returning a value for the audiocomp. https://drive.google.com/open?id=1-hn1JxbdE1aXICUXVlG8yiHkBELX_Ckr
(6) From the update state there’s powered on and powered off. This is what my team set for the animation state when it’s called. When powered off it will set the state for music box to pause as well. https://drive.google.com/open?id=16hqCIUWtBGn8RpA07nw3qx_xFpY2TgtD
If there’s no pics anyone that interested can message me, I can help
Also thank you to the people who helped me before on giving tips about using snapshots.