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

Implementing Additive Synthesis for Harmonic Control

Combine multiple sine wave oscillators and gain nodes to build a flexible additive synthesis engine for custom instrument design.

In this lesson, you will learn how to harness the power of additive synthesis by stacking multiple sine wave oscillators in a MetaSound graph to sculpt complex timbres from scratch.

The Core Concept: Summation

Additive synthesis is based on the principle that any complex sound can be constructed by layering simple sine waves at different frequencies and amplitudes. In MetaSounds, we move beyond single-oscillator designs by running several Sine nodes in parallel, each representing a specific "partial" or harmonic of your instrument.

Building the Harmonic Stack

To create a flexible engine, you don't just want one sine wave; you want an array of them. Inside your MetaSound graph, create a set of Sine nodes. To control them effectively, you should feed a single Frequency input into a series of Multiply nodes to generate harmonic intervals (e.g., multiplying by 2.0 for the octave, 3.0 for the perfect fifth).

Each oscillator should then pass through its own Gain node. This is the "harmonic control" aspect: by creating external Input parameters for each gain node, you can expose these as variables in your Blueprints. This allows your UI to dynamically adjust the intensity of specific harmonics in real-time.

Input: Base Frequency
   |
   +--> [Multiply 1.0] --> [Sine] --> [Gain 1] --+
   |                                             |
   +--> [Multiply 2.0] --> [Sine] --> [Gain 2] --+--> [Add] --> Output
   |                                             |
   +--> [Multiply 3.0] --> [Sine] --> [Gain 3] --+

Implementing Control

By routing these individual gain parameters to your UI sliders, you allow the player to physically "shape" the instrument's sound. For example, boosting the higher harmonic gains creates a brighter, metallic timbre, while isolating the fundamental frequency creates a pure, flute-like tone. Because these are MetaSound parameters, your UI-based Set Float Parameter nodes will update the sound instantly without needing to restart the audio component.

Key Takeaway: Additive synthesis transforms audio from a static asset into a dynamic instrument by allowing you to independently modulate the volume of individual harmonic partials via your UI parameters.