Merge pull request #101 from mikeoliphant/nam_a2

Add NAM A2 model support
This commit is contained in:
Mike Oliphant
2026-05-17 09:37:33 -07:00
committed by GitHub
4 changed files with 23 additions and 1 deletions
+8
View File
@@ -101,4 +101,12 @@ A large collection of models is available at https://tonehunt.org
lv2:minimum -20.0;
lv2:maximum 20.0;
units:unit units:db;
], [
a lv2:ControlPort, lv2:InputPort;
lv2:index 6;
lv2:symbol "quality_scale";
lv2:name "Quality";
lv2:default 1.0;
lv2:minimum 0.0;
lv2:maximum 1.0;
].
+12
View File
@@ -252,6 +252,18 @@ namespace NAM {
}
}
if (*(ports.quality_scale) != qualityScale)
{
qualityScale = *(ports.quality_scale);
NeuralAudio::NeuralModel::SetDefaultQualityScaleFactor(qualityScale);
if (currentModel != nullptr)
{
currentModel->SetQualityScaleFactor(qualityScale);
}
}
float level;
float modelInputAdjustmentDB = 0;
+2
View File
@@ -60,6 +60,7 @@ namespace NAM {
float* audio_out;
float* input_level;
float* output_level;
float* quality_scale;
};
Ports ports = {};
@@ -74,6 +75,7 @@ namespace NAM {
std::string currentModelPath;
float prevDCInput = 0;
float prevDCOutput = 0;
float qualityScale = 1.0f;
Plugin();
~Plugin();