Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundFrontend/Public/Analysis/MetasoundFrontendVertexAnalyzerEnvelopeFollower.h
Rob Gay 20742757be - Narrow/privitize template implementation scope for MetaSound Analyzers
- Implement/encapsulate binding for analyzer output/sender logic
- Move to using FAnyDataReferences where possible over collections for analyzers
- Misc clean-up
#jira UE-147027
#rb phil.popp
#preflight 627d3884332e182a583f19b3

[CL 20167469 by Rob Gay in ue5-main branch]
2022-05-12 13:47:17 -04:00

48 lines
1.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Analysis/MetasoundFrontendAnalyzerFactory.h"
#include "Analysis/MetasoundFrontendVertexAnalyzer.h"
#include "Containers/Array.h"
#include "DSP/EnvelopeFollower.h"
#include "MetasoundDataReferenceCollection.h"
#include "MetasoundRouter.h"
namespace Metasound
{
namespace Frontend
{
class METASOUNDFRONTEND_API FVertexAnalyzerEnvelopeFollower : public FVertexAnalyzerBase
{
public:
static const FName& GetAnalyzerName();
static const FName& GetDataType();
struct METASOUNDFRONTEND_API FOutputs
{
static const FAnalyzerOutput& GetValue();
};
class METASOUNDFRONTEND_API FFactory : public TVertexAnalyzerFactory<FVertexAnalyzerEnvelopeFollower>
{
public:
virtual const TArray<FAnalyzerOutput>& GetAnalyzerOutputs() const override
{
static const TArray<FAnalyzerOutput> Outputs { FOutputs::GetValue() };
return Outputs;
}
};
FVertexAnalyzerEnvelopeFollower(const FCreateAnalyzerParams& InParams);
virtual ~FVertexAnalyzerEnvelopeFollower() = default;
virtual void Execute() override;
private:
Audio::FEnvelopeFollower EnvelopeFollower;
TDataWriteReference<float> EnvelopeValue;
};
} // namespace Frontend
} // namespace Metasound