Course contentsShow
← Unreal Engine Game Development
Lesson 596 of 8808. User Interface and MetaSoundsFree lesson

Mapping Input Parameters for Dynamic Sound Control

Define and expose graph input parameters to enable real-time control over audio properties like pitch, volume, and filter cutoff frequencies.

In this lesson, you will learn how to expose MetaSound graph inputs to the Unreal Engine editor and gameplay code to achieve real-time control over audio properties like pitch, volume, and filter frequencies.

Defining Inputs in the MetaSound Graph

A MetaSound graph is essentially a specialized blueprint for audio. To make it dynamic, we must move beyond static connections and introduce Input Nodes. Within the MetaSound graph editor, you can right-click and create an Input node, selecting the appropriate data type—such as Float, Int, or Trigger.

By naming these inputs (e.g., PitchMultiplier or FilterCutoff), you create a bridge between the inner logic of your sound and the external world. Once created, these inputs appear in the Details panel of the MetaSound asset and can be referenced by the Audio Component or the MetaSound Source in your game.

Bridging Logic to Audio

When you drop a MetaSound into your level or attach it to an actor, the Audio Component gains access to those inputs. You can then use the Set Float Parameter node in your Blueprints to drive these values based on game state.

For example, to link a UI Slider to a filter cutoff, you would:

  1. Create a Float input in the MetaSound named LowPassFrequency.
  2. Connect that input to a Low Pass Filter node within the graph.
  3. In your UI or Actor Blueprint, use the Set Float Parameter node, providing LowPassFrequency as the In Name and your slider’s value as the In Float.
// Logic flow example:
// 1. MetaSound: Input(Float) -> LowPassFilter(CutoffFrequency)
// 2. Blueprint: AudioComponent -> Set Float Parameter(Name: "LowPassFrequency", Value: MySliderValue)

This approach is highly performant because the audio engine processes these parameter changes natively, allowing you to manipulate complex synthesis parameters smoothly without rebuilding the sound asset during gameplay. This is the cornerstone of responsive, reactive audio systems that mirror the intensity and state changes occurring in your game world.

Key Takeaway: By creating named Input nodes within your MetaSound graph, you turn static audio assets into dynamic instruments that can be modulated in real-time by game data, UI interactions, or player inputs.