mirror of
https://github.com/mikeoliphant/neural-amp-modeler-lv2.git
synced 2026-05-09 20:29:12 +02:00
parameter smoothing
This commit is contained in:
+3
-2
@@ -186,8 +186,9 @@ namespace NAM {
|
|||||||
if (dblData.size() != n_samples)
|
if (dblData.size() != n_samples)
|
||||||
dblData.resize(n_samples);
|
dblData.resize(n_samples);
|
||||||
|
|
||||||
float inputLevel = powf(10, *(ports.input_level) * 0.05f);
|
// Convert input/output levels from db and do very basic smoothing
|
||||||
float outputLevel = powf(10, *(ports.output_level) * 0.05f);
|
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++)
|
for (unsigned int i = 0; i < n_samples; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -107,5 +107,7 @@ namespace NAM {
|
|||||||
std::vector<double> dblData;
|
std::vector<double> dblData;
|
||||||
|
|
||||||
float m_rate;
|
float m_rate;
|
||||||
|
float inputLevel = 0;
|
||||||
|
float outputLevel = 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user