Skip to main content
Version: 2.x

UOdinVolumeEffect

Codec-Effect for the odin audio pipeline. The effect will mutate samples buffer with logarithmic or exponental scale. Provides a simple way for an audio boost functionality. For more complex amplitude checkout dBFS and override the custom effect function.

Declaration
UCLASS(ClassGroup = Odin)
class ODIN_API UOdinVolumeEffect : public UOdinCustomEffect

Overview​

Properties​

NameDescription
SampleScaleLinear factor the samples are multiplied by, or the gain in decibels if Volume Log10 is set.
ScaleExponentExponent applied to Sample Scale in linear mode.
VolumeLog10If set, SampleScale is a gain in decibels (e.g.
UserData

Functions​

ConstructVolumeEffect​

Static · Blueprint: Construct Volume Effect

Creates a Volume Effect that is not part of a pipeline yet; add it with Insert Custom Effect. Create Volume Effect on a pipeline does both steps.

UFUNCTION(BlueprintCallable, Category = "Odin|Audio Pipeline|Effects")
static UOdinVolumeEffect* ConstructVolumeEffect(UObject* WorldContextObject, float scale = 1.0f);
ParameterTypeDescription
WorldContextObjectUObject*
scalefloatInitial value of Sample Scale. Default: 1.0f.

Returns UOdinVolumeEffect*

Properties​

SampleScale​

Blueprint: Get/Set

Linear factor the samples are multiplied by, or the gain in decibels if Volume Log10 is set.

UPROPERTY(BlueprintReadWrite, Category = "Odin|Audio Pipeline|State")
float SampleScale = 2.0;

ScaleExponent​

Blueprint: Get/Set

Exponent applied to Sample Scale in linear mode.

UPROPERTY(BlueprintReadWrite, Category = "Odin|Audio Pipeline|State")
float ScaleExponent = 1.0;

VolumeLog10​

Blueprint: Get/Set

If set, SampleScale is a gain in decibels (e.g. -6 halves the amplitude) instead of a linear factor.

UPROPERTY(BlueprintReadWrite, Category = "Odin|Audio Pipeline|State")
bool VolumeLog10 = false;

UserData​

TOdinCustomEffectUserData<UOdinVolumeEffect> UserData;