2021-02-23 20:16:28 -04:00
// Copyright Epic Games, Inc. All Rights Reserved.
# include "Internationalization/Text.h"
2021-04-05 20:22:19 -04:00
# include "MetasoundEnumRegistrationMacro.h"
2021-02-23 20:16:28 -04:00
# include "MetasoundExecutableOperator.h"
# include "MetasoundNodeRegistrationMacro.h"
2021-02-26 17:38:00 -04:00
# include "MetasoundDataTypeRegistrationMacro.h"
2021-02-23 20:16:28 -04:00
# include "MetasoundPrimitives.h"
# include "MetasoundStandardNodesNames.h"
# include "MetasoundTrigger.h"
# include "MetasoundTime.h"
# include "MetasoundAudioBuffer.h"
# include "DSP/Delay.h"
2021-04-03 18:40:14 -04:00
# include "MetasoundStandardNodesCategories.h"
# include "MetasoundFacade.h"
2021-02-23 20:16:28 -04:00
2021-04-07 02:57:54 -04:00
# define LOCTEXT_NAMESPACE "MetasoundStandardNodes_StereoDelayNode"
2021-02-23 20:16:28 -04:00
namespace Metasound
{
namespace StereoDelay
{
static const TCHAR * InParamNameAudioInputLeft = TEXT ( " In Left " ) ;
static const TCHAR * InParamNameAudioInputRight = TEXT ( " In Right " ) ;
2021-02-26 17:38:00 -04:00
static const TCHAR * InParamNameDelayMode = TEXT ( " Delay Mode " ) ;
2021-02-23 20:16:28 -04:00
static const TCHAR * InParamNameDelayTime = TEXT ( " Delay Time " ) ;
2021-02-26 17:38:00 -04:00
static const TCHAR * InParamNameDelayRatio = TEXT ( " Delay Ratio " ) ;
2021-02-23 20:16:28 -04:00
static const TCHAR * InParamNameDryLevel = TEXT ( " Dry Level " ) ;
static const TCHAR * InParamNameWetLevel = TEXT ( " Wet Level " ) ;
static const TCHAR * InParamNameFeedbackAmount = TEXT ( " Feedback " ) ;
static const TCHAR * OutParamNameAudioLeft = TEXT ( " Out Left " ) ;
static const TCHAR * OutParamNameAudioRight = TEXT ( " Out Right " ) ;
static float MaxDelaySeconds = 5.0f ;
}
2021-02-26 17:38:00 -04:00
enum class EStereoDelayMode
{
Normal = 0 ,
Cross ,
PingPong ,
} ;
DECLARE_METASOUND_ENUM ( EStereoDelayMode , EStereoDelayMode : : Normal , METASOUNDSTANDARDNODES_API ,
FEnumStereoDelayMode , FEnumStereoDelayModeInfo , FStereoDelayModeReadRef , FEnumStereoDelayModeWriteRef ) ;
DEFINE_METASOUND_ENUM_BEGIN ( EStereoDelayMode , FEnumStereoDelayMode , " StereoDelayMode " )
2022-02-10 18:36:47 -05:00
DEFINE_METASOUND_ENUM_ENTRY ( EStereoDelayMode : : Normal , " StereoDelayModeNormalDescription " , " Normal " , " StereoDelayModeNormalDescriptionTT " , " Left input mixes with left delay output and feeds to left output. " ) ,
DEFINE_METASOUND_ENUM_ENTRY ( EStereoDelayMode : : Cross , " StereoDelayModeCrossDescription " , " Cross " , " StereoDelayModeCrossDescriptionTT " , " Left input mixes with right delay output and feeds to right output. " ) ,
DEFINE_METASOUND_ENUM_ENTRY ( EStereoDelayMode : : PingPong , " StereoDelayModePingPongDescription " , " Ping Pong " , " StereoDelayModePingPongDescriptionTT " , " Left input mixes with left delay output and feeds to right output. " ) ,
2021-02-26 17:38:00 -04:00
DEFINE_METASOUND_ENUM_END ( )
2021-02-23 20:16:28 -04:00
class FStereoDelayOperator : public TExecutableOperator < FStereoDelayOperator >
{
public :
static const FNodeClassMetadata & GetNodeInfo ( ) ;
static const FVertexInterface & GetVertexInterface ( ) ;
static TUniquePtr < IOperator > CreateOperator ( const FCreateOperatorParams & InParams , FBuildErrorArray & OutErrors ) ;
FStereoDelayOperator ( const FOperatorSettings & InSettings ,
const FAudioBufferReadRef & InLeftAudioInput ,
const FAudioBufferReadRef & InRightAudioInput ,
2021-02-26 17:38:00 -04:00
const FStereoDelayModeReadRef & InStereoDelayMode ,
2021-02-23 20:16:28 -04:00
const FTimeReadRef & InDelayTime ,
2021-02-26 17:38:00 -04:00
const FFloatReadRef & InDelayRatio ,
2021-02-23 20:16:28 -04:00
const FFloatReadRef & InDryLevel ,
const FFloatReadRef & InWetLevel ,
const FFloatReadRef & InFeedback ) ;
virtual FDataReferenceCollection GetInputs ( ) const override ;
virtual FDataReferenceCollection GetOutputs ( ) const override ;
void Execute ( ) ;
private :
2021-02-26 17:38:00 -04:00
float GetInputDelayTimeMsecClamped ( ) const ;
float GetInputDelayRatioClamped ( ) const ;
2021-02-23 20:16:28 -04:00
// The input audio buffer
FAudioBufferReadRef LeftAudioInput ;
FAudioBufferReadRef RightAudioInput ;
2021-02-26 17:38:00 -04:00
// Which stereo delay mode to render the audio delay with
FStereoDelayModeReadRef StereoDelayMode ;
2021-02-23 20:16:28 -04:00
// The amount of delay time
FTimeReadRef DelayTime ;
2021-02-26 17:38:00 -04:00
// The stereo delay ratio
FFloatReadRef DelayRatio ;
2021-02-23 20:16:28 -04:00
// The the dry level
FFloatReadRef DryLevel ;
// The the wet level
FFloatReadRef WetLevel ;
// The feedback amount
FFloatReadRef Feedback ;
// The audio output
FAudioBufferWriteRef LeftAudioOutput ;
FAudioBufferWriteRef RightAudioOutput ;
// The internal delay buffer
Audio : : FDelay LeftDelayBuffer ;
Audio : : FDelay RightDelayBuffer ;
2021-02-26 17:38:00 -04:00
// The current delay time and delay ratio
2021-02-23 20:16:28 -04:00
float PrevDelayTimeMsec ;
2021-02-26 17:38:00 -04:00
float PrevDelayRatio ;
2021-02-23 20:16:28 -04:00
} ;
FStereoDelayOperator : : FStereoDelayOperator ( const FOperatorSettings & InSettings ,
const FAudioBufferReadRef & InLeftAudioInput ,
const FAudioBufferReadRef & InRightAudioInput ,
2021-02-26 17:38:00 -04:00
const FStereoDelayModeReadRef & InStereoDelayMode ,
2021-02-23 20:16:28 -04:00
const FTimeReadRef & InDelayTime ,
2021-02-26 17:38:00 -04:00
const FFloatReadRef & InDelayRatio ,
const FFloatReadRef & InDryLevel ,
2021-02-23 20:16:28 -04:00
const FFloatReadRef & InWetLevel ,
const FFloatReadRef & InFeedback )
: LeftAudioInput ( InLeftAudioInput )
, RightAudioInput ( InRightAudioInput )
2021-02-26 17:38:00 -04:00
, StereoDelayMode ( InStereoDelayMode )
2021-02-23 20:16:28 -04:00
, DelayTime ( InDelayTime )
2021-02-26 17:38:00 -04:00
, DelayRatio ( InDelayRatio )
2021-02-23 20:16:28 -04:00
, DryLevel ( InDryLevel )
, WetLevel ( InWetLevel )
, Feedback ( InFeedback )
, LeftAudioOutput ( FAudioBufferWriteRef : : CreateNew ( InSettings ) )
, RightAudioOutput ( FAudioBufferWriteRef : : CreateNew ( InSettings ) )
2021-02-26 17:38:00 -04:00
, PrevDelayTimeMsec ( GetInputDelayTimeMsecClamped ( ) )
, PrevDelayRatio ( GetInputDelayRatioClamped ( ) )
2021-02-23 20:16:28 -04:00
{
LeftDelayBuffer . Init ( InSettings . GetSampleRate ( ) , StereoDelay : : MaxDelaySeconds ) ;
2021-02-26 17:38:00 -04:00
LeftDelayBuffer . SetDelayMsec ( PrevDelayTimeMsec * ( 1.0f + PrevDelayRatio ) ) ;
2021-02-23 20:16:28 -04:00
RightDelayBuffer . Init ( InSettings . GetSampleRate ( ) , StereoDelay : : MaxDelaySeconds ) ;
2021-02-26 17:38:00 -04:00
RightDelayBuffer . SetDelayMsec ( PrevDelayTimeMsec * ( 1.0f - PrevDelayRatio ) ) ;
2021-02-23 20:16:28 -04:00
}
FDataReferenceCollection FStereoDelayOperator : : GetInputs ( ) const
{
FDataReferenceCollection InputDataReferences ;
InputDataReferences . AddDataReadReference ( StereoDelay : : InParamNameAudioInputLeft , FAudioBufferReadRef ( LeftAudioInput ) ) ;
InputDataReferences . AddDataReadReference ( StereoDelay : : InParamNameAudioInputRight , FAudioBufferReadRef ( RightAudioInput ) ) ;
2021-02-26 17:38:00 -04:00
InputDataReferences . AddDataReadReference ( StereoDelay : : InParamNameDelayMode , FStereoDelayModeReadRef ( StereoDelayMode ) ) ;
2021-02-23 20:16:28 -04:00
InputDataReferences . AddDataReadReference ( StereoDelay : : InParamNameDelayTime , FTimeReadRef ( DelayTime ) ) ;
2021-02-26 17:38:00 -04:00
InputDataReferences . AddDataReadReference ( StereoDelay : : InParamNameDelayRatio , FFloatReadRef ( DelayRatio ) ) ;
2021-02-23 20:16:28 -04:00
InputDataReferences . AddDataReadReference ( StereoDelay : : InParamNameDryLevel , FFloatReadRef ( DryLevel ) ) ;
InputDataReferences . AddDataReadReference ( StereoDelay : : InParamNameWetLevel , FFloatReadRef ( WetLevel ) ) ;
InputDataReferences . AddDataReadReference ( StereoDelay : : InParamNameFeedbackAmount , FFloatReadRef ( Feedback ) ) ;
return InputDataReferences ;
}
FDataReferenceCollection FStereoDelayOperator : : GetOutputs ( ) const
{
FDataReferenceCollection OutputDataReferences ;
OutputDataReferences . AddDataReadReference ( StereoDelay : : OutParamNameAudioLeft , FAudioBufferReadRef ( LeftAudioOutput ) ) ;
OutputDataReferences . AddDataReadReference ( StereoDelay : : OutParamNameAudioRight , FAudioBufferReadRef ( RightAudioOutput ) ) ;
return OutputDataReferences ;
}
2021-02-26 17:38:00 -04:00
float FStereoDelayOperator : : GetInputDelayTimeMsecClamped ( ) const
2021-02-23 20:16:28 -04:00
{
// Clamp the delay time to the max delay allowed
return 1000.0f * FMath : : Clamp ( ( float ) DelayTime - > GetSeconds ( ) , 0.0f , StereoDelay : : MaxDelaySeconds ) ;
}
2021-02-26 17:38:00 -04:00
float FStereoDelayOperator : : GetInputDelayRatioClamped ( ) const
{
return FMath : : Clamp ( * DelayRatio , - 1.0f , 1.0f ) ;
}
2021-02-23 20:16:28 -04:00
void FStereoDelayOperator : : Execute ( )
{
// Get clamped delay time
2021-02-26 17:38:00 -04:00
float CurrentInputDelayTime = GetInputDelayTimeMsecClamped ( ) ;
float CurrentDelayRatio = GetInputDelayRatioClamped ( ) ;
2021-02-23 20:16:28 -04:00
// Check to see if our delay amount has changed
2021-02-26 17:38:00 -04:00
if ( ! FMath : : IsNearlyEqual ( PrevDelayTimeMsec , CurrentInputDelayTime ) | | ! FMath : : IsNearlyEqual ( PrevDelayRatio , CurrentDelayRatio ) )
2021-02-23 20:16:28 -04:00
{
PrevDelayTimeMsec = CurrentInputDelayTime ;
2021-02-26 17:38:00 -04:00
PrevDelayRatio = CurrentDelayRatio ;
LeftDelayBuffer . SetEasedDelayMsec ( PrevDelayTimeMsec * ( 1.0f + PrevDelayRatio ) ) ;
RightDelayBuffer . SetEasedDelayMsec ( PrevDelayTimeMsec * ( 1.0f - PrevDelayRatio ) ) ;
2021-02-23 20:16:28 -04:00
}
const float * LeftInput = LeftAudioInput - > GetData ( ) ;
const float * RightInput = RightAudioInput - > GetData ( ) ;
float * LeftOutput = LeftAudioOutput - > GetData ( ) ;
float * RightOutput = RightAudioOutput - > GetData ( ) ;
int32 NumFrames = LeftAudioInput - > Num ( ) ;
// Clamp the feedback amount to make sure it's bounded. Clamp to a number slightly less than 1.0
float FeedbackAmount = FMath : : Clamp ( * Feedback , 0.0f , 1.0f - SMALL_NUMBER ) ;
float CurrentDryLevel = FMath : : Clamp ( * DryLevel , 0.0f , 1.0f ) ;
float CurrentWetLevel = FMath : : Clamp ( * WetLevel , 0.0f , 1.0f ) ;
if ( FMath : : IsNearlyZero ( FeedbackAmount ) )
{
// if pingpong
2021-02-26 17:38:00 -04:00
switch ( * StereoDelayMode )
2021-02-23 20:16:28 -04:00
{
2021-02-26 17:38:00 -04:00
// Normal feeds left to left and right to right
case EStereoDelayMode : : Normal :
2021-02-23 20:16:28 -04:00
{
2021-02-26 17:38:00 -04:00
for ( int32 FrameIndex = 0 ; FrameIndex < NumFrames ; + + FrameIndex )
{
LeftOutput [ FrameIndex ] = CurrentWetLevel * LeftDelayBuffer . ProcessAudioSample ( LeftInput [ FrameIndex ] ) + CurrentDryLevel * LeftInput [ FrameIndex ] ;
RightOutput [ FrameIndex ] = CurrentWetLevel * RightDelayBuffer . ProcessAudioSample ( RightInput [ FrameIndex ] ) + CurrentDryLevel * RightInput [ FrameIndex ] ;
}
2021-02-23 20:16:28 -04:00
}
2021-02-26 17:38:00 -04:00
break ;
// No-feedback Cross and ping-pong feeds right input to left and left input to right
case EStereoDelayMode : : Cross :
case EStereoDelayMode : : PingPong :
{
for ( int32 FrameIndex = 0 ; FrameIndex < NumFrames ; + + FrameIndex )
{
// Ping pong feeds right to left and left to right
LeftOutput [ FrameIndex ] = CurrentWetLevel * LeftDelayBuffer . ProcessAudioSample ( RightInput [ FrameIndex ] ) + CurrentDryLevel * LeftInput [ FrameIndex ] ;
RightOutput [ FrameIndex ] = CurrentWetLevel * RightDelayBuffer . ProcessAudioSample ( LeftInput [ FrameIndex ] ) + CurrentDryLevel * RightInput [ FrameIndex ] ;
}
}
break ;
2021-02-23 20:16:28 -04:00
}
}
else
{
// TODO: support different delay cross-modes via enum, currently default to pingpong
2021-02-26 17:38:00 -04:00
switch ( * StereoDelayMode )
2021-02-23 20:16:28 -04:00
{
2021-02-26 17:38:00 -04:00
case EStereoDelayMode : : Normal :
2021-02-23 20:16:28 -04:00
{
2021-02-26 17:38:00 -04:00
for ( int32 FrameIndex = 0 ; FrameIndex < NumFrames ; + + FrameIndex )
{
float LeftDelayIn = LeftInput [ FrameIndex ] + FeedbackAmount * LeftDelayBuffer . Read ( ) ;
float RightDelayIn = RightInput [ FrameIndex ] + FeedbackAmount * RightDelayBuffer . Read ( ) ;
2021-02-23 20:16:28 -04:00
2021-02-26 17:38:00 -04:00
LeftOutput [ FrameIndex ] = CurrentWetLevel * LeftDelayBuffer . ProcessAudioSample ( LeftDelayIn ) + CurrentDryLevel * LeftInput [ FrameIndex ] ;
RightOutput [ FrameIndex ] = CurrentWetLevel * RightDelayBuffer . ProcessAudioSample ( RightDelayIn ) + CurrentDryLevel * RightInput [ FrameIndex ] ;
}
2021-02-23 20:16:28 -04:00
}
2021-02-26 17:38:00 -04:00
break ;
case EStereoDelayMode : : Cross :
{
for ( int32 FrameIndex = 0 ; FrameIndex < NumFrames ; + + FrameIndex )
{
float LeftDelayIn = RightInput [ FrameIndex ] + FeedbackAmount * LeftDelayBuffer . Read ( ) ;
float RightDelayIn = LeftInput [ FrameIndex ] + FeedbackAmount * RightDelayBuffer . Read ( ) ;
LeftOutput [ FrameIndex ] = CurrentWetLevel * LeftDelayBuffer . ProcessAudioSample ( LeftDelayIn ) + CurrentDryLevel * LeftInput [ FrameIndex ] ;
RightOutput [ FrameIndex ] = CurrentWetLevel * RightDelayBuffer . ProcessAudioSample ( RightDelayIn ) + CurrentDryLevel * RightInput [ FrameIndex ] ;
}
}
break ;
case EStereoDelayMode : : PingPong :
{
for ( int32 FrameIndex = 0 ; FrameIndex < NumFrames ; + + FrameIndex )
{
float LeftDelayIn = RightInput [ FrameIndex ] + FeedbackAmount * RightDelayBuffer . Read ( ) ;
float RightDelayIn = LeftInput [ FrameIndex ] + FeedbackAmount * LeftDelayBuffer . Read ( ) ;
LeftOutput [ FrameIndex ] = CurrentWetLevel * LeftDelayBuffer . ProcessAudioSample ( LeftDelayIn ) + CurrentDryLevel * LeftInput [ FrameIndex ] ;
RightOutput [ FrameIndex ] = CurrentWetLevel * RightDelayBuffer . ProcessAudioSample ( RightDelayIn ) + CurrentDryLevel * RightInput [ FrameIndex ] ;
}
}
break ;
2021-02-23 20:16:28 -04:00
}
}
}
const FVertexInterface & FStereoDelayOperator : : GetVertexInterface ( )
{
static const FVertexInterface Interface (
FInputVertexInterface (
2022-02-10 18:36:47 -05:00
TInputDataVertexModel < FAudioBuffer > ( StereoDelay : : InParamNameAudioInputLeft , METASOUND_LOCTEXT ( " LeftAudioInputTooltip " , " Left channel audio input. " ) ) ,
TInputDataVertexModel < FAudioBuffer > ( StereoDelay : : InParamNameAudioInputRight , METASOUND_LOCTEXT ( " RightAudioInputTooltip " , " Right channel audio input. " ) ) ,
TInputDataVertexModel < FEnumStereoDelayMode > ( StereoDelay : : InParamNameDelayMode , METASOUND_LOCTEXT ( " DelayModeTooltip " , " Delay mode. " ) ) ,
TInputDataVertexModel < FTime > ( StereoDelay : : InParamNameDelayTime , METASOUND_LOCTEXT ( " DelayTimeTooltip " , " The amount of time to delay the audio. " ) , 1.0f ) ,
TInputDataVertexModel < float > ( StereoDelay : : InParamNameDelayRatio , METASOUND_LOCTEXT ( " DelayRatioTooltip " , " Delay spread for left and right channels. Allows left and right channels to have differential delay amounts. Useful for stereo channel decorrelation " ) , 0.0f ) ,
TInputDataVertexModel < float > ( StereoDelay : : InParamNameDryLevel , METASOUND_LOCTEXT ( " DryLevelTooltip " , " The dry level of the delay. " ) , 0.0f ) ,
TInputDataVertexModel < float > ( StereoDelay : : InParamNameWetLevel , METASOUND_LOCTEXT ( " WetLevelTooltip " , " The wet level of the delay. " ) , 1.0f ) ,
TInputDataVertexModel < float > ( StereoDelay : : InParamNameFeedbackAmount , METASOUND_LOCTEXT ( " FeedbackTooltip " , " Feedback amount. " ) , 0.0f )
2021-02-23 20:16:28 -04:00
) ,
FOutputVertexInterface (
2022-02-10 18:36:47 -05:00
TOutputDataVertexModel < FAudioBuffer > ( StereoDelay : : OutParamNameAudioLeft , METASOUND_LOCTEXT ( " LeftDelayOutputTooltip " , " Left channel audio output. " ) ) ,
TOutputDataVertexModel < FAudioBuffer > ( StereoDelay : : OutParamNameAudioRight , METASOUND_LOCTEXT ( " RightDelayOutputTooltip " , " Right channel audio output. " ) )
2021-02-23 20:16:28 -04:00
)
) ;
return Interface ;
}
const FNodeClassMetadata & FStereoDelayOperator : : GetNodeInfo ( )
{
auto InitNodeInfo = [ ] ( ) - > FNodeClassMetadata
{
FNodeClassMetadata Info ;
2021-08-09 15:08:37 -04:00
Info . ClassName = { StandardNodes : : Namespace , TEXT ( " Stereo Delay " ) , StandardNodes : : AudioVariant } ;
2021-02-23 20:16:28 -04:00
Info . MajorVersion = 1 ;
Info . MinorVersion = 0 ;
2022-02-10 18:36:47 -05:00
Info . DisplayName = METASOUND_LOCTEXT ( " Metasound_StereoDelayDisplayName " , " Stereo Delay " ) ;
Info . Description = METASOUND_LOCTEXT ( " Metasound_StereoDelayNodeDescription " , " Delays a stereo audio buffer by the specified amount. " ) ;
2021-02-23 20:16:28 -04:00
Info . Author = PluginAuthor ;
Info . PromptIfMissing = PluginNodeMissingPrompt ;
Info . DefaultInterface = GetVertexInterface ( ) ;
2021-08-09 15:08:37 -04:00
Info . CategoryHierarchy . Emplace ( NodeCategories : : Delays ) ;
2021-02-23 20:16:28 -04:00
return Info ;
} ;
static const FNodeClassMetadata Info = InitNodeInfo ( ) ;
return Info ;
}
TUniquePtr < IOperator > FStereoDelayOperator : : CreateOperator ( const FCreateOperatorParams & InParams , FBuildErrorArray & OutErrors )
{
const FDataReferenceCollection & InputCollection = InParams . InputDataReferences ;
const FInputVertexInterface & InputInterface = GetVertexInterface ( ) . GetInputInterface ( ) ;
FAudioBufferReadRef LeftAudioIn = InputCollection . GetDataReadReferenceOrConstruct < FAudioBuffer > ( StereoDelay : : InParamNameAudioInputLeft , InParams . OperatorSettings ) ;
FAudioBufferReadRef RightAudioIn = InputCollection . GetDataReadReferenceOrConstruct < FAudioBuffer > ( StereoDelay : : InParamNameAudioInputRight , InParams . OperatorSettings ) ;
2021-02-26 17:38:00 -04:00
FStereoDelayModeReadRef StereoDelayMode = InputCollection . GetDataReadReferenceOrConstruct < FEnumStereoDelayMode > ( StereoDelay : : InParamNameDelayMode ) ;
2021-03-23 22:43:28 -04:00
FTimeReadRef DelayTime = InputCollection . GetDataReadReferenceOrConstructWithVertexDefault < FTime > ( InputInterface , StereoDelay : : InParamNameDelayTime , InParams . OperatorSettings ) ;
FFloatReadRef DelayRatio = InputCollection . GetDataReadReferenceOrConstructWithVertexDefault < float > ( InputInterface , StereoDelay : : InParamNameDelayRatio , InParams . OperatorSettings ) ;
FFloatReadRef DryLevel = InputCollection . GetDataReadReferenceOrConstructWithVertexDefault < float > ( InputInterface , StereoDelay : : InParamNameDryLevel , InParams . OperatorSettings ) ;
FFloatReadRef WetLevel = InputCollection . GetDataReadReferenceOrConstructWithVertexDefault < float > ( InputInterface , StereoDelay : : InParamNameWetLevel , InParams . OperatorSettings ) ;
FFloatReadRef Feedback = InputCollection . GetDataReadReferenceOrConstructWithVertexDefault < float > ( InputInterface , StereoDelay : : InParamNameFeedbackAmount , InParams . OperatorSettings ) ;
2021-02-23 20:16:28 -04:00
2021-02-26 17:38:00 -04:00
return MakeUnique < FStereoDelayOperator > ( InParams . OperatorSettings , LeftAudioIn , RightAudioIn , StereoDelayMode , DelayTime , DelayRatio , DryLevel , WetLevel , Feedback ) ;
2021-02-23 20:16:28 -04:00
}
2021-04-03 18:40:14 -04:00
class FStereoDelayNode : public FNodeFacade
2021-02-23 20:16:28 -04:00
{
2021-04-03 18:40:14 -04:00
public :
/**
* Constructor used by the Metasound Frontend .
*/
FStereoDelayNode ( const FNodeInitData & InitData )
: FNodeFacade ( InitData . InstanceName , InitData . InstanceID , TFacadeOperatorClass < FStereoDelayOperator > ( ) )
{
}
} ;
2021-02-23 20:16:28 -04:00
METASOUND_REGISTER_NODE ( FStereoDelayNode )
}
2021-04-06 18:56:44 -04:00
# undef LOCTEXT_NAMESPACE //MetasoundStandardNodes_DelayNode