Build Sound with AI
A guided example: search the MetaSound node library, build a MetaSound source and a reusable patch, build a Sound Cue with wave files and random weighting, and check both will actually make sound.
A guided example: search the MetaSound node library, build a MetaSound source and a reusable patch, build a Sound Cue with wave files and random weighting, and check both will actually make sound.
This walkthrough builds sound two ways: a MetaSound that generates a tone as it plays, and a Sound Cue that picks between wave files. Both work the same on Unreal Engine 5.6, 5.7 and 5.8. Every audio command is listed in the Audio reference.
MetaSound node names are not guessable, so start by searching for the idea rather than the spelling. You can ask several things at once and the results come back ranked, then read the exact pins off whichever one you want.
Several keywords in one call. Matches author keywords too, and ignores spacing and case.
cfa search_metasound_nodes --queries "sine,filter,delay,envelope" --max-results 5Every input and output with its type and default. Batch several nodes in one call.
cfa describe_metasound_node --node-classes "Sine,Ladder Filter,AD Envelope"A source is playable and takes an output format. Build the whole graph in one call: the nodes, the values on their pins, the connections, and the graph inputs you want to control it with. It comes back laid out.
One-shot by default. Pass --one-shot=false for a sound that loops until something stops it.
cfa create_metasound --name MS_Tone --path /Game/Audio --output-format Mono --one-shot=falseNodes, pin values, connections and graph inputs in a single call, then laid out automatically.
cfa build_metasound_graph --metasound-path /Game/Audio/MS_Tone \
--graph-inputs '[{"name":"Frequency","data_type":"Float","default":"220.0"}]' \
--nodes '[{"id":"osc","node_class":"UE.Sine.Audio"}]' \
--connections '[{"from_node":"Frequency","from_output":"Frequency","to_node":"osc","to_input":"Frequency"},
{"from_node":"osc","from_output":"Audio","to_node":"UE.OutputFormat.Mono.Audio:0","to_input":"Audio:0"}]'Reports an output nothing writes to, an input with nothing behind it, and an empty graph.
cfa validate_metasound --metasound-path /Game/Audio/MS_Tonecreate_metasound takes --one-shot=false rather than a loop flag. You can change it later with set_metasound_interface.A patch is a MetaSound you drop into other MetaSounds as a single node. Build a voice, a filter chain or a sequencer once, then place it anywhere and give it different settings each time. Refer to it by its asset name.
Same build commands as a source, but it has no output format and is not playable on its own.
cfa create_metasound --name MSP_Voice --path /Game/Audio/Library --type patchName the patch where you would name any other node class.
cfa build_metasound_graph --metasound-path /Game/Audio/MS_Song \
--nodes '[{"id":"v1","node_class":"MSP_Voice","inputs":{"Gain":"0.5"}}]'A Sound Cue picks and layers existing wave files. Build the tree, assign the waves, and set any value on any node in the same call. Use root as a parent to feed the cue output.
An empty Sound Cue asset.
cfa create_sound_cue --name SC_Footstep --path /Game/AudioNodes with their waves and per-node values, then the parent and child links. Laid out when it finishes.
cfa build_sound_cue_graph --sound-cue-path /Game/Audio/SC_Footstep \
--nodes '[{"id":"rand","node_class":"Random","properties":{"Weights":[0.6,0.4]}},
{"id":"w1","node_class":"WavePlayer","sound_wave":"/Game/Audio/SW_Step1"},
{"id":"w2","node_class":"WavePlayer","sound_wave":"/Game/Audio/SW_Step2"}]' \
--connections '[{"parent":"root","child":"rand"},
{"parent":"rand","child":"w1","child_index":0},
{"parent":"rand","child":"w2","child_index":1}]'Any editable property on any node, including nested paths and array entries.
cfa set_sound_cue_node_properties --sound-cue-path /Game/Audio/SC_Footstep --node-id SoundNodeRandom_0 \
--properties '{"bRandomizeWithoutReplacement":true}'Reports a missing root, unreachable nodes, empty child slots and wave players with no wave.
cfa validate_sound_cue --sound-cue-path /Game/Audio/SC_Footstepcfa get_sound_cue_node lists every editable property on a node with its type and current value, so you never have to guess a property name.Attenuation, concurrency, sound classes, submixes, buses and effect presets are all created by class name, with their settings passed in the same call.
See cfa list_audio_asset_types for everything your project can make.
cfa create_audio_asset --class-name SoundAttenuation --name ATT_Footstep --path /Game/AudioRe-lays out a MetaSound or a Sound Cue, measured from the real editor, routing wires around nodes.
cfa layout_metasound_graph --metasound-path /Game/Audio/MS_Songexport_graph, build_graph, diff_graph and apply_graph_patch using --domain metasound or --domain soundcue. Pull a graph out as one document, edit it, and apply just the difference back.