9 Commits

Author SHA1 Message Date
bryan sefcik
7596c6e1c7 Updated unity build file sizes.
OnlineServicesCommon:
Before: 393216 | 103.984375s | 104.02s  | 1
After: 136608 | 107.375s | 54.30 | 2

MetasoundFrontend:
Before: 393216 | 126.703125 | 126.86 | 1
After: 294912 | 138.515625 | 80.14 | 3

AppFramework:
Before: 393216 | 86.28125 | 86.4 | 1
Before: 244912 | 110.296875 | 66.3 | 2

#jira
#preflight 63d1ca24450d5cdd0b150f60

[CL 23864797 by bryan sefcik in ue5-main branch]
2023-01-26 02:26:33 -05:00
Rob Gay
3dc8f2ddfe - Add ability to send MetaSound object parameter types that are not SoundWaves
- Cache Audio Parameters on AudioComponent properly so they can be modified prior to playback.
- Migrate AudioComponentParameterization to SoundGeneratorParameterInterface
- AudioComponent now inherits from SoundGeneratorParameterInterface
- Unify code path with default transmitter implemented in SoundBase for legacy SoundCue parameter system

Other Minor updates:
- Rename to "Audio Instance" to "Audio Parameter" for clarity

#rb phil.popp
#jira UE-123951
#jira UE-123979
#preflight 612d0053423a8f00012ba195

[CL 17355572 by Rob Gay in ue5-main branch]
2021-08-30 14:07:44 -04:00
dan reynolds
79b73d5ed7 NPC Vehicle Audio Controller Component and Preset
(phil only reviewed the metasoundfrontend change)

#rb phil.popp
[FYI] daniel.smith, rob.gay, zak.belica, noah.landis, jeff.farris
#preflight 6113f24172fe2c00018aa792


#ROBOMERGE-SOURCE: CL 17140167
#ROBOMERGE-BOT: (v855-17104924)

[CL 17140175 by dan reynolds in ue5-main branch]
2021-08-11 14:56:47 -04:00
aaron mcleran
777b4411a5 Making our modules optimized
#jira UE-112724
#rb none
#preflight 6067824d918c88000118e6d9

#ROBOMERGE-SOURCE: CL 15905854 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)

[CL 15907362 by aaron mcleran in ue5-main branch]
2021-04-02 20:38:21 -04:00
Ethan Geller
74b3b5c05b #jira UEAU-480
Initial implementation of the metasound transmission systems, as well as send and receive nodes.
#rb phil.popp

[CL 14272158 by Ethan Geller in ue5-main branch]
2020-09-08 14:13:51 -04:00
Ethan Geller
2ee51b0fa1 #jira UEAU-544
Support for UObject literals in metasounds.
#rb phil.popp

[CL 14109099 by Ethan Geller in ue5-main branch]
2020-08-13 19:07:41 -04:00
Rob Gay
ab72512ab2 Implement Translation Layer between Metasound Document Model & EdGraph Part 1
- Build EdGraphNodes from registry
- Display Metasound Metadata in custom details panel
- Fix namespacing
- Add input/output nodes scaffolding to MetasoundEditorGraph
#jira UEAU-527
#rb ethan.geller

[CL 13926036 by Rob Gay in ue5-main branch]
2020-07-22 14:52:03 -04:00
Ethan Geller
a03703a060 #jira UEAU-471
1) The node registry and METASOUND_REGISTER_NODE(FMyNodeType)
2) The datatype registry and REGISTER_METASOUND_DATATYPE(FMyDataType) (which I have to rename to METASOUND_REGISTER_DATATYPE)
3) Integration of literals, which are handled with FDataTypeLiteralParam and serialized out with FMetasoundLiteralDescription , and can be expanded to pass in a UObject*/TArray<UObject*> in the future
4) And finally, the full construction of an arbitrary graph to build operators out of in Metasound::Frontend::FGraphHandle::BuildOperator, which needs a sample rate/frame count per callback to work.

#rb rob.gay, phil.popp

[CL 13891250 by Ethan Geller in ue5-main branch]
2020-07-20 00:05:22 -04:00
Ethan Geller
acb32a298b #jira UEAU-467
Initial implementation of Metasound::Frontend. Includes all classes and abstractions for dealing with the metasound document tree and graph editing.

Overall super happy with the way this turned out, since it lets us support exporting metasound graphs, creating local subgraphs in a metasound graph, and other really cool things.

High Level:
1) a Metasound with any sorts of inputs and outputs can be created using a UMetasoundNodeAsset, which contains a struct called the FMetasoundDocument.
2) since it would be very easy to create a malformed FMetasoundDocument by just editing the struct directly, all editing of the FMetasoundDocument is done through a set of APIs: FGraphHandle, FNodeHandle, FInputHandle, and FOutputHandle
2) You can access the main graph for a UMetasoundNodeAsset with UMetasoundNodeAsset::GetRootGraphHandle(), which returns a Metasound::Frontend::FGraphHandle.
3) The FGraphHandle lets you do all sorts of things, including:
   i) Adding and removing nodes from the graph (AddNewNode/RemoveNode)
   ii) adding and removing inputs/outputs from a graph (AddNewInput/RemoveInput, AddNewOutput/RemoveOutput)
   iii) Get a handle to manipulate individual nodes in the graph (GetAllNodes/GetOutputNodes/GetInputNodes/GetOutputNodeWithName/GetInputNodeWithName)
   iv) Get any metadata associated with that graph (GetGraphMetadata)
   v) Create a subgraph that lives in the same document (CreateEmptySubgraphNode)
   vi) Export a graph to a new Metasound asset or JSON
   vii) compile that graph to an executable, playable, Metasound::IOperator (currently not all the way implemented in this CL but I'm getting to that tomorrow)
4) The FNodeHandle lets you manipulate any indivdual node on any given graph, primarily:
    i) Getting input pins (GetAllInputs/GetAllOutputs/GetInputWithName/GetOutputWithName)
    ii) get an FGraphHandle for the subgraph for this node if there is one (GetContainedGraph)
5) FInputHandle/FOutputHandle lets you manipulate individual input/output pins, primarily:
   i) Seeing if two pins can be connected (CanConnectTo)
   ii) Connecting two pins (Connect/ConnectWithConverterNode, the latter of which isn't implemented yet)

Mid Level (the metasound document model):
1) FMetasoundDocument is an aggregate and totally serializable to binary or text using the uproperty serializer.
2) A FMetasoundDocument owns a root class, which is it's primary graph, and a list of dependencies, which could be c++ implemented nodes, metasound graphs living in other assets, or subgraphs living in the current metasound document. the Dependencies list owns a list of any dependencies for the root class, as well as any nested dependencies (for example, if the root class has a subgraph that requires a C++ implemented sine osc, the subgraph and the sine osc will both be in the Dependencies array.
3) Each FMetasoundClassDescription contains that metasounds metadata, as well as a list of inputs and outputs for that metasound, and optionally a fully implemented graph.
4) If the metasound class description has a fully implemented graph, that graph is a list of FMetasoundNodeDescriptions, which themselves describe which nodes they are connected to.
5) Each FMetasoundClassDescription contains a list of uint32s corresponding to a dependency in the document's Dependency list.

Low level (how individual elements of the FMetasoundDocument are accessed and edited)
1) We can't hand out weak pointers to the FMetasoundDocument itself unfortunately, but We are able to enforce a strict visitor pattern using the class FMetasound::Frontend:: FDescriptionAccessPoint. Currently, uobjects like UMetasoundNodeAsset can hand out weak pointers to the FDescriptionAccessPoint, and the FDescriptionAccessPoint can return raw pointers to specific elements in the FMetasoundDocument using FDescriptionAccessPoint::GetElementAtPath. Since individual elements in the document can get moved around for a number of reasons (for example, we added or removed a dependency to the document, or a node to a specific subgraph), we enforce that specific elements get accessed via a path that doesn't cache specific indices or references to specific nested structs.
2) Paths to specific elements are saved as FDescPaths, which is basically an array of enums/uint32s/strings. I added some syntactical sugar using bracket overloads to more easily build out paths to specific elements. At first this looks whacky, but after a few uses it ends up being pretty easy to write paths using chained bracket operators. All paths start at a document type, and autocomplete does most of the hard work using a set of enums.

For example, to access a specific node on a specific subgraph (which is the most complicated use case):
FDescPath()[Path::EFromDocument::ToDepenencies][TEXT("MyCoolSubgraph")][Path::EFromClass::ToGraph][Path::EFromGraph::ToNodes][12 /* or whatever node id I want */];
3) Finally, Metasound::Frontend:::TDescriptionPtr wraps a weak ptr to a FDescriptionAccessPoint and a FDescPath and ends up getting used like a weak pointer. Under the hood though, it's enforcing a visitor pattern.
4) All of the big branching statements for following a FDescPath to a specific element in the metasound document is hidden in FDescriptionAccessPoint::GoToNext, which uses TVariants to cache the current step and go to the next step.
5) Most of the complicated parts of implementing FGraphHandle is dynamically adding and removing dependencies to documents and classes behind the scenes when we add/remove new nodes.
6) I also added support for basic undo/redo callbacks, but haven't explicitly added em yet to any specific handles.

#rb rob.gay

[CL 13829763 by Ethan Geller in ue5-main branch]
2020-07-02 23:05:41 -04:00