FMOD UE4 Changing audio on the same time, how to lower the BGM when SFX playing and using FMOD on C++ UE4

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.

(2) Next was setting parameter, I use a custom parameter in which the normal music box is being played first and will lerp to distorted version as its getting closer to the monster.
https://drive.google.com/open?id=1nrWOPybUWqXwA-8YfgxlqVHxOjMFYmPV

(3) Then build the events for UE4. I put a notify when to play the music box on the anim event notify on its animation timeline.
https://drive.google.com/open?id=14BlUEXPcXFyI6HOQKR4lD8vTsD-iUbAZ

(4) Then use the anim notify from the animation timeline to call the function of PlayMusicBox inside the Animation Blueprint as you cannot call anim notify inside Blueprints.
https://drive.google.com/open?id=1CpYBrdhVxD10YuhC35z-YTtq1_ms4kAY

(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

(7) This is the event tick to check the monster distance so that the parameter can be played from to the UE4.
https://drive.google.com/open?id=1dxaSLaKgj19DpCI2xZAYmJM8Fh7DoOyZ

(8) The PlayMusicBox function.
https://drive.google.com/file/d/10nJy9ivHBDIbaTUf5DC81K4cryZv1qY0/view?usp=sharing

(9) This is the update music box distance event to check whether we are closed to the monster and set to lerp to distort music from normal one.
https://drive.google.com/open?id=12J8X99x_Fy0-mP2Rn7xytiOtw9NIrMce

(10) Here’s where I set my variable.
https://drive.google.com/open?id=1hiMj7JTNINSE7qlZIICVea7X-Z_w_Z1d

If there’s no pics anyone that interested can message me, I can help :smiley:
Also thank you to the people who helped me before on giving tips about using snapshots.

1 Like