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
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
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
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
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