Commit Graph

347 Commits

Author SHA1 Message Date
Troy
72e8fca943 Merge branch 'MoonModules:mdev' into Strip_Level_Color_Adjust 2024-06-06 11:57:03 -04:00
Frank
2144613423 compatibility with upstream arduinoFFT 2.x
its still recommended to use the softhack007 version - -> optimized for ESP32 boards, and  reduced memory footprint
 https://github.com/softhack007/arduinoFFT.git#develop @ 1.9.2
2024-05-11 13:57:49 +02:00
Frank
7b58727254 bugfix for sound sync - fftResult[] did not use 255
transmitData.fftResult[] and fftResult[] are both uint8, no need to constrain the value.
2024-05-08 21:39:38 +02:00
Frank
5a377103b5 small accuracy improvement
(int)currentResult is a truncation, so we need to add 0.5 for proper rounding.
also changed inefficient "constrain" into faster max(min( ...))
2024-05-08 21:04:07 +02:00
Frank
adf5afe84a include the GPLv3 permission statement in some MM-specific files
Please note that these statements are included for clarification purposes only.
WLED-MM specific source code is always provided under GPLv3, see LICENSE.
2024-05-08 12:52:07 +02:00
Troy
8cb5028a3e Merge branch 'MoonModules:mdev' into Strip_Level_Color_Adjust 2024-05-07 09:33:46 -04:00
Frank
daec240c52 small improvement for athom music 2024-05-04 13:55:25 +02:00
Frank
ecf7acbc76 AR pin config: SCK == 1 --> PDM microphone 2024-05-04 13:36:56 +02:00
Frank
3567243d18 small improvements for audioreactive
* added ESP_INTR_FLAG_IRAM to reduce lost samples (only on ESP32 without PSRAM) --> may cause crash if used wrongly
* FFT_MajorPeak stabilized, by ignoring extreme results
2024-04-28 18:52:19 +02:00
Troy
e765531179 Merge branch 'MoonModules:mdev' into Strip_Level_Color_Adjust 2024-04-20 09:08:43 -04:00
Frank
0f677c35f5 typo 2024-04-18 21:09:28 +02:00
Frank
7dc6659e70 audioreactive: better do DC removal after FFT.complexToMagnitude(); 2024-04-18 13:36:00 +02:00
Frank
0e0728b15d audioreactive: workaround for ArduinoFFT bug 93
This fix works around a problem that was solved in upstream ArduinoFFT 2.0.2
2024-04-18 12:57:29 +02:00
Troy
0a80cbc82b Merge branch 'MoonModules:mdev' into Strip_Level_Color_Adjust 2024-04-17 10:04:54 -04:00
netmindz
0f79e9b7ff Merge pull request #124 from netmindz/auto-playlist
New Usermod - Auto Playlist
2024-04-16 22:38:56 +01:00
Frank
b27686bd2b audioreactive small optimization
* clear vImag[] using memset
* zerocrossing detection: directly check sign bit
2024-04-10 12:34:32 +02:00
Frank
1ca7faf142 Merge branch 'mdev' into pr/124 2024-04-06 21:15:24 +02:00
Frank
bf6932ecb7 ar_energy: reduced zeroCrossingCount magnitude by 1/3
zero crossing counter is often larger than in the prototype by @troyhacks - due to calculation after filtering (catches more crossings), and due to the fixed condition for detecting zero crossings (doubles the number of crossings).

This patch reduces the final value to 2/3, so it typically stays below 256.
2024-04-05 14:57:55 +02:00
Frank
c9c9f409f4 Merge branch 'pr/125' into pr/124 2024-04-04 23:53:59 +02:00
Frank
33b46b820f optimizations and bugfixing
* calculate zero crossings after filtering out DC offsets
* update effect variable only once
* fix a logic error when detecting zero crossings
* fix array bounds violation when creating umdata entries
2024-04-04 23:52:31 +02:00
Troy
04a8681f71 WM8978 fix for IDF below 4.2.0 2024-03-30 11:09:14 -04:00
Will Tatam
ebab56ada5 Update logger 2024-03-29 13:39:09 +00:00
Will Tatam
d9dceb64ed Attempt at adding zeroCrossingCount to audio-sync 2024-03-28 20:06:47 +00:00
Will Tatam
cce7d4c79e Cleanup 2024-03-28 19:57:42 +00:00
Will Tatam
9eabbf3789 Sync audio_rective changes from auto-playlist branch 2024-03-28 19:40:59 +00:00
Troy
9b8f0ba873 Bug fix with um_data length 2024-03-27 16:12:38 -04:00
Troy
58184a5a74 Moved calcs into usermod except zero crossings 2024-03-27 15:45:32 -04:00
Troy
cc01e38cad Comments added. 2024-03-25 12:15:31 -04:00
Troy
5ff44755d8 calculations based on normalized FFT results 2024-03-25 08:19:05 -04:00
Troy
2fe86bde5d Feature complete... and better! 2024-03-23 17:41:34 -04:00
Troy
8d687b3a86 Debugging 2024-03-23 10:10:09 -04:00
Troy
734ba39399 Fixes. Auto is too animated. 2024-03-23 09:29:32 -04:00
Will Tatam
9923a7a7d8 Swap to unsigned and pointers 2024-03-08 00:51:12 +00:00
Will Tatam
45d2ae7744 Clearer variable names 2024-03-07 19:21:03 +00:00
Will Tatam
6550504f60 Troy's extra data 2024-03-05 23:35:23 +00:00
Troy
639e911e4b Decimation wins for better speed with accuracy 2024-03-04 10:19:58 -05:00
Troy
ed897968b9 Decimation instead of averaging. 2024-03-03 15:29:43 -05:00
Troy
f0aa5d3a9e Merge branch 'MoonModules:mdev' into downsample4x 2024-02-25 08:36:53 -05:00
Blaž Kristan
d484df0d06 Merge pull request #3732 from wled-install/patch-1
UM Audioreactive: add two compiler options
2024-02-12 22:02:04 +01:00
Troy
3c2feb82ed Settings to reject mic noise during line-in use. 2024-02-06 14:36:22 -05:00
Frank
2277d81699 AR sound sync bugfix
local samples were "sneaking in" when mode "receive or local" was receiving from network source.
2024-01-27 17:44:04 +01:00
Frank
14ab70dffe AR sound sync - document data offsets
The compiler has added gaps, to align our struct for hardware compatibility.

* made the gaps explicit
* added  `__attribute__ ((packed))`, to ensure that the data layout is the same on all platforms (extensa, risc-v, 8266)
2024-01-26 22:26:09 +01:00
Troy
0401878463 Merge branch 'MoonModules:mdev' into downsample4x 2024-01-02 10:20:06 -06:00
Frank
b95a2094ce AR sound sync - make sequence checks user configurable
to support scenarios where several sending nodes are needed.
2023-12-30 19:50:07 +01:00
Frank
04136791b5 sound sync: shown "v2+" when framecounter is used
v2+ = improved format (MM fork only) including sequence frameCounter.
2023-12-18 10:44:05 +01:00
Frank
9024872f63 code spell checking - part3 (usermods)
if you can spell Fahrenheit, you can't spell Celsius. And vice versa :-)
2023-12-14 22:22:46 +01:00
Frank
4f30f69584 found a way to increase TCP stacksize (for AudioReactive UI)
we can use `-D CONFIG_ASYNC_TCP_TASK_STACK_SIZE=xxxx` to increase the stack size of AsyncWebserver - default is 8196.
This should give us a bit of headroom for new UI items.

We still need PR #94 for more savings.
2023-12-12 00:43:48 +01:00
Frank
6cd9d80dbe small fixie for audioreactive (info page)
info page was not showing "AGC gain" when local mic was in use during "receive or local" mode.
2023-12-06 12:32:57 +01:00
Frank
d2fc1f7bf9 experimental: Souns Sync "receive or local" mode
new "Receive or Local" mode:
if UDP sound is missing or interrupted for too long, switch back to local audio input.
UDP sound resumes when a fresh packet is received again.

--> still needs testing, and even more regression testing.
2023-12-05 23:46:01 +01:00
Frank
e14d5e6975 sound sync: replace magic numbers with constants 2023-12-05 21:30:29 +01:00