Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundEngine/Private/MetasoundEngineModule.cpp
Rob Gay e894af4d0c Checkpoint - WaveTable Integration w/Modulation & MetaSounds
- Removed duplicate implementation of ModPatch editor stuff now that WT Plugin covers it
- Add UWaveTableBank asset & WaveTable MetaSound DataType
- Add Full Sin as curve type
- Fix-up ability to make WaveTable assets bipolar but leave Modulation Patches unipolar
- Inherit ModulationTransform from new WaveTableTransform for extensibility to WT implementation
- Move ModulationCurve --> WaveTableCurve
- FastSin to Sin implementation in now WaveTableCurve (no reason to use fast implementation when using WT or interpolating curve key implementation at block rate)
#rb helen.yang
#jira UE-156634
#jira UE-156635
#jira UE-156874
#preflight 62b9cf61de2c0f4cf8774a9a

[CL 20832273 by Rob Gay in ue5-main branch]
2022-06-27 12:00:38 -04:00

54 lines
2.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "MetasoundEngineModule.h"
#include "Analysis/MetasoundFrontendAnalyzerRegistry.h"
#include "Metasound.h"
#include "MetasoundDataReference.h"
#include "MetasoundDataTypeRegistrationMacro.h"
#include "MetasoundEngineArchetypes.h"
#include "MetasoundInterface.h"
#include "MetasoundSource.h"
#include "MetasoundUObjectRegistry.h"
#include "MetasoundWave.h"
#include "MetasoundWaveTable.h"
#include "Modules/ModuleManager.h"
#include "Sound/AudioSettings.h"
DEFINE_LOG_CATEGORY(LogMetasoundEngine);
REGISTER_METASOUND_DATATYPE(Metasound::FWaveAsset, "WaveAsset", Metasound::ELiteralType::UObjectProxy, USoundWave);
REGISTER_METASOUND_DATATYPE(WaveTable::FWaveTable, "WaveTable", Metasound::ELiteralType::FloatArray)
REGISTER_METASOUND_DATATYPE(Metasound::FWaveTableBankAsset, "WaveTableBankAsset", Metasound::ELiteralType::UObjectProxy, UWaveTableBank);
class FMetasoundEngineModule : public IMetasoundEngineModule
{
virtual void StartupModule() override
{
FModuleManager::Get().LoadModuleChecked("MetasoundGraphCore");
FModuleManager::Get().LoadModuleChecked("MetasoundFrontend");
FModuleManager::Get().LoadModuleChecked("MetasoundStandardNodes");
FModuleManager::Get().LoadModuleChecked("MetasoundGenerator");
FModuleManager::Get().LoadModuleChecked("AudioCodecEngine");
FModuleManager::Get().LoadModuleChecked("WaveTable");
// Register engine-level parameter interfaces if not done already.
// (Potentially not already called if plugin is loaded while cooking.)
UAudioSettings* AudioSettings = GetMutableDefault<UAudioSettings>();
check(AudioSettings);
AudioSettings->RegisterParameterInterfaces();
// Register interfaces
Metasound::Engine::RegisterInterfaces();
// Flush node registration queue
FMetasoundFrontendRegistryContainer::Get()->RegisterPendingNodes();
// Register Analyzers
Metasound::Frontend::IVertexAnalyzerRegistry::Get().RegisterAnalyzerFactories();
UE_LOG(LogMetasoundEngine, Log, TEXT("MetaSound Engine Initialized"));
}
};
IMPLEMENT_MODULE(FMetasoundEngineModule, MetasoundEngine);