Commit Graph

336 Commits

Author SHA1 Message Date
Frank
89c33607bc SR_DEBUG shows stack high water marks
some debug support for showing free stack space.
2023-09-18 22:05:53 +02:00
Troy
03f7d5e6e8 Merge branch 'MoonModules:mdev' into downsample4x 2023-09-15 14:41:17 -04:00
TroyHacks
a462242544 Initial 4x downsample PoC for 96Khz sample rate. 2023-09-15 14:37:26 -04:00
Frank
64223dbc02 audioreactive: stack size tuning
This gives ~3KB extra free heap on -S2.
2023-09-14 18:31:24 +02:00
Frank
523893be02 8266 audioreactive: fix crash during OTA
* fix crash when starting OTA: `Panic core_esp8266_main.cpp:191 __yield `
* prevent sound sync reconnect during OTA
2023-08-25 16:18:37 +02:00
Frank
07d204e431 enable AGC in new installs
if SR_SQUELCH is specified by the build env, change AGC default to enabled.
2023-08-25 15:00:49 +02:00
Frank
730b0ece87 cleanup for the cleanup
eliminating a duplicate condition in `#if`
2023-08-24 22:56:02 +02:00
Frank
31badb0e66 8266 onUpdateBegin, and minor cleanup
* 8266 audioreactive: added minimal `onUpdateBegin()`
* small cleanups
2023-08-24 22:50:50 +02:00
Frank
63375f5c84 esp32 audioreactive bugfix
small mistake, huge impact: the right way is to first create our FFT task, then check if task creation was successful.
2023-08-24 22:21:48 +02:00
netmindz
1b3ae20e6d Merge pull request #60 from MoonModules/ESP8266-Sync
Audio sync receive only - EPS8266
2023-08-23 18:59:45 +01:00
Frank
ecc6f1aa62 bugfix
seems I was too fast with removing _P from strncmp_P
2023-08-23 15:39:32 +02:00
Frank
3255530ee3 basic debug support on 8266 2023-08-23 14:40:47 +02:00
Frank
d221745e3f some improvements
* remove some internal variables (soundAgc, multAgc, ....)
* prototype for autoResetPeak(void)
* changed `#ifndef ESP8266` to `#ifdef ARDUINO_ARCH_ESP32`
* replacement code for computing max sample
* Info Page: "audio source" added (idle/receiving/not connected/Off)
2023-08-23 12:37:30 +02:00
Frank
2cc6925f17 agcSensitivity (to align um_data with esp32)
all elements of um_data must be filled, otherwise some effects will crash.
This adds a dummy " agcSensitivity" value that stays at 128.
2023-08-22 23:42:03 +02:00
Frank
f689d5115b 8266 hotfix: solving connectivity problems
* it seems that `WiFiUDP.flsuh()` does something completely different from 8266, and  its actually causing WLED to stall on UI calls. So not usable on 8266.
* fixing a few compiler warnings about "comparing signed and unsigned"

NB: its a hotfix, we have to check if there are other problems on 8266. Also its definitely ugly, but it helps as a band aid.
2023-08-22 23:17:57 +02:00
Frank
92e64b797a 8266 hotfix: solving connectivity problems
* it seems that `WiFiUDP.flsuh()` does something completely different from 8266, and  its actually causing WLED to stall on UI calls. So not usable on 8266.
* fixing a few compiler warnings about "comparing signed and unsigned"

NB: its a hotfix, we have to check if there are other problems on 8266. Also its definitely ugly, but it helps as a band aid.
2023-08-22 22:55:05 +02:00
Will Tatam
0672d1c59d Fix maxVol and binNum 2023-08-13 17:16:11 +01:00
Will Tatam
f0cc7f04ed Fix maxVol and binNum 2023-08-13 17:11:32 +01:00
Will Tatam
f4a1deba34 Expose dynamics - limiter, rise and fall as calc runs on receive too 2023-08-13 16:54:16 +01:00
Will Tatam
96c19b6c50 Revert placement of arduinoFFT.h include as per comments on PR:60 2023-08-13 16:40:43 +01:00
netmindz
0ccf2b9c2e Revert "Remove I2C related code from ES8388 and ES7243 as blazoncek proposes …" 2023-08-11 20:59:34 +01:00
netmindz
e19e464e13 Merge pull request #48 from netmindz/ES-I2C-usage
Remove I2C related code from ES8388 and ES7243 as blazoncek proposes …
2023-08-07 02:05:22 -07:00
Frank
55b84d07e8 audio core improvements
* DC blocker: use higher quality filtering on boards with FPU (-S3 and classic esp32)
* experimental: build option to increase audio task priority - reduces latency
2023-07-29 17:12:10 +02:00
Will Tatam
e7209db038 Fix compile errors for um_data not present on receive node 2023-07-27 12:19:13 +01:00
Will Tatam
baff1a96ac add comment about limitSoundDynamics 2023-07-27 12:10:26 +01:00
Will Tatam
1b4bd50e26 soundAgc should be none by default 2023-07-27 12:08:42 +01:00
Will Tatam
3367039605 Fix compile errors for packet type 2023-07-27 12:04:53 +01:00
Will Tatam
555ea5c9b2 Fix compile errors for soundAgc and limitSoundDynamics - but not ideal, should only be on the sender 2023-07-27 11:57:28 +01:00
Frank
39db568ca9 increase STACK_BUF_SIZE after PR#59
* increase buffer by 64 bytes (sting added in AR usermod)
* better diag message when buffer is full
* change "Arduino  max stack" to debug message
2023-07-27 12:45:14 +02:00
Frank
1477798bb6 Merge pull request #59 from MoonModules/sync-label
Add extra label to give better info as to what sync actually is
2023-07-26 15:38:52 +02:00
Frank
6521717e90 consider human hearing for "Major Peak" frequency
The "Major Peak" (for double-notes effects) was computed on the raw FFT results.
However the human ear is more sensitive to higher frequencies (pink noise profile).

This code change considers human ear properties for major peak computations.
Effects like "freqmap" will look much more vivid afterwards, as higher frequencies will now have a stronger influence (harmonics are still suppressed properly).
2023-07-26 13:30:44 +02:00
Will Tatam
7a41771382 Attempt at creating audio sync listen EPS8266 2023-07-26 02:31:24 +01:00
Will Tatam
a7e0ba56e4 Attempt at creating audio sync listen EPS8266 2023-07-25 21:19:53 +01:00
Will Tatam
565293ca8c Attempt at creating audio sync listen EPS8266 2023-07-25 19:58:08 +01:00
Will Tatam
a44c14aa9e Attempt at creating audio sync listen EPS8266 2023-07-25 19:47:57 +01:00
Will Tatam
9968b1f9d1 Add extra label to give better info as to what sync actually is 2023-07-25 16:53:36 +01:00
Frank
8aef4347a1 re-enable old peak detect algo, plus ripplepeak bugfix
* re-enabled old detector which does not detect beats. However something bad may still be better than nothing...

* fixed a typo in RipplePeak and Waterfall effect, which cased wrong configuration of the peak detector.

resolves https://github.com/MoonModules/WLED/issues/43
2023-06-18 22:08:55 +02:00
Frank
af6091b493 fixing some memory leaks
* audio_reactive.h: catch memory errors from WiFiUDP
* udp: explicitly flush unused receive buffers.
* wled.cpp: additional debug info about "largest available block"
* FX_fcn.cpp: free _globalLeds before running purgeSegments().
2023-06-07 17:10:32 +02:00
TroyHacks
7e1d15c87b Merge branch 'audio_fastpath' of https://github.com/MoonModules/WLED into audio_fastpath 2023-06-07 10:35:51 -04:00
TroyHacks
06344aeb41 FFT UDP fush if not read. 2023-06-07 10:35:28 -04:00
Frank
f0dd66e736 SoundSync: use local static buffer
thanks @netmindz for pointing out.
2023-06-07 14:07:50 +02:00
Frank
b6f1a591ee global buffer for UDP sound sync
to prevent memory fragmentation.
* use global (static) buffer for receiving
* added missing flush()
2023-06-07 12:16:22 +02:00
Will Tatam
b62e9f7278 Remove I2C related code from ES8388 and ES7243 as blazoncek proposes that they are not required if we are always using the system default I2C bus 2023-05-29 18:30:48 +01:00
Frank
49f2e26ab5 arduinoFFT hash update
to fix the gh build, following latest dev.
2023-05-27 00:00:59 +02:00
Frank
56b6290fdd Update audio_reactive.h
small oops
2023-04-30 21:03:00 +02:00
Frank
0c58c12d0f audio fastpath: reduce filter delay
- reduced filter strength, which also reduces delays
- increased I2S buffer count, and reduced I2S cycle time to recover from delays faster.
2023-04-30 20:58:06 +02:00
Frank
a1bdb47c30 trying to make sound pressure less boring for line-in
"sound pressure" for line-in was always close to max - which is expected, because the ADC chip utilize the full 24/16bit sample range.
The new calculation leads to some more "movement".
2023-04-10 23:57:44 +02:00
Frank
8ba43b63ec Sound pressure: modified correction factors for PDM and analog 2023-04-10 03:29:59 +02:00
Frank
61949cfdc8 Sound Pressure - some optimizations
- slightly extend input range
- add correction factors for some sound sources
- gravimeter: tweaking
2023-04-10 02:04:53 +02:00
Frank
197e120e3b estimated audio sound pressure 2023-04-06 18:58:20 +02:00