UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
RingModulation.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "DSP/Osc.h"
8
9namespace Audio
10{
11 // Ring modulation effect
12 // https://en.wikipedia.org/wiki/Ring_modulation
14 {
15 public:
16 // Constructor
18
19 // Destructor
21
22 // Initialize the equalizer
24
25 // The type of modulation
27
28 // Set the ring modulation frequency
30
31 // Set the ring modulation depth
33
34 // Sets that the modulation buffer is external
36
37 // Set the dry level of the ring modulation
38 void SetDryLevel(const float InDryLevel) { DryLevel = InDryLevel; }
39
40 // Set the wet level of the ring modulation
41 SIGNALPROCESSING_API void SetWetLevel(const float InWetLevel);
42
43 // Process audio buffer
44 SIGNALPROCESSING_API void ProcessAudio(const float* InBuffer, const int32 InNumSamples, float* OutBuffer);
45
46 private:
47 SIGNALPROCESSING_API void UpdateScale();
48
50 Audio::FOsc Osc;
51 float ModulationFrequency;
52 float ModulationDepth;
53 float DryLevel;
54 float WetLevel;
55 float Scale;
56 int32 NumChannels;
57 TArray<float> ModulationBuffer;
58 };
59
60}
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
void Init()
Definition LockFreeList.h:4
Definition Osc.h:252
Definition RingModulation.h:14
SIGNALPROCESSING_API void SetExternalPatchSource(Audio::FPatchOutputStrongPtr InPatch)
Definition RingModulation.cpp:40
SIGNALPROCESSING_API void SetModulatorWaveType(const EOsc::Type InType)
Definition RingModulation.cpp:51
SIGNALPROCESSING_API ~FRingModulation()
Definition RingModulation.cpp:20
SIGNALPROCESSING_API void SetModulationDepth(const float InModulationDepth)
Definition RingModulation.cpp:62
void SetDryLevel(const float InDryLevel)
Definition RingModulation.h:38
SIGNALPROCESSING_API void SetWetLevel(const float InWetLevel)
Definition RingModulation.cpp:45
SIGNALPROCESSING_API void ProcessAudio(const float *InBuffer, const int32 InNumSamples, float *OutBuffer)
Definition RingModulation.cpp:68
SIGNALPROCESSING_API void SetModulationFrequency(const float InModulationFrequency)
Definition RingModulation.cpp:56
SIGNALPROCESSING_API FRingModulation()
Definition RingModulation.cpp:9
Definition Array.h:670
Type
Definition Osc.h:240
NO_LOGGING.
Definition AudioMixerPlatformAndroid.cpp:53