Expose dynamics - limiter, rise and fall as calc runs on receive too
This commit is contained in:
@@ -89,7 +89,6 @@ static uint8_t fftResult[NUM_GEQ_CHANNELS]= {0};// Our calculated freq. channel
|
|||||||
// TODO: probably best not used by receive nodes
|
// TODO: probably best not used by receive nodes
|
||||||
static uint8_t soundAgc = 0; // Automagic gain control: 0 - none, 1 - normal, 2 - vivid, 3 - lazy (config value)
|
static uint8_t soundAgc = 0; // Automagic gain control: 0 - none, 1 - normal, 2 - vivid, 3 - lazy (config value)
|
||||||
|
|
||||||
// TODO: probably best not used by receive nodes
|
|
||||||
// user settable parameters for limitSoundDynamics()
|
// user settable parameters for limitSoundDynamics()
|
||||||
static bool limiterOn = true; // bool: enable / disable dynamics limiter
|
static bool limiterOn = true; // bool: enable / disable dynamics limiter
|
||||||
static uint16_t attackTime = 50; // int: attack time in milliseconds. Default 0.08sec
|
static uint16_t attackTime = 50; // int: attack time in milliseconds. Default 0.08sec
|
||||||
@@ -2209,15 +2208,15 @@ class AudioReactive : public Usermod {
|
|||||||
poweruser[F("freqDist")] = freqDist;
|
poweruser[F("freqDist")] = freqDist;
|
||||||
poweruser[F("freqRMS")] = averageByRMS;
|
poweruser[F("freqRMS")] = averageByRMS;
|
||||||
|
|
||||||
|
JsonObject freqScale = top.createNestedObject("frequency");
|
||||||
|
freqScale[F("scale")] = FFTScalingMode;
|
||||||
|
freqScale[F("profile")] = pinkIndex; //WLEDMM
|
||||||
|
#endif
|
||||||
JsonObject dynLim = top.createNestedObject("dynamics");
|
JsonObject dynLim = top.createNestedObject("dynamics");
|
||||||
dynLim[F("limiter")] = limiterOn;
|
dynLim[F("limiter")] = limiterOn;
|
||||||
dynLim[F("rise")] = attackTime;
|
dynLim[F("rise")] = attackTime;
|
||||||
dynLim[F("fall")] = decayTime;
|
dynLim[F("fall")] = decayTime;
|
||||||
|
|
||||||
JsonObject freqScale = top.createNestedObject("frequency");
|
|
||||||
freqScale[F("scale")] = FFTScalingMode;
|
|
||||||
freqScale[F("profile")] = pinkIndex; //WLEDMM
|
|
||||||
#endif
|
|
||||||
JsonObject sync = top.createNestedObject("sync");
|
JsonObject sync = top.createNestedObject("sync");
|
||||||
sync[F("port")] = audioSyncPort;
|
sync[F("port")] = audioSyncPort;
|
||||||
sync[F("mode")] = audioSyncEnabled;
|
sync[F("mode")] = audioSyncEnabled;
|
||||||
@@ -2280,13 +2279,13 @@ class AudioReactive : public Usermod {
|
|||||||
configComplete &= getJsonValue(top["experiments"][F("freqDist")], freqDist);
|
configComplete &= getJsonValue(top["experiments"][F("freqDist")], freqDist);
|
||||||
configComplete &= getJsonValue(top["experiments"][F("freqRMS")], averageByRMS);
|
configComplete &= getJsonValue(top["experiments"][F("freqRMS")], averageByRMS);
|
||||||
|
|
||||||
|
configComplete &= getJsonValue(top["frequency"][F("scale")], FFTScalingMode);
|
||||||
|
configComplete &= getJsonValue(top["frequency"][F("profile")], pinkIndex); //WLEDMM
|
||||||
|
#endif
|
||||||
configComplete &= getJsonValue(top["dynamics"][F("limiter")], limiterOn);
|
configComplete &= getJsonValue(top["dynamics"][F("limiter")], limiterOn);
|
||||||
configComplete &= getJsonValue(top["dynamics"][F("rise")], attackTime);
|
configComplete &= getJsonValue(top["dynamics"][F("rise")], attackTime);
|
||||||
configComplete &= getJsonValue(top["dynamics"][F("fall")], decayTime);
|
configComplete &= getJsonValue(top["dynamics"][F("fall")], decayTime);
|
||||||
|
|
||||||
configComplete &= getJsonValue(top["frequency"][F("scale")], FFTScalingMode);
|
|
||||||
configComplete &= getJsonValue(top["frequency"][F("profile")], pinkIndex); //WLEDMM
|
|
||||||
#endif
|
|
||||||
configComplete &= getJsonValue(top["sync"][F("port")], audioSyncPort);
|
configComplete &= getJsonValue(top["sync"][F("port")], audioSyncPort);
|
||||||
configComplete &= getJsonValue(top["sync"][F("mode")], audioSyncEnabled);
|
configComplete &= getJsonValue(top["sync"][F("mode")], audioSyncEnabled);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user