This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine.SoundReverb Class

Inherits from: Node

This class is used to create reverberation zones for sound sources with reverberation flag. Such sound will have initial reflections, reverberation and echo. It can have modified pitch.

If the sound passes through two reverberation zones (for example, one reverberation zone around the player and another one around the sound source), the heard sound reverberation effect will be twice as strong.

Creating a Reverberation Zone#

To create a reverberation zone, first, create a sound source that will reverberate, then create an instance of the SoundReverb class and specify all required settings:

Source code (C#)
// create a sound source
	SoundSource sound = new SoundSource("static_mono_00.oga");
	sound.WorldTransform = MathLib.Translate(new Vec3(10.0f));
	// disable sound muffling when being occluded
	sound.Occlusion = 0;
	// set the distance at which the sound gets clear
	sound.MinDistance = 1.0f;
	// set the distance at which the sound becomes out of audible range
	sound.MaxDistance =10.0f;
	// set the gain that result in attenuation of 6 dB
	sound.Gain = 0.5f;
	// loop the sound
	sound.Loop = 1;
	// start playing the sound sample 
	sound.Play();

	// create a reverberation zone
	SoundReverb reverb = new SoundReverb(new vec3(10.0f));
	// set transformation
	reverb.WorldTransform = MathLib.Translate(new Vec3(10.0f));
	// set the threshold size that determines the distance of changing from partial to full reverberation audibility
	reverb.Threshold = (new vec3(1.0f, 1.0f, 1.0f));
	// set the other settings for the reverberation zone
	reverb.Density = 0.2f;
	reverb.Diffusion = 0.5f;
	reverb.DecayTime = 1.0f;
	reverb.ReflectionGain = 2.0f;
	reverb.LateReverbGain = 8.0f;

To update the settings of the created reverberation zone, you can simply call the corresponding methods when necessary.

See Also#

A set of UnigineScript API samples located in the <UnigineSDK>/data/samples/sounds/ folder:

  • sound_reverb_00
  • sound_reverb_01

SoundReverb Class

Properties

vec3 Threshold#

The current threshold size values along the coordinates axes relative to the reverberation zone size. It determines the distance of changing from partial to full reverberation audibility.

vec3 Size#

The current size of the reverberation zone.

float ReflectionGain#

The current gain controlling the amount of initial reflections relative to the general reverberation gain. If set to 0.0, the sound has no initial reflections at all.

float ReflectionDelay#

The current initial reflection delay determining the begin time of the first reflection from the source relative to the arrival time of the original sound.

float ModulationTime#

The current time for repeating the pitch modulation in the reverberation sound.

float ModulationDepth#

The current modulation depth determining the amount of pitch change.

float LateReverbGain#

The current gain controlling the amount of later reverberation relative to the general reverberation gain. If set to 0.0, the sound has no late reverberation at all.

float LateReverbDelay#

The current late reverberation delay determining the begin time of the late reverberation relative to the time of the initial reflection (the first of the early reflections).

float GainLF#

The current gain filter value for attenuating the reverberation sound at low frequencies. if set to 1.0, no filter is applied.

float GainHF#

The current gain filter value for attenuating the reverberation sound at high frequencies. if set to 1.0, no filter is applied.

float Gain#

The current gain controlling the overall amount of the initial reflections and later reverberations. if set to 0.0, the reverberation sound is muted.

float EchoTime#

The current time period for cyclic echo to repeat itself along the reverberation decay.

float EchoDepth#

The current depth value determining how long the cyclic echo persists along the reverberation decay.

float Diffusion#

The current diffusion determining the rate at which the reverberation resonances increase in density after the original sound.

float Density#

The current density of the resonances making up the reverberation sound.

float DecayTime#

The current reverberation decay time.

float DecayLFRatio#

The current ratio of low-frequency decay time relative to the time set by general reverberation decay time. The value 1.0 is neutral.

float DecayHFRatio#

The current ratio of high-frequency decay time relative to the time set by general reverberation decay time. The value 1.0 is neutral.

float AirAbsorption#

The current air absorption value determining the distance-dependent attenuation at high frequencies caused by the propagation medium.

float RoomRolloff#

The current scaling room rolloff factor determining attenuation of the reflected sound (containing both reflections and reverberation) over distance.

int ReverbMask#

The current bit mask that determines what reverberation zones can be heard. For sound to reverberate, at least one bit of this mask should match with the player's reverberation mask. At the same time, reverb mask of the sound source should also match with the player's one (but not necessarily in the same bit as this mask matches it).

Members


SoundReverb ( vec3 size ) #

Constructor. Creates a new reverberation zone of specified size.

Arguments

  • vec3 size - Size of the reverberation zone in units.

static int type ( ) #

Returns the type of the node.

Return value

Sound type identifier.
Last update: 2022-12-14
Build: ()