From be6f6412d6d7fcab1bc464912b21479b36dc548a Mon Sep 17 00:00:00 2001 From: Frank Date: Sat, 29 Jul 2023 23:00:27 +0200 Subject: [PATCH] effect parameter tinkering * freqmap: fade faster * Lissajous HD mode: color follows rotation --- wled00/FX.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 0208cda5..e666a3d7 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -4963,6 +4963,7 @@ uint16_t mode_2Dgameoflife(void) { // Written by Ewoud Wijma, inspired by https: bool repetition = false; for (int i=0; i softhack007: not exacly. Different CRC means diferent image; same CRC means nothing (could be same or slightly different). if (!repetition) SEGENV.step = strip.now; //if no repetition avoid reset // remember CRCs across frames crcBuffer[SEGENV.aux0] = crc; @@ -5131,7 +5132,9 @@ uint16_t mode_2DLissajous(void) { // By: Andrew Tuline for (int i=0; i < maxLoops; i ++) { float xlocn = float(sin8(phase/2 + (i* SEGMENT.speed)/64)) / 255.0f; // WLEDMM align speed with original effect float ylocn = float(cos8(phase/2 + i*2)) / 255.0f; - SEGMENT.setPixelColorXY(xlocn, ylocn, SEGMENT.color_from_palette(millis()/100+i, false, PALETTE_SOLID_WRAP, 0)); // draw pixel with anti-aliasing + //SEGMENT.setPixelColorXY(xlocn, ylocn, SEGMENT.color_from_palette(millis()/100+i, false, PALETTE_SOLID_WRAP, 0)); // draw pixel with anti-aliasing + unsigned palIndex = (256*ylocn) + phase/2 + (i* SEGMENT.speed)/64; + SEGMENT.setPixelColorXY(xlocn, ylocn, SEGMENT.color_from_palette(palIndex, false, PALETTE_SOLID_WRAP, 0)); // draw pixel with anti-aliasing - color follows rotation } } else for (int i=0; i < 256; i ++) { @@ -6976,7 +6979,7 @@ uint16_t mode_freqmap(void) { // Map FFT_MajorPeak to SEGLEN. SEGMENT.setUpLeds(); SEGMENT.fill(BLACK); } - int fadeoutDelay = (256 - SEGMENT.speed) / 32; + int fadeoutDelay = (256 - SEGMENT.speed) / 96; // WLEDMM if ((fadeoutDelay <= 1 ) || ((SEGENV.call % fadeoutDelay) == 0)) SEGMENT.fade_out(SEGMENT.speed); int locn = (log10f((float)FFT_MajorPeak) - 1.78f) * (float)SEGLEN/(MAX_FREQ_LOG10 - 1.78f); // log10 frequency range is from 1.78 to 3.71. Let's scale to SEGLEN. @@ -7000,7 +7003,7 @@ uint16_t mode_freqmap(void) { // Map FFT_MajorPeak to SEGLEN. return FRAMETIME_FIXED; } // mode_freqmap() -static const char _data_FX_MODE_FREQMAP[] PROGMEM = "Freqmap@Fade rate,Starting color;!,!;!;1f;m12=0,si=0"; // Pixels, Beatsin +static const char _data_FX_MODE_FREQMAP[] PROGMEM = "Freqmap@Fade rate,Starting color;!,!;!;1f;sx=192,m12=0,si=0"; // Pixels, Beatsin ///////////////////////