[UE5] MetaSounds Basics: Changing Pitch While It Plays, with an Engine Sound Experiment

Created: 2026-07-20Last updated: 2026-09-06

From how it differs from Sound Cue, through creating a MetaSound Source and the roles of trigger, audio, and data. Builds a looping engine sound and changes its pitch with the N key using an Input and an Audio Component.

Press the accelerator and the engine pitch rises; release it and it settles back. Game audio that changes with input conveys motion far better than simply playing a clip.

MetaSounds is the mechanism for building playback and processing with nodes. This article keeps one engine sound playing and raises its pitch only while a key is held. We build no vehicle movement; we test small, so that a game-side value reaches the playing sound .

Pressing N raises the engine pitch and releasing returns it

What You'll Learn

  • Comparing where Sound Cue and MetaSounds fit
  • Telling apart the wires carrying play signals, audio, and settings
  • Looping an engine sound and changing its pitch with N
  • Smoothing the value change for an accelerating feel

This assumes you can create a Blueprint Actor and connect nodes. To review importing audio into UE, start with the Sound Wave and Sound Cue article.

Sponsored

Versus Sound Cue: how much of the sound you build

A Sound Cue assembles playback: choosing among prepared clips, mixing them, changing volume and pitch. "Pick one of three footsteps" takes only a few nodes.

MetaSounds can play the same clips. On top of that, you build generating sound from waveforms and processing audio signals yourself. "Raise the engine pitch while blending in wind", for instance, is several changes in one graph.

Sound Cue assembles playback while MetaSounds builds processing and synthesis too
What you want to buildHow to choose
Pick footsteps randomly and vary the pitch slightlySound Cue can do it
Generate sound from waveforms or noise and combine processingConsider MetaSounds
A Sound Cue that already works fineKeep using it if nothing needs changing

It is not that only MetaSounds can change values during playback. Sound Cue also has named parameters for changing pitch and more. Here we learn to receive one number as a first step in building sound with MetaSounds.

Start by creating a Source

We test in the Third Person Blueprint template . Prepare one .wav of an engine running at a steady pitch. A few seconds with clean loop points works well. Without one, another sustained mechanical sound also lets you test pitch changes.

For consistency, use a Mono (single-channel) clip and name the imported Sound Wave SW_EngineLoop . If you use a Stereo clip, match the Wave Player and output format to Stereo as well.

Right-click empty space in the Content Browser, choose "Audio > MetaSound Source", and create MS_EngineDemo . If MetaSound entries are missing, check the MetaSound plugin is enabled under "Edit > Plugins".

The similarly named MetaSound Patch is a part used from other MetaSounds. It gathers, say, shared wind processing for use in several sounds. Splitting them as Source is the sound you play and Patch is a part used inside it makes the first choice clear.

The relationship between a MetaSound Source you play and a Patch shared inside Sources

Loop a sound with Wave Player

Open MS_EngineDemo and first play the sound without changing pitch.

  1. Select "MetaSound" in the toolbar and set "Output Format" in Details to Mono .
  2. Remove UE.Source.OneShot in the "Interfaces" panel. That is the setting for "a sound ending after playing once". We play until stopped, so we do not use it.
  3. Right-click empty graph space and add Wave Player (Mono) .
  4. Choose SW_EngineLoop for "Wave Asset", turn "Loop" on, and set "Pitch Shift" to 0 .
  5. Connect On Play 's output to the Wave Player's Play , and the Wave Player's Out Mono to the graph's Out Mono .
A minimal loop connecting On Play to Wave Player's Play and Out Mono to the audio output

A Wave Player actually plays a Sound Wave. On Play is the signal when this MetaSound's playback starts. That signal drives the Wave Player, and the sound it produces reaches your ears through Out Mono .

Press the toolbar's play button and repeating audio means this stage worked. Stop and save. If you hear a click at the loop point, also check the clip's own loop point. Turning Loop on does not make any clip join smoothly.

Reading the wires: trigger, audio, and data

Graph wires are easiest to read by what they carry. Even the minimal example above has three roles.

RoleWhat it carriesOur example
TriggerThe signal "start playing now"On Play → Play
AudioThe sound reaching your earsOut Mono → Out Mono
DataClips and setting valuesWave Asset , Pitch Shift

Triggers act when a signal fires, and audio flows continuously during playback. Connecting only the start signal produces no sound; you also connect the audio output.

MetaSound wires come in trigger, audio, and data. Connecting only the signal produces no sound

Data has types too, and Pitch Shift is a Float (a number with decimals). It is a different kind from Wave Asset , which specifies a clip, so connect by pin name and type. Some combinations offer conversion nodes, but here connecting numbers to numbers and audio to audio is enough.

Sponsored

Create an Input and try the pitch

Next we make Pitch Shift changeable from outside. An Input is a MetaSound's entry point for receiving values from outside. We prepare one entry for "how much to shift the pitch".

  1. Drag from the Wave Player's Pitch Shift input pin into empty space and choose "Promote to Graph Input".
  2. Select the created Input and name it PitchOffset under Details' "General > Input".
  3. Confirm the type is Float with default 0 and turn "Is Constructor Pin" off.

Constructor Pin is for deciding a value before playback. We change it while playing, so it stays off. Values you want to receive from outside go in Inputs , not "Variables".

Passing the Float Input PitchOffset to the Wave Player's Pitch Shift

Pitch is how high a sound is. The Pitch Shift here is in semitones , the step to the adjacent key on a piano, black keys included.

PitchOffsetHow it sounds
0The original pitch
6Six semitones higher
12One octave higher

0 does not mean silence; it means no pitch shift . An Audio Component's Pitch Multiplier is a multiplier whose original is 1 . The names are similar but the baselines differ.

You can test before building any Blueprint. Select PitchOffset and set "Editor Options > Widget" to "Slider" with a range of 0 to 6 . With the MetaSound playing, drag the slider on the Input from left to right. Rising pitch, and returning when you drag back, means the chain from Input to Wave Player works. After stopping, set the default back to 0 and save.

Hands-On: change the sound with the N key

Now we replace the editor slider with an in-game key. An Audio Component is the playback part attached to an Actor. It is also the party you tell "change to this value" for a playing sound.

Place an Actor that plays the sound

  1. Create a Blueprint BP_EngineAudioDemo with Actor as its parent.
  2. Add "Audio" from "Components > Add" and name it EngineAudio .
  3. Select EngineAudio and set the following.
SettingValueWhy
SoundMS_EngineDemoUses the sound we built
Auto ActivateOnPlays when the game starts
Volume Multiplier0.4Starts at a modest level that is easy to compare
Pitch Multiplier1.0Pitch is changed on the MetaSound side
Allow SpatializationOffThis experiment adds no directional change
Attenuation SettingsNoneDo not quiet it with distance
Override AttenuationOffDo not use custom distance settings either
The Actor's EngineAudio playing MS EngineDemo and passing the value from the key to that sound

Search for Auto Receive Input in "Class Defaults" and set it to Player 0 , so this Actor receives the first player's key input. After compiling and saving, place exactly one BP_EngineAudioDemo in the level.

Play the level, confirm the sound keeps playing, then stop. If nothing plays, review the MetaSound preview alone and the Audio Component's Sound before building key logic.

Send 6 on press and 0 on release

In BP_EngineAudioDemo 's Event Graph, right-click empty space and add a keyboard N event. Pressed is the moment you press and Released the moment you let go.

Drag EngineAudio from "Components" into the graph to place a getter node. It is the reference specifying which playback part to command. Create Set Float Parameter from its output pin and place a second identical node.

Wire the Pressed side first. Brackets in the diagram mark input fields, so enter only PitchOffset for the name.

Running Set Float Parameter from N's Pressed, sending PitchOffset 6 to EngineAudio

Then wire the same N event's Released side to the other Set Float Parameter. The diagrams split the paths, but you do not create two N events.

Running the other Set Float Parameter from the same N's Released, returning PitchOffset to 0
Connection / settingThe press nodeThe release node
Exec inputFrom N's PressedFrom N's Released
TargetFrom the EngineAudio getterFrom the same EngineAudio
In NamePitchOffsetPitchOffset
In Float6.00.0

Set Float Parameter sends a number by name. Copy the MetaSound's Input name exactly into In Name and put the value in In Float . Rather than targeting the MS_EngineDemo asset directly, send it to the EngineAudio playing that sound .

Compare and confirm how the value arrives

After compiling and saving, Play the level, click the game window once, and press N .

  • While not pressed : it plays at the original pitch
  • While pressed : the pitch rises
  • The moment you release : it returns to the original pitch

No logic recreates the sound on each press. We send 0 and 6 to one sound that has been playing all along.

To confirm the mechanism, temporarily change the press In Float to 12 . Hearing it go higher means the number reaches the sound. Then change In Name to PitchOffset_Test and the pitch stops changing, since no matching Input exists. Set the name back to PitchOffset and the value to 6 afterwards.

When it does not workWhere to check
Silent even in the MetaSound previewThe Wave Asset assignment, the On Play to Play wire, the Out Mono wire
Plays alone but silent in gameWhether the Actor is in the level, the Sound and Auto Activate settings
Plays but N changes nothingAuto Receive Input, game window input focus, Target and In Name
Changing the Input does nothingWhether it is under Inputs, the wire to Pitch Shift, Is Constructor Pin off
It stays high after releaseThe Released side's exec wire and In Float = 0
Sounds overlapWhether the preview stopped, whether several Actors are placed

If unsure whether key input arrives, temporarily connect a Print String to the N event to separate an audio problem from an input problem.

Sponsored

Smooth out the abrupt change

As is, the pitch snaps the instant you press. Taking a little time to rise feels like engine revs climbing.

We use MetaSound's InterpTo , the node approaching a target value from the current one over a specified time. Filling in values between like that is called interpolation .

In MS_EngineDemo , disconnect the direct wire from PitchOffset to Pitch Shift and insert an InterpTo between them.

PitchOffset into InterpTo's Target, Value into Pitch Shift, changing pitch over 0.2 seconds
  • PitchOffset → InterpTo's Target
  • Interp Time = 0.2 seconds
  • InterpTo's Value → the Wave Player's Pitch Shift

Play again and press and release N; both the rise and the return become smoother. Setting Interp Time to 1.0 slows the change and makes the difference easier to hear. You do not resend from Blueprint every frame. After the target value changes, the value moves inside the MetaSound.

Bonus: random footsteps and where to go next

For one-shot footsteps, choose and then play

A looping engine and a one-shot footstep end differently. To build a separate footstep Source MS_FootstepRandom , keep UE.Source.OneShot and connect the Wave Player's On Finished to the graph's On Finished , telling it "the clip finished, so this sound may end". Use Mono for Output Format here too, with three Mono footstep clips.

To pick among several clips, use Random Get (WaveAsset:Array) . An array is a list of clips such as SW_Footstep_01 through 03 . Next picks one, outputting the chosen clip on Value and the done-choosing signal on On Next .

Passing Random Get's chosen clip to Wave Asset and On Next to Play, plus wiring the one-shot's ending

Under the footstep Source's "Members > Variables", add a variable Footsteps typed WaveAsset with array on. Add three default elements with your clips and drag Footsteps into the graph to connect it to In Array . Wire On Play → Next , On Next → Play , and Value → Wave Asset , with the Wave Player's Loop off. Connect the Out Mono audio too.

"Which clip was chosen" and "the done-choosing signal" are different wires. Reading them separately is how the trigger's role clicks. No Repeats = 1 avoids the previously chosen element. If footsteps play as separate playbacks each time, also turn on Enable Shared State to share the selection history.

Save and preview and a footstep plays once and ends. Firing it at the moment the foot lands in an animation is the same as the footstep hands-on in the Sound Cue article. You can specify this Source as the Sound played there.

There is more than one way to prepare an Audio Component

We added an Audio Component to an Actor. You can also play on demand with Spawn Sound 2D or Spawn Sound Attached and use the returned Audio Component. Play Sound 2D and Play Sound at Location have no such return value, so when you want later control, choose a playback method that leaves you an Audio Component.

Beyond numbers, you can also send "start this now" signals. Create a Trigger Input on the MetaSound and specify the same name with Execute Trigger Parameter on the Audio Component. Use Float for volume and pitch adjustments and Trigger for one-time signals, split by role.

Connect game values to sound

Replace the N key's 0 / 6 with values derived from vehicle speed or throttle and you have an engine sound responding to input. To make the sound come from the vehicle's position, go to the attenuation and 3D sound article.

The same Input mechanism, changing several sounds' volumes, also builds music that is quiet while exploring and adds instruments in combat. The interactive music article covers how to assemble that.

Here, "the entry's name", "the Audio Component to send to", and "the value to change" together let us operate a playing sound. For your own game, think about which value conveys motion when connected to audio.

Summary

  • Sound Cue "chooses and plays prepared audio"; MetaSounds "builds the sound itself"
  • Wires mean different things for signals, audio, and settings
  • Passing values in lets you change pitch and speed while it plays
  • Smoothing abrupt changes makes it feel less mechanical

The question when choosing is "do I want to change how it plays, or build the sound itself?" Cue is enough for the former.

The difference between clips and blueprints is in Sound Wave and Sound Cue, and distance and volume in attenuation and mixing.

Reference: MetaSounds Quick Start, MetaSounds Reference Guide, MetaSound Function Nodes, Sound Cue Reference.

Unreal Engine Notes in this section98