diff --git a/include/engine.hpp b/include/engine.hpp index ce7d43d0..cfff9b1d 100644 --- a/include/engine.hpp +++ b/include/engine.hpp @@ -30,8 +30,9 @@ struct Output { }; struct Light { + /** The square of the brightness value */ float value = 0.0; - void setSmooth(float v); + void setBrightnessSmooth(float brightness); }; diff --git a/src/engine.cpp b/src/engine.cpp index f34ca99e..ef0163dd 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -33,8 +33,8 @@ static int smoothParamId; static float smoothValue; -void Light::setSmooth(float v) { - value += (v - value) / sampleRate * 60.0; +void Light::setBrightnessSmooth(float brightness) { + value += (powf(brightness, 2) - value) / sampleRate * 60.0; }