Frank
dfd839de87
add braces around potentially-empty (debug) else branches
...
the compiler advises "suggest braces around empty body in an 'else' statement [-Wempty-body]". We follow.
2022-11-24 16:53:58 +01:00
Frank
8899704f91
Mic Profile for SPM1423
...
* added mic profile for SPM1423 (a new microphone board with PDM interface).
* npm run build (yo-man).
2022-11-24 12:28:11 +01:00
Frank
17e6a887cb
FFT code restructuring, part2
...
puting mic filter and FFT post-processing into seperate funtions, to improve code clarity.
2022-11-23 14:39:19 +01:00
Frank
068e88453c
FFT code restructuring, part1
...
- FFT code restructuring
- align definition of SR_DEBUG with WLED_DEBUG
2022-11-23 13:12:33 +01:00
Frank
1446bab3c5
I2S: another attempt to make "slave mode" work
2022-11-22 17:14:02 +01:00
Ewoud
b0b78a9959
um settings: cpp: lowercase, js: initcap
2022-11-21 17:45:53 +01:00
Frank
18693dc96a
CS5343 optimization
...
-updated Mic Profile (Line-in)
- squelch=2 is enough
2022-11-21 12:13:46 +01:00
Ewoud
ea5ac3f55a
SR settings bug fix
2022-11-20 14:57:50 +01:00
Ewoud
e5b54c947b
Grouping um settings, add pre and post Info, update SR & 4LD settings
...
Settings_um.htm:
- modify addField (grouping)
- addInfo (pre and post texts)
2022-11-20 13:53:47 +01:00
Frank
c57f75c759
small change
2022-11-19 18:14:15 +01:00
Frank
cfe6fbb00c
es7243 additional error checking
...
- es7243: check for valid SCK and MCLK
- minor UI improvements
2022-11-19 17:35:44 +01:00
Frank
a4ab3ee6f1
fix I2C pin alloc, and prep for settngs decluttering
...
ES7243: fix I2C pin alloc (multi-pin)
AR settings: prepare for de-cluttering
2022-11-19 16:38:53 +01:00
Ewoud
37e88ef08a
Merge pull request #4 from netmindz/i2s-labels
...
Change lables for digital mic to be their name
2022-11-19 14:25:26 +01:00
Will Tatam
c620a50b1d
Change lables for digital mic to be their name, with common acronyms listed after rather than assuming everyone uses INMP441
2022-11-19 12:44:26 +00:00
Frank
d593120dae
some sanity checks for new MCUs
...
- warn if I2S does not have analog support
- warn if I2S does not have APLL clock
- compilation error if I2S not supported
2022-11-19 02:55:45 +01:00
Ewoud
aef16b5199
platformio: add squelch, gain, profile defaults and mic / lineIn envs
...
audio_reactive.h:
- add SR_SQUELCH, SR_GAIN and SR_FREQ_PROF
- Set AGC default to 1
- Rename DMTYPE to SR_DMTYPE
platformio.ini:
- _base entries: remove env:
- wemos_shield_esp32_4MB_max_base
- add wemos_shield_esp32_4MB_ICS4343x_max
- add wemos_shield_esp32_4MB_SPM1423_max
- add wemos_shield_esp32_4MB_LineIn_max
- update esp32_pico_4MB_max
2022-11-18 16:57:07 +01:00
Frank
dce3b04695
update for filter coefficient
...
Seems that I made a small mistake when calculating cut-off frequencies. Updated values make more sense.
2022-11-18 12:55:53 +01:00
Frank
d3af3446f7
add bandpass filter for PDM mics
...
This introduces an optional band pass filtering step to remove low frequency noise. Very effective for PDM mics - reduces noise floor by a factor of 100 !
2022-11-17 15:09:54 +01:00
Frank
aae50942a2
line-in parameter tuning
2022-11-14 18:14:36 +01:00
Frank
09ce16e6f8
minor cleanup
2022-11-10 11:00:30 +01:00
Frank
06af6f5ad0
don't use aPLL in IDF version 3
...
seems that this interferes with MCLK routing
2022-11-09 21:08:46 +01:00
Frank
0fdc0d042d
small improvements for I2S PDM and I2S Line-in
2022-11-09 18:36:02 +01:00
Frank
20aebf2789
improved support for PDM microphones (SPM1423)
...
seems that the "swapped channel" workaround is not needed for PDM.
2022-11-09 00:01:40 +01:00
Frank
260740d210
small improvement for analog input
...
do not disable ADC initially.
2022-11-07 16:26:33 +01:00
Frank
4bd35b780e
Some improvements for I2S Line-In
...
- I2S DAC devices utilize the complete sample range [-32767 ... 32768], while I2S microphones typically deliver samples in [-2047... 2047]. Down-scaling Line-in samples ensures that filters and AGC operate optimally.
- use aPLL clock source for I2S with MCLK
- experimental: I2S slave mode (however could not get it to work ...)
2022-11-07 15:34:42 +01:00
Frank
52d1e6d197
Merge remote-tracking branch 'origin/audioreactive-prototype' into mdev
2022-10-21 12:16:51 +02: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
8847d47bee
cherry-picking from audioreactive development
...
A few goodies from my development branch, before I continue refactoring so much that I can't extracts nothing anymore.
- GEQ fades a bit slower
- updates to mic profiles
- simple peak detection without FFT (low freqs only)
2022-10-17 18:40:15 +02:00
Frank
19fd5f61db
update for ICS-43434 big speaker
2022-10-07 17:44:24 +02:00
Frank
f5b74a2b79
Merge remote-tracking branch 'origin/audioreactive-prototype' into audio-reactive
2022-10-06 18:22:58 +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
5ed0bb8c2b
Microphone calibration profiles
2022-10-05 17:55:54 +02:00
Frank
698a6c8f89
Merge remote-tracking branch 'origin/audioreactive-prototype' into audio-reactive
2022-10-04 16:20:40 +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
c00910e100
Merge remote-tracking branch 'origin/audioreactive-prototype' into audio-reactive
2022-10-04 14:00:53 +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
82b1e5c09d
GEQ: more dynamics
...
work in progress.
This brings some more dynamics into GEQ, without causing flickering.
-> Try with Dynamcs Fall = 300ms.
2022-09-30 22:57:21 +02:00
Frank
d0278ddc83
tiny change
...
komma
2022-09-30 21:59:58 +02:00
Frank
a861059553
Merge remote-tracking branch 'origin/dev' into audio-reactive
2022-09-30 21:58:14 +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
90b3f009af
AR: small improvement for ADC analog mics
...
ensure that ADC parameters are properly configured.
2022-09-19 13:30:13 +02:00
Frank
6f8deb83e3
some relaxations for S2 and C3
...
- AR: changed "error" into warning.
- reducing max_busses (for AR) not needed on S2
2022-09-17 22:00:33 +02:00
Frank
85fc8710dd
mics that need MCLK should work
2022-09-17 20:39:23 +02:00
Frank
a766ddbebc
make I2S microphones work with buggy IDF4.4.x
...
I2S microphones were not working any more in with the newest framework - only delivers silence.
Ther reason is stupid bug in espressif I2S "compatibility" driver: RIGHT and LEFT channel are swapped, so when only asking for LEFT, we get silence from RIGHT.
Workaround: simply change LEFT to RIGHT, until the problem is fixed in ESP-IDF --> Fix tested on "classic ESP32", but still need to check behavior on -S3.
Code compiles also on -S3, -S2, and -C3.
smaller changes:
- a few changes to use new APIs (MCLK, rouing and sample resolution)
- a few additional debug messages
- put correct value into _pinConfig.mck_io_num
2022-09-16 16:58:04 +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