Commit Graph

5405 Commits

Author SHA1 Message Date
Frank
528ec1fa4c version of today, -b32.41
featuring FastPath v2
2024-07-05 18:25:48 +02:00
Frank
4b6d890cf7 Merge pull request #141 from MoonModules/Full_audio_FastPath
Full audio fastpath (part2)

This PR allows the audio core to deliver sound data and FFT results 2x faster (43 sps --> 87 sps).
Frequency reactive effects (GEQ, FreqMap, DJLight) will have improved "on-spot" reactions, and will typically react to audio changes within 10-20 milliseconds.
Volume reactive effect will react a bit better (but still lagging behind, due to legacy filtering design that was created when only low-quality analog mics were available). You can try changing the "Mic Quality" option to _low noise_ this will further reduce latency.

Limitations
* only works on esp32-S3 and classic esp32, due to higher CPU load for FFT
* Will not work well with analog microphone
* If your LEDs fixture achieves less than 60-80 fps, you will probably not see a difference.
2024-07-05 18:22:09 +02:00
Frank
4d03af6466 mic quality dropdown, cleanup
* mic quality: When set to "low noise" or "perfect", only minimal smoothing is performed on the "Mic Volume" input.
Every filter adds a delay, so this option can lead to better on-spot responses from effects.

* cleanup: removed a few unused variables and unused code.
2024-07-05 17:53:43 +02:00
Frank
bd997f7056 added Blackman window 2024-07-05 15:37:03 +02:00
Frank
cba883c663 parameter tuning
*some filter parameter tinkering
* restore FFT_MajPeakSmth in UDP SoundSync receiver
2024-07-05 15:12:41 +02:00
Frank
160e66a766 user-selectable FFT window functions
experiments: user-selectable FFT "windowing" options

https://en.wikipedia.org/wiki/Window_function#Cosine-sum_windows
2024-07-04 21:44:09 +02:00
Frank
9b14de06b2 fix build error on -S2, -C3 2024-07-04 20:13:57 +02:00
Frank
7d04660b91 postProcessFFTResults adjustments for FastPath
samples arrive 2x as fast in fast mode - adjust filters accordingly
2024-07-04 20:06:13 +02:00
Frank
7883474404 postProcessFFTResults minor refactoring
* limiter on/off : made the logic a bit clearer.
* use a simpler way of writing filters: a = n*a + (1-n)*b --> a = a+ n*(b-a)

no functional impact.
2024-07-04 18:37:31 +02:00
Frank
eaf6117f31 Merge branch 'mdev' into Full_audio_FastPath 2024-07-04 17:55:12 +02:00
Frank
73a7ff1cdd Merge pull request #142 from MoonModules/Reduced_Stackbuffer
reduce stack buffer usage for AudioReactive settings page
Total savings: from 3530 down to 2566 bytes = 970 bytes
2024-07-03 21:40:40 +02:00
Frank
27dd6bddac AudioReactive:digitalmic:pin[] --> uxp
before: String buffer usage: 2805 of 4037 bytes
after:    String buffer usage: 2566 of 4037 bytes
2024-07-01 22:56:18 +02:00
Frank
8cfd0df710 Update xml.cpp 2024-07-01 22:54:51 +02:00
Frank
29013a3f83 auto-replace long functions with short names
adI = addInfo
adD = addDropdown
adO = addOption
adF = addField

before: String buffer usage: 3183 of 4037 bytes
after:    String buffer usage: 2805 of 4037 bytes
2024-07-01 22:54:24 +02:00
Frank
31a12f5098 AudioReactive -> ux
before: String buffer usage: 3530 of 4037 bytes
After:    String buffer usage: 3183 of 4037 bytes
2024-07-01 21:10:45 +02:00
Frank
a317af42fc trying to make effects respond to changes quicker in fastpath mode
filter parameter tuning
2024-07-01 16:37:44 +02:00
Frank
e98858c751 audio FASTPATH, part 2
* introducing sliding window FFT, which effectively doubles the rate of samples - and FFT results - produced per second. As a side-effect, it also makes FFT a bit less noisy.

As sliding window FFT requires double the number of FFT runs, the feature is only enabled on esp32 and esp32-S3.
2024-07-01 16:29:09 +02:00
Frank
61afb26d21 Update audio_reactive.h - fix compile error 2024-07-01 15:53:20 +02:00
Frank
2987f0d045 SR_STATS: filter time
adding "Filtering Time" to SR statistics (info page)
2024-07-01 15:46:51 +02:00
Frank
9803cecee2 new idea to reduce stack buffer usage
the JS string can be shortened, by putting the usermod into a variable `ux` that is used instead of repeating the string 'Aduioreactive'.

For now its just an experiment, to see if the idea works on several browsers.
2024-07-01 02:46:14 +02:00
Frank
f3cbe75506 remove support for old ArduinoFFT library < 1.9.2
there is no reason any more to still use the old arduinoFFT library version.
2024-07-01 02:39:44 +02:00
Frank
4f9f250a1d only run FFT.dcRemoval() when no filtering was applied
FFT.dcRemoval() may introduce unwanted artifacts into the FFT result.
2024-07-01 02:29:14 +02:00
Frank
f432cb20dc remove experiments:freqRMS option
the default value seems to work well.
2024-07-01 02:14:00 +02:00
Troy
93ec9b9151 Stop double first pixel on waterfall effect 2024-06-25 23:28:33 -04:00
Frank
2dd9a8232e kicking gh build re-run 2024-06-24 22:32:33 +02:00
Frank
c67d5dbdc4 build 2406240 - release v0.14.1-b32 2024-06-24 21:51:34 +02:00
Frank
bc006268ae new MM build for -C3 with 2MB flash (no OTA) 2024-06-24 21:50:49 +02:00
Frank
2510292d1a ws preview: better handling of RGBW
avoid over-saturation in preview
2024-06-24 18:04:18 +02:00
Frank
c876267c95 Update audio_reactive.h - debug fix 2024-06-24 17:14:09 +02:00
Frank
899899094f sound sync: use last remaining gap to transmit soundPressure
* use last remaining two bytes in audioSyncPacket for transmitting soundPressure
* 0x0 is treated as "legacy value" --> soundPressure = volumeSmth;
* decodeAudioData: ensure receivedPacket struct members  are correctly aligned -
strictly speaking it is not safe to cast a uint8_t* as it does not offer any alignment guarantees.
* remove 8266 special handling in audioreactive::setup()
2024-06-24 17:01:43 +02:00
Frank
e28fa67bf0 version bump -b32.40 2024-06-23 00:38:27 +02:00
Frank
6dd8f6e34f Merge pull request #133 from Brandon502/mdev
Game of Life Memory Leak Fix + Other Changes

Fixed memory leak using new. Removed gameoflife struct and reverted back to using pointers to segenv.data (similar to starLeds version).

Added Blur slider. Blurs dead cells slowly to bgColor depending on slider instead of immediately dying. Doesn't effect game logic.

Removed confusing pauseFrames, uses .step to pause now.

Keeps track of last palette used and immediately recolors cells if new palette/color selected. Can be improved.

Changes gameSpeed slider to be more consistent. Speed = updates/second now in increments of 4.
2024-06-23 00:17:15 +02:00
Frank
2edfcb3343 small optimization for color_blend
* Early exit when color1 == color2 (nothing to blend)
* pre-calculate `blendmax - blend` (repeated 4 times)
2024-06-20 12:26:43 +02:00
Brandon502
9ef8ff6a16 GoL - Redraw loop changes
Merged generation == 1 checks into standard checks.
2024-06-20 01:07:52 -04:00
Brandon502
086b0e3e0e GoL - Game start transition
Starting alive cells are randomly colored in and bg fades on game start.
2024-06-19 23:09:31 -04:00
Brandon502
4aee7eb6c6 GoL - Small fix
Remove redundant check
2024-06-19 19:00:14 -04:00
Brandon502
e8e784ddcd GoL CRGB changed to uint32 & color_blend()
Other small changes.
2024-06-19 15:25:51 -04:00
Brandon502
3d12f0f8ed Merge remote-tracking branch 'upstream/mdev' into mdev 2024-06-16 21:39:31 -04:00
Brandon502
015260c5ad GoL - Small color fix and glider detection change.
Wrap is disabled if only 5 remaining alive cells (Glider).
2024-06-09 15:50:07 -04:00
Frank
fc173b3bc0 fix compiler warning for matrixportal buildenv 2024-06-06 14:39:56 +02:00
Frank
578c6bb9d8 make sure that HUB75 is recognized as "adressable leds"
when IS_DIGITAL and IS_PWM are false, palettes and color wheel are not shown in UI
2024-06-05 23:05:34 +02:00
Brandon502
5a6d80f30b GoL - Correct data allocation
Fixed overlooked data allocation after switching gliderLength to uint16.
2024-06-05 12:41:36 -04:00
Brandon502
c655db3864 GoL - gliderLength switched to uint16_t 2024-06-05 11:46:23 -04:00
Frank
b79a0b4fd7 use NPB 2.7.9 on -S2 -> reduces led flickering 2024-06-05 17:29:57 +02:00
Frank
c617584f0b bugfix for -S3: allow to use pin 48 for LEDs
needed on boards like "S3 supermini" with ws2812 on gpio48
2024-06-05 13:28:36 +02:00
Brandon502
f528aef6ba GoL - Allows default overlay mode.
Flicker fixed by always redrawing dead cells if overlay unchecked. Can swap between overlay types by checking/unchecking overlayBG.
2024-06-05 01:07:27 -04:00
Brandon502
9f1ea87fb1 Merge branch 'mdev' of https://github.com/Brandon502/WLED into mdev 2024-06-04 16:19:23 -04:00
Brandon502
8c3e2cefab GoL - Rework
Blur now fades while game is paused.
New blur mode when blur slider is >220
Added variables to make code easier to follow instead of check1 custom1 etc. (not needed)
Removed % with random8 calls.
Misc changes
2024-06-04 16:18:54 -04:00
Brandon502
5baffaf034 Merge branch 'MoonModules:mdev' into mdev 2024-06-04 12:06:11 -04:00
Frank
c532b5d31a Add UI error 14 description 2024-05-31 18:18:58 +02:00