Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Usermod - Auto Playlist #124

Merged
merged 68 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
993b123
Basic usermod for detecting silence
netmindz Mar 5, 2024
b161179
add preferences
netmindz Mar 5, 2024
4f9675b
add preferences
netmindz Mar 5, 2024
43e5a12
name
netmindz Mar 5, 2024
6b194ef
Merge branch 'ar-energy' into auto-playlist
netmindz Mar 5, 2024
730714b
Add TroyHacks auto change
netmindz Mar 6, 2024
a8661b5
Set autochange in correct state
netmindz Mar 6, 2024
265339c
Trying to add enable button to info panel
netmindz Mar 6, 2024
995521b
Merge branch 'ar-energy' into auto-playlist
netmindz Mar 7, 2024
95e94a9
Try to use existing FTT data
netmindz Mar 8, 2024
5c4c72d
Do not auto-select preset if the lamp is off
netmindz Mar 12, 2024
1210923
Merge branch 'ar-energy' into auto-playlist
netmindz Mar 14, 2024
c0f2f74
Load presets from playlist
netmindz Mar 14, 2024
3ed5b89
Skip if turned off
netmindz Mar 14, 2024
c4cb5af
Disable auto-playlist if manual selection is made
netmindz Mar 18, 2024
2fdd438
Disable AutoPlaylist if user makes manual change
netmindz Mar 21, 2024
cfafa0d
Auto disengage
netmindz Mar 21, 2024
fd714e3
Remove buttton
netmindz Mar 22, 2024
734ba39
Fixes. Auto is too animated.
troyhacks Mar 23, 2024
8d687b3
Debugging
troyhacks Mar 23, 2024
2fe86bd
Feature complete... and better!
troyhacks Mar 23, 2024
9e9b014
change_threshold pushback when window missing.
troyhacks Mar 23, 2024
901e4fa
Better automatic change_intervals
troyhacks Mar 24, 2024
5ff4475
calculations based on normalized FFT results
troyhacks Mar 25, 2024
b52773c
comments and some temp removal of other debug
troyhacks Mar 25, 2024
977002f
better debug messages
troyhacks Mar 25, 2024
cc01e38
Comments added.
troyhacks Mar 25, 2024
22be977
IfDefs to quiet some other debug lines during debugging.
troyhacks Mar 25, 2024
793b108
Better debug
troyhacks Mar 25, 2024
3279134
Tidy
troyhacks Mar 25, 2024
13bfe60
Faster change_threshold catch-up
troyhacks Mar 26, 2024
d922374
Better change window tracking.
troyhacks Mar 27, 2024
022b310
Comments and debug faff.
troyhacks Mar 27, 2024
58184a5
Moved calcs into usermod except zero crossings
troyhacks Mar 27, 2024
9b8f0ba
Bug fix with um_data length
troyhacks Mar 27, 2024
cd8884d
Skip change logic for distance freefall
troyhacks Mar 28, 2024
494646a
Tweak status
netmindz Mar 26, 2024
bf1e633
Merge branch 'ar-energy' into auto-playlist
netmindz Mar 28, 2024
cce7d4c
Cleanup
netmindz Mar 28, 2024
1e934d3
Prevent crash trying to load playlist -1
netmindz Mar 29, 2024
04a8681
WM8978 fix for IDF below 4.2.0
troyhacks Mar 30, 2024
c36adbd
Button added to Info panel. Logic needs work.
troyhacks Mar 30, 2024
1f659aa
"Enabled" mostly working
troyhacks Mar 30, 2024
c3bf851
Higher possible change threshold
troyhacks Mar 30, 2024
f6fa223
Merge branch 'mdev' into pr/124
softhack007 Apr 4, 2024
c9c9f40
Merge branch 'pr/125' into pr/124
softhack007 Apr 4, 2024
b72e402
bugfixing
softhack007 Apr 4, 2024
39f7a2e
Removed button, bettr Info pane, debug flag.
troyhacks Apr 5, 2024
a90c9f0
Update FX_fcn.cpp
troyhacks Apr 5, 2024
1f9e800
Update FX_fcn.cpp
troyhacks Apr 5, 2024
6e23b09
Update FX_2Dfcn.cpp
troyhacks Apr 5, 2024
7b40007
Merge branch 'mdev' into auto-playlist
netmindz Apr 5, 2024
abc8114
Added new internal functionality enabled tracking
troyhacks Apr 5, 2024
f9eb6d2
functionality_enabled logic
troyhacks Apr 5, 2024
c5a71af
Update usermods_list.cpp
troyhacks Apr 5, 2024
02b464f
Smoothing sound detection
troyhacks Apr 5, 2024
92ad330
Merge branch 'auto-playlist' of https://github.com/netmindz/WLED into…
troyhacks Apr 5, 2024
1ca7faf
Merge branch 'mdev' into pr/124
softhack007 Apr 6, 2024
5186c0f
autoplaylist bugfix for playlists with only one preset
softhack007 Apr 7, 2024
2a4810f
autoplaylist filter improvements
softhack007 Apr 7, 2024
03cbc52
ar_energy small improvements
softhack007 Apr 9, 2024
70bfbd5
ar_energy: fix a math error
softhack007 Apr 10, 2024
6e24850
ar_energy: improved energy reconstruction
softhack007 Apr 10, 2024
af028b5
Accepting some Softhack007 suggestions
troyhacks Apr 14, 2024
dfab0ca
Accepting more Softhack007 suggestings
troyhacks Apr 14, 2024
11315a8
unsigned wraparound prevention
troyhacks Apr 14, 2024
acfbe89
suspend playlist engine while auto-change is active
softhack007 Apr 16, 2024
d42148d
Info page optimizations
softhack007 Apr 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,7 @@ build_flags_S =
; -D WLED_DISABLE_2D ;; un-comment to build a firmware without 2D matrix support
; -D WLED_USE_CIE_BRIGHTNESS_TABLE ;; experimental: use different color / brightness lookup table
-D USERMOD_AUDIOREACTIVE
-D USERMOD_AUTO_PLAYLIST
-D UM_AUDIOREACTIVE_USE_NEW_FFT ; use latest (upstream) FFTLib, instead of older library modified by blazoncek. Slightly faster, more accurate, needs 2KB RAM extra
; -D USERMOD_ARTIFX ;; WLEDMM usermod - temporarily moved into "_M", due to problems in "_S" when compiling with -O2
-D WLEDMM_FASTPATH ;; WLEDMM experimental option. Reduces audio lag (latency), and allows for faster LED framerates. May break compatibility with previous versions.
Expand Down
3 changes: 1 addition & 2 deletions usermods/audioreactive/audio_reactive.h
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,7 @@ void FFTcode(void * parameter)
// run peak detection
autoResetPeak();
detectSamplePeak();

// we have new results - notify UDP sound send

haveNewFFTResult = true;

#if !defined(I2S_GRAB_ADC1_COMPLETELY)
Expand Down
6 changes: 6 additions & 0 deletions usermods/audioreactive/audio_source.h
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,13 @@ class WM8978Source : public I2SSource {
_wm8978I2cWrite( 1,0b000111110); // Power Management 1 - power off most things, but enable mic bias and I/O tie-off to help mitigate mic leakage.
_wm8978I2cWrite( 2,0b110111111); // Power Management 2 - enable output and amp stages (amps may lift signal but it works better on the ADCs)
_wm8978I2cWrite( 3,0b000001100); // Power Management 3 - enable L&R output mixers

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 2, 0)
_wm8978I2cWrite( 4,0b001010000); // Audio Interface - standard I2S, 24-bit
#else
_wm8978I2cWrite( 4,0b001001000); // Audio Interface - left-justified I2S, 24-bit
#endif

_wm8978I2cWrite( 6,0b000000000); // Clock generation control - use external mclk
_wm8978I2cWrite( 7,0b000000100); // Sets sample rate to ~24kHz (only used for internal calculations, not I2S)
_wm8978I2cWrite(14,0b010001000); // 128x ADC oversampling - high pass filter disabled as it kills the bass response
Expand Down
Loading
Loading