parameter smoothing

This commit is contained in:
Mike Oliphant
2023-05-11 11:26:37 -07:00
parent 0de36a5d8a
commit 10059d327c
2 changed files with 5 additions and 2 deletions
+3 -2
View File
@@ -186,8 +186,9 @@ namespace NAM {
if (dblData.size() != n_samples)
dblData.resize(n_samples);
float inputLevel = powf(10, *(ports.input_level) * 0.05f);
float outputLevel = powf(10, *(ports.output_level) * 0.05f);
// Convert input/output levels from db and do very basic smoothing
inputLevel = (.99f * inputLevel) + (.01f * powf(10, *(ports.input_level) * 0.05f));
outputLevel = (.99f * outputLevel) + (.01f * powf(10, *(ports.output_level) * 0.05f));
for (unsigned int i = 0; i < n_samples; i++)
{
+2
View File
@@ -107,5 +107,7 @@ namespace NAM {
std::vector<double> dblData;
float m_rate;
float inputLevel = 0;
float outputLevel = 0;
};
}