Commit Graph

5430 Commits

Author SHA1 Message Date
Will Tatam
584ca5e8ae Double buffer needed to prevent flicker for effects like GEQ 2024-07-13 13:51:59 +01:00
Frank
346914b965 setPixelColorXY small optimizations
Caching a few segment vars gives a 5% speedup on big setups.

Its 2024, and compilers are still stupid :-P
2024-07-13 01:37:43 +02:00
Frank
982a4bb155 Merge pull request #139 from MoonModules/upstream_patch_clusterf
AC minor patch cluster
* Anti-Aliased Lines and Circles
* replacing deprecated functions in ws.cpp
* using global brightness in analogue clock overlay
* fix for palette names (custom palettes)
* bugfix for UI: when resizing the window, it always jumped to the Colors tab
* UI: add webpage shortcuts for tabs
2024-07-13 01:13:53 +02:00
Troy
4538d24873 Merge pull request #144 from troyhacks/AC101-Support
AC101 audio support
2024-07-10 19:15:09 -04:00
Troy
1c33a4bbea Remove references to AC101 mic mode (not implemented) 2024-07-10 19:08:58 -04:00
Troy
f7e2f14ca4 Minor tab and comment clean-up. 2024-07-10 19:03:38 -04:00
Troy
1fe871c42c Fully working with analog loopthru 2024-07-10 18:54:02 -04:00
Will Tatam
60fbf07bca Fix mx_width and height for 4scan 2024-07-10 23:01:21 +01:00
Troy
c069385600 Merge branch 'MoonModules:mdev' into AC101-Support 2024-07-10 15:32:43 -04:00
Will Tatam
fb30f9c641 Add Hub75Matrix 64x32 (Outdoor 8S) 2024-07-09 21:35:53 +01:00
Will Tatam
5123128e9c Limit hub75 chain length by height 64 not width to allow for 2 x 64x32 2024-07-09 18:39:58 +01:00
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
Troy
28cb5c88b6 Skeleton, not working yet. 2024-07-03 16:20:44 -04: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
Frank
c07658a7cb post-merge
* fix drawLine prototype
* a few more "inline"
* typo
2024-06-26 23:41:38 +02:00
Blaz Kristan
2aad3f5356 Antialiased line & circle 2024-06-26 22:40:59 +02:00
Blaž Kristan
87b5badd5b Merge pull request #3944 from paspiz85/pas4
Using brightness in analog clock overlay
2024-06-26 22:08:03 +02:00
Pasquale Pizzuti
c22c5b75a0 using global brightness 2024-06-26 22:07:18 +02:00
Woody
383c797746 add Webpage shortcuts, resolves #2362 2024-06-26 21:45:53 +02:00
Pasquale Pizzuti
b01f3118b4 using color_fade 2024-06-26 21:43:20 +02:00
Woody
feac33653f Fix resizing bug
The bug was that when resizing the window, it always jumped to the Colors tab instead of staying on the currently selected tab.
2024-06-26 21:43:20 +02:00
Pasquale Pizzuti
74e999b1e5 using brightness in analog clock overlay 2024-06-26 21:43:20 +02:00
Blaz Kristan
c5283da32a Fix for #3878 2024-06-26 21:38:02 +02:00
Blaz Kristan
3df3b9acaf ArduinoFFT update
shadow variables
2024-06-26 21:35:19 +02:00
thatdonfc
543dfd206d Fix palette names when palette ID > 58 and not custom 2024-06-26 21:21:54 +02:00
Will Miles
775e07c6d6 serveLiveLeds: Use dynamic buffer
There were three problems here:
- AsyncWebServer is going to copy to a heap buffer anyways, so we might
   as well just pass it one it can use
- The buffer size estimate was wrong -- we need 9 bytes per pixel
   ("RRGGBB",), so the buffer could overflow, and it was not
   considering the extra 2D requirements
- On ESP8266, the stack allocation was overflowing the stack, causing
  corruption and crashes.
2024-06-26 21:20:41 +02:00
Will Miles
9103f6a4df Update for new AsyncWebSocketBuffer
Eliminate the extra indirection and allocate shared buffers directly.
2024-06-26 21:08:21 +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