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

Mathematical Frequency Modulation in MetaSounds

Use mathematical nodes to perform frequency modulation synthesis for creating complex, evolving textures and non-linear audio patterns.

In this lesson, you will learn how to leverage raw mathematical nodes to perform frequency modulation (FM) synthesis, allowing you to generate complex, evolving textures by modulating one oscillator with another.

The Core Concept of FM Synthesis

At its heart, Frequency Modulation involves using the output of one signal—the Modulator—to influence the frequency of a second signal—the Carrier. By mapping a Modulator’s output to the Frequency input of a Carrier oscillator, you shift from simple sine or saw waves into the realm of rich, non-linear harmonic sidebands.

Unlike simple additive synthesis, FM allows you to create metallic, organic, or bell-like textures that evolve dynamically based on the modulation index.

Implementing FM in MetaSounds

To build this, you need two Sine (or Saw) oscillators and a Multiply node to control the modulation depth.

  1. The Modulator: Create a Sine node running at a lower frequency.
  2. The Depth Control: Pass the Modulator output through a Multiply node. This acts as your Modulation Index, determining how drastically the Carrier's pitch is warped.
  3. The Carrier: Add a second Sine node. Take your Carrier's base frequency (e.g., 440Hz) and add the result of your Multiply node to it. Connect this sum to the Frequency input of the Carrier.

Your graph structure will look like this:

[Modulator Sine] -> [Multiply (Index)] -> [Add]
                                             |
[Base Frequency] ------------------------> [Add] -> [Carrier Sine] -> [Output]

Why Use Math Instead of Modulators?

While MetaSounds includes built-in modulation components, using raw math nodes provides full control over the Phase and Linearity of the modulation. For example, if you feed a Random node into the Modulator's frequency, the resulting "frequency jitter" creates non-linear, unpredictable audio patterns that sound more natural and less like a standard LFO. By adjusting the modulation index via an input parameter linked to your UI, you can allow players to "morph" the timbre of a sound in real-time, effectively linking your UI systems to the internal synthesis logic.

Key Takeaway: Mathematical FM synthesis transforms simple oscillators into complex, evolving soundscapes by using the output of a modulator to dynamically shift the frequency of a carrier oscillator via an adjustable modulation index.