Slightly abstract smoothing speed to make it easier to search for

pull/277/head
DJLevel3 2025-01-17 09:47:11 -05:00
rodzic 4874f3ff1f
commit 2099b8591a
2 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -69,7 +69,7 @@ void Effect::animateValues(double volume) {
actualValues[i] = ((float)rand() / RAND_MAX) * (maxValue - minValue) + minValue;
break;
default:
double weight = parameter->smoothValueChange ? 0.0005 : 1.0;
double weight = parameter->smoothValueChange ? SMOOTHING_SPEED_CONSTANT : 1.0;
double newValue;
if (parameter->sidechain != nullptr && parameter->sidechain->getBoolValue()) {
newValue = volume * (maxValue - minValue) + minValue;

Wyświetl plik

@ -5,6 +5,8 @@
#include "EffectParameter.h"
#include "BooleanParameter.h"
#define SMOOTHING_SPEED_CONSTANT 0.0005
typedef std::function<OsciPoint(int index, OsciPoint input, const std::vector<std::atomic<double>>& values, double sampleRate)> EffectApplicationType;
class Effect {