Skip to content

Commit 8e996b0

Browse files
committed
parameter tuning
1 parent 4b89016 commit 8e996b0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

wled00/FX.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,9 @@ static uint16_t mode_fireworks_core(bool useaudio) {
12451245
float musicIndex = logf(FFT_MajorPeak); // log scaling of peak freq
12461246
soundColor = mapf(musicIndex, 4.6f, 9.06f, 0, 255); // pick color from frequency (4.6 = ln(100), 9.06 = ln(8600))
12471247
soundColor = constrain(soundColor, 0, 255); // remove over-shoot
1248-
if (samplePeak > 0) myIntensity -= myIntensity / 4; // increase effect intensity at peaks
1248+
if (samplePeak > 0) myIntensity -= myIntensity / 2; // increase effect intensity at peaks
1249+
else if (volumeSmth > 96.0f) myIntensity -= myIntensity / 4; // increase effect intensity slightly when music plays
1250+
myIntensity = constrain(myIntensity, 0, 129);
12491251
} else { // silence -> fade away
12501252
valid1 = valid2 = false; // do not copy last pixels
12511253
addPixels = false; // don't add new pixels
@@ -3430,10 +3432,10 @@ static uint16_t mode_starburst_core(bool useaudio) {
34303432
// WLEDMM begin
34313433
if (useaudio) {
34323434
doNewStar = false;
3433-
int burstplus = (volumeSmth > 159)? 128:0; // high volume -> more stars
3435+
int burstplus = (volumeSmth > 159)? 96:0; // high volume -> more stars
34343436
if (volumeRaw <= 56) burstplus = -64; // low volume -> fewer stars
34353437
int birthrate = (144-(SEGMENT.speed >> 1)) - burstplus;
3436-
birthrate = constrain(birthrate, 0, 144);
3438+
birthrate = constrain(birthrate, 4, 144);
34373439
if ( (volumeSmth > 1.0f) // no bursts in silence
34383440
&& ((samplePeak > 0) || (volumeRaw > 48)) // try to burst with sound
34393441
&& (random8(birthrate) == 0) ) // original random rate

0 commit comments

Comments
 (0)