Mixer/Reverb Snapshot UE4 Integration not working.

Hello, and thank you for taking the time to read this! I really do appreciate it :slight_smile:

TL;DR: I can’t get Fmod Studio’s reverb snapshots to work correctly in Unreal Engine 4; the reverb tail is consistently cut off when Fmod Event is done playing.

Current documentation on how to implement Mixer Snapshots into Unreal Engine 4 is outdated and not very helpful for troubleshooting. This might be a bug, so I’m going to write this up as a bug. Sorry for the length and specificity of the Repro Steps, I just want to be as crystal clear as possible with my set up and what I’m experiencing.

Referenced capture_ images are linked at the bottom of this question.

STEPS TO REPRO:

  1. Extract the FMOD Studio UE4 Engine Integration for Windows/Android in Unreal Engine’s system Plug-In directory (in my case, this path is C:\Program Files (x86)\Epic Games\4.12\Engine\Plugins) (see capture_1.png)
  2. Launch Unreal Engine 4 and create New Project using the First Person template.
  3. Launch FMOD Studio and create a new project.
  4. In Windows Explorer create a new folder named “FMOD” in your Unreal project’s Content folder. In my case, this path is C:\UE4_Projects\audio_test_02\Content\FMOD. (see capture_2.png)
  5. In FMOD Studio, open Edit > Preferences and navigate to the Build tab.
  6. Set the Built banks output directory to the newly created folder named “FMOD” in your Unreal project’s Content directory. (see capture_3.png)
  7. Create a new single sound Event and remove the Reverb Send on the event’s Master track. In my case, I’m using a recording of a walkie talkie being clicked off. (see capture_4.png)
  8. Assign Event to Master Bank.
  9. In the Mixer window (Ctrl+2) create a Mixer Group and assign the Event mixer input to the new Group. I’ve labeled my group SFX.
  10. Add the following effects to the Mixer Group: Compressor, 3-EQ, and Send to Reverb. (see capture_5.png)
  11. In the Snapshots tab of the Mixer window, create a new overriding snapshot; I’ve labeled mine fmod_long_reverb.
  12. Select the Mixer Snapshot, right-click the Reverb Return track and select Scope In.
  13. Change the Reverb Time value of the Reverb effect to 10 (or some other noticeably large number).
  14. On the Mixer Group (SFX in my case) Scope In the Reverb Send and the Fader Volume.
  15. Make sure the Mixer Group and Reverb Return volumes are both set to 0 dB and set the Mixer Group’s Reverb Send to -12 dB.
  16. Make sure Reverb effect’s Wet Level is set to 0 dB and Dry Level is turned down to negative infinity.
  17. Right click the Intensity Snapshot Macro and Expose as Parameter. (see capture_6.png)
  18. Save project and Build the Master Bank.
  19. In your Unreal project, Create an Audio Volume. I’ve labeled mine “reverb_volume”.
  20. In the Details panel, under Reverb > Settings, assign your Mixer Snapshot to the Reverb Effect parameter and make sure Apply Reverb box is checked. (see capture_7.png)
  21. Switch to Geometry Editing mode (Shift+F5) and edit the size of the Audio Volume so that it encompasses the play area of the map. (see capture_8.png)
  22. In Content Browser, open the FirstPersonCharacter Blueprint Class, located in Content/FirstPersonBP/Blueprints.
  23. In the top right corner of the “Spawn projectile” comment box in the bottom portion of the blueprint, replace the Play Sound at Location and GetActorLocation nodes with Play Event at Location and GetActorTransform nodes, wiring up the logic as the other nodes were wired up. Make sure the FMOD Event is selected under the Event pin of the Play Event at Location node. (see capture_9.png)
  24. Save the Blueprint and the Unreal Map. The Blueprint might need to be recompiled.
  25. In the map, press Play (Alt+P) to test the map.
  26. Observe the reverb on the FMOD Event as you fire your weapon.

EXPECTED RESULTS:
When the gun is fired, the FMOD Event plays with a reverb tail of at least a couple full seconds. Since my Reverb Time parameter in the mixer snapshot is set to 10, and the mixer group’s reverb send is set to -12 dB in the mixer snapshot, I would expect to hear a reverb tail that lasts close to 10 seconds.

ACTUAL RESULTS:
When the gun is fired, the FMOD Event plays with hardly any reverb at all. If you spam the fire button you can kind of start to hear the reverb between the gun shots, but the reverb tail is abruptly cut off as soon as the Event is finished playing. It sounds like the reverb time was set to less than 1 second long.
:frowning:

IMAGES:

SOFTWARE VERSIONS:
Windows 7 Professional Service Pack 1
Unreal Engine 4.12.4
FMOD Studio 1.08.07, 64-bit, Build #77241

HARDWARE:
Intel Core i7-4790 CPU @ 3.60 GHz
32 GB of RAM
64-bit Operating System

Firstly thanks for the very clear and thorough repro steps. The problem is the same one mentioned here:

http://www.fmod.org/questions/question/fmod-convolution-reverb-cutting-off-tail/

That is, the event is finishing early and when it is destroyed, it is tearing down the mixer buses that are no longer referenced.

The workaround mentioned in that case is to lock the mixer buses so their lifetime is guaranteed. To make that easy in the UE4 integration, the next patch release adds an option bLockAllBuses that can be used to keep them alive for the duration of the play session.

Hey thanks for the answer! Do you happen to know if Studio::bus::lockChannelGroup can be called using Blueprints in UE4 or can it only be accessed using C++?

I haven’t added that one to Blueprints.

Geoff, thanks again for answering my questions, I really really appreciate it.

I’ve downloaded the FMOD Studio API for Windows and I’m currently pouring over the Compiled HTML Help File to figure out exactly how to call Studio::bus::lockChannelGroup on my reverb buses, as user Graeme Webb suggests.

After reading through the help file, I feel like I have a fairly solid grasp on what the concept of the Channel Group even is, and the fact that it is a low level layer that routes regular Studio buses, including for example the Return bus I’m using for my Reverb, but I have to come clean:
I’m really a very novice C++ user who just coincidentally happens to be in the process going through a beginning intro C++ programming manual before I even asked this question on here.

I’ve used FMOD Studio for a while now but I have yet to seriously use it with Unreal.

Since the FMOD System is clearly being initialized somewhere from Step 1 of my Repro Steps listed above, (and the “FMOD UE4 Integration.chm” Compiled HTML Help File currently doesn’t show any content on any of its pages, for some reason?), and I’ve been handling FMOD Studio calls via Blueprints thus far, I am unclear as to how to call this very specific C++ function in conjunction with Blueprints.

I haven’t needed to dig into any C++ code on my project so far, and according to the documentation for Studio::bus::lockChannelGroup (http://www.fmod.org/docs/content/generated/FMOD_Studio_Bus_LockChannelGroup.html), this function needs to be called in the “async thread” since by default FMOD Studio starts in asynchronous mode.

Given that I’ve implemented the FMOD Studio UE4 Integration packages in my Unreal Engine Plugins folder (as opposed to implementing it on a project-by-project basis), I’m very unclear as to where this async thread is, or which file in my project is initializing the FMOD System.

Ideally, from the documentation it seems like I’m supposed to be able to call this function once after the system initializes and not have to worry about it, just set it and forget it.

If this is the only reason I would need to write C++ directly, would you recommend creating a C++ source file specifically for this purpose? And if so, would I also need to initialize the FMOD System in this same source file? Or by contrast, is there an existing source file in my project that I can just edit directly and add a callback to this function?

Thanks again for your fast responses!

Also, given what I’ve stated above about my own C++ experience (or lack thereof), would you recommend that I use a previous version of FMOD Studio that doesn’t have this known bug?

Best thing to do is to wait until our next patch release, which will have the “Lock All Buses” setting to do it for you. We’re hoping to get a build out by the end of this week.

The latest FMOD release has a setting to lock all buses.