Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
UE5 metasounds stuff

You can check out the Early Access version that has shipped but also follow along with development in UE5/Main on github. https://github.com/EpicGames/UnrealEngine/tree/ue5-main

MetaSounds are currently entirely written in a plugin and they can be extended by other plugins. Here's the MetaSound plugin source -- https://github.com/EpicGames/UnrealEngine/tree/ue5-main/Engine/Plugins/Runtime/Metasound

Probably the easiest way to experiment and get started is to just check out any of the existing MetaSound nodes and use them as a crib for how to make a new node. It's as easy as dropping in a new (single) cpp file in the project and compiling it. Check out specifically this folder: https://github.com/EpicGames/UnrealEngine/tree/ue5-main/Engine/Plugins/Runtime/Metasound/Source/MetasoundStandardNodes/Private

Here's, for example, the source for the stereo delay node: https://github.com/EpicGames/UnrealEngine/blob/ue5-main/Engine/Plugins/Runtime/Metasound/Source/MetasoundStandardNodes/Private/MetasoundStereoDelayNode.cpp

Note the boilerplate that is needed to define inputs/outputs, tooltips, vertex (pin) registration, types, defaults, etc. There is some boilerplate! One interesting technical detail of MetaSounds is that they feature "sample accurate" triggering for events through a special trigger pin type. Here's a node that shows that working:

https://github.com/EpicGames/UnrealEngine/blob/ue5-main/Engine/Plugins/Runtime/Metasound/Source/MetasoundStandardNodes/Private/MetasoundTriggerCounterNode.cpp Note the bifurcation of the render block using lambda's on the trigger reference

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mattetti
Copy link
Author

mattetti commented Jun 3, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment