Wykres commitów

121 Commity (4d0b79f3002b1fedfa6aceb47b7b3e96bae37b4e)

Autor SHA1 Wiadomość Data
Frank 26a47537f9 AR memory optimization - part 2
shorten strings in UI script - saves a few hundred bytes on RAM
2024-10-22 15:15:14 +02:00
Frank 01d43c69fb AR memory optimization - part 1
allocating FFT buffers late makes up to 16Kb heap available when audioreactive is not enabled.

Already tested in MM fork.
2024-10-22 14:45:32 +02:00
Blaz Kristan 65a8dbfe41 FX: Usermod Temperature effect 2024-09-15 11:04:02 +02:00
Frank 2e266ec945 use fixes-size stack buffer
... protected against array overflow due to previous "if (packetSize <= UDPSOUND_MAX_PACKET)"
2024-07-13 09:55:59 +02:00
Frank 3a8e19d1b4 audiosync receive improvements (maintainer edit)
* fixed a few typo's in comments
* fixed 8266 specific warning about 'comparison of integer expressions of different signedness'

based on recommendations made by @willmmiles:
* make sure that audioSyncPacket is the same size  (44bytes) on all platforms
* use static buffer for receiving (avoids heap fragmentation)
* copy receive buffer to local audioSyncPacket struct - avoids alignment problems
* esp32 only: to stay in sync with UDP, Udp.flush() is needed when Udp.parsePacket() is _not_ followed by Udp.read()
2024-07-12 22:09:52 +02:00
gaaat cec7241986 removed commented variables 2024-05-08 15:42:41 +02:00
gaaat 6de77293ad Merge branch '0_15' of https://github.com/Aircoookie/WLED into esp8266-audioreactive-sync 2024-05-08 15:36:10 +02:00
gaaat 0ac53d8353 initial port of MoonModules/WLED/pull/60 and related commit 2024-05-08 15:33:51 +02:00
Frank b88c300d04 audioreactive: workaround for ArduinoFFT bug 93
This fix works around a problem that was solved in upstream ArduinoFFT 2.0.2
2024-05-07 23:38:19 +02:00
Frank 3f9a6cae53 AR: fix for arduinoFFT 2.x API
in contrast to previous 'dev' versions, the storage for windowWeighingFactors is now managed internally by the arduinoFFT object.
2024-05-04 14:34:23 +02:00
Frank cd5494fdd2 AR pin config: SCK == 1 --> PDM microphone 2024-05-04 14:12:44 +02:00
Blaz Kristan b305fd8865 Fix for ArduinoFFT 2024-03-07 20:52:18 +01:00
Blaz Kristan 989bdfb0d5 Reduce string RAM usage for ESP8266 debug builds 2024-02-17 11:33:42 +01:00
Blaz Kristan 276a93605d Multiupdate
- allow DMX for S2 & C3 (ESPDMX, needs testing)
- (debug) string cleanup & optimisation
- WLED_BRAND for AP SSID
2024-02-09 22:15:29 +01:00
Blaz Kristan 7eae8f68d8 Merge branch 'main' into 0_15 2024-02-06 14:47:20 +01:00
Blaž Kristan 06d5bd799f Merge pull request #3732 from wled-install/patch-1
UM Audioreactive: add two compiler options
2024-02-01 18:24:39 +01:00
Blaz Kristan 45dc5e236d Override identifier 2024-01-14 17:38:29 +01:00
Blaz Kristan 9c6dda9bd2 Segment copy bugfix
Audio palette modification
2023-10-29 11:27:17 +01:00
Blaz Kristan 4c1861dd27 Merge branch 'main' into 0_15 2023-10-12 23:08:32 +02:00
Frank 4245767357
fix for partly uninitialized sound sync packets (audioreactive)
audioSyncPacket contains four "invisible" padding bytes added by the compiler. These need to be initialized to zero, as future versions of the protocol will make use of these fields.
2023-10-08 19:54:14 +02:00
Blaz Kristan 6f96dc8f23 Gamma correction for custom palettes (#3399).
Bugfix for audio palettes.
2023-10-01 21:15:14 +02:00
Blaz Kristan d011ca0626 Merge branch 'main' into 0_15 2023-09-24 16:59:27 +02:00
Frank 438525e8ec
AR: use bandpass filter for analog input
Many bad quality analog mics are not centered properly at 1.6V, but stuck at 0V or stuck at 3.3V in silence. The bandpass filter removes DC offsets and improve signal quality.
2023-09-23 16:48:45 +02:00
Blaz Kristan dcace43ce2 Merge branch 'main' into 0_15 2023-09-17 20:39:13 +02:00
Frank 282d58a6fe
audioreactive: stack size tuning
This gives ~3KB extra free heap on -S2.
2023-09-14 18:26:57 +02:00
Blaz Kristan cc68e6b6e6 Squashed commit of the following:
Remove sync receive
Disallow 2D effects on non-2D segments
Optimisations
Sync clarification
AR palettes
Return of 2 audio simulations
Bugfix in sync #3344
    - remove excessive segments
    - ignore inactive segments if not syncing bounds
    - send UDP/WS on segment change
    - pop_back() when removing last segment
Add pairing support for ESP-NOW sync
Reduce string RAM footprint
UDP parse optimisation
Make WizMote work with sync.
ESP-NOW wireless sync POC.
    - caveat: devices have to be on the same channel
    - clashes with WizMote handling ATM
2023-09-10 18:52:14 +02:00
Frank e9723de6c3 minor updates for audioreactive
* remove "not supported" warning on -S2
* minor tweaking of beat detector
* optimized parameters for arduinoFFT
* fixed a few implicit "double" promotions
* minor UDP protocol optimizations
* small optimization for fft task create / suspend
* completely remove analogmic settings for -S3/-S2/-C3 where analog is not supported

changes were already tested extensively in the MM fork.
2023-09-09 21:07:20 +02:00
Will Tatam 7d4fe341f1 Remove direct setup for I2C from ES8388 driver 2023-07-18 17:21:45 +01:00
Will Tatam 76acb7bb58 Merge branch 'main' into AC-ES8388 2023-07-18 16:36:42 +01:00
Blaz Kristan 82e448de7c Beta-3 changes
- remove I2C init  from usermods
- PCF8574 (&co) port expander support
- refactor PIR &  Rotary encoder & 4LD
- reboot race condition
- optimisations
2023-05-30 19:36:14 +02:00
Ewoud 693f52d984 Merge pull request #5 from netmindz/ES8388
WiP - ES8388
2023-05-23 23:41:46 +01:00
Blaž Kristan 9f1a7a1c20 Swap info. 2022-11-29 15:02:56 +01:00
Frank 98138a02e3
audioreactive usermod update (align with MoonMod code) (#2907)
* audioreactive driver update

- Better handling of PDM and I2S Line-in
- Bugfixes for ES7243 (allocateMultiplePins)
- More error messages for ES7243
- sample scaling (needed for sources that use full scale of samples)

* audiorective update

* align SR_DEBUG with WLED_DEBUG
* optional bandpass filter (needed for PDM mics)
* sample scaling for PDM and Line-In
* small improvements for analog input
* bugfixes and small performance improvements
* code for FFT task refactored, for better readablity. Introduces separate functions for filtering and post-processing
* small improvement for beat detection
* default mic settings can be configured at compile time
* correct mic type if MCU does not support PDM or ADC
* hide analog PIN config if not supported by MCU

* audioreactive updates

- minor updates to source code (see discussion in PR #2907)
- usermod readme improvements

* small readme update

* one think I overlooked

* ok, another edit. Now its final. Hopefully.

* small upps

wrong parameter order in debug message.
2022-11-28 20:52:33 +01:00
Ewoud 78e9f5bd1a
Clean up UserMod settings: grouping of variables and add preInfo to variables (#2894)
* Grouping um settings, add pre and post Info, update  SR & 4LD settings

Settings_um.htm: 
- modify addField (grouping)
- addInfo (pre and post texts)

Add preInfo to audio reactive and 4ld usermod

Extra:
platformio: wemos_shield: add audio reactive usermod and update to alt display

* um settings: cpp: lowercase, js: initcap

* um settings: txt only pre, txt2 only post and initCap as function

* Fix rotary encoder info string

Co-authored-by: Blaž Kristan <blaz@kristan-sp.si>
2022-11-26 03:44:04 +01:00
Frank ba0bc31525 UDP sound sync: added decoder for legacy packets
support decoding of sound sync data from SR version > 0.13.0
2022-10-21 12:12:02 +02:00
Frank 64441b39ac critical bugfix
it's possible that volume samples become negative. In this scenario, our simple noise gate does stupid things, and it looks like "effects temporarily lost the sound".
This fix improves the situation, and makes sure that volume samples are always >= 0.
2022-10-06 15:39:28 +02:00
Frank 1ae0dd574d fix for ADC analog
the "wait until I2S buffer fills" trick does not work for ADC sources, as the I2S sampling does not run in background for ADC.
2022-10-04 16:00:36 +02:00
Frank 78e0c3dcca make MIC_LOGGER work again
- EVERY_N_MILLIS somehow does not work. Replaced it,
- make sure that WLED_DEBUG does not report "fake FFT times" whrn FFT code was not running
2022-10-04 13:47:07 +02:00
Frank fb00bef05f AR - necessary constants for 166Khz sampling rate
16kHz might be a good compromise on small MCU's:
- GEQ will show frequencies up to ~6Khz
- FFT process may use up to 32millis (-> 100% CPU load). Try to stay below <60% so FreeRTOS can schedule all tasks properly.

- more CPU time is left for other WLED, so it maintains LED FPS and stays responsive on web UI.
2022-09-20 18:29:27 +02:00
Frank d7bc6b1be7 AR: optimization for small MCUs, part2
Only run FFT when the result will be used.
Please note that this also means that `FFTTime` shown in Info is only meaningful when there is sound input and not silence.

--> To get exact FFT times, the optimization can be disabled by compiling with `-D SR_DEBUG`
2022-09-19 14:09:45 +02:00
Frank 79776ae8bc AR: optimization for smaller MCUs
- this reduces "lagging behind" of I2S sampling on smaller MCU's. The maximum time for FFT is now ~20 millis.
- small improvement for SR_DEBUG
2022-09-19 13:38:52 +02:00
Frank 85fc8710dd mics that need MCLK should work 2022-09-17 20:39:23 +02:00
Frank 01acb08c83 minor fix (typo) 2022-09-16 16:38:24 +02:00
Blaz Kristan dfe4d70198 Merge branch 'audioreactive-prototype' into esp32-s2 2022-09-16 15:38:44 +02:00
Frank 925bc3b3dd AR: get rid of annoying "type conversion" warning 2022-09-11 14:32:00 +02:00
Frank ac10b3a5c7 compilation support for audioreactive
putting all parts that will not compile between #ifdef .... #endif
Tested on S3, cannot say what will happen on other MCUs
2022-09-11 00:12:51 +02:00
Frank cf93d6bb65 more precision for debug info (FFT timing)
keep more detailed timing info for FFT and I2S (WLED_DEBUG)
2022-09-08 22:45:32 +02:00
Blaz Kristan e8942c2968 fix for repeating debug message 2022-09-06 15:52:09 +02:00
Blaz Kristan 42d1ab8a87 Separator in Info dialog. 2022-09-03 00:01:11 +02:00
Frank 77ace76e32 Bugfix: make UDP sound sync work in AP mode
- the connected() method only get called once a Wifi STA connection is established. UDP Sound Sync should also work when sender is in AP Mode.
- added a few comments that should help to understand the code structure.
2022-09-02 13:49:12 +02:00