Victoare / SR-WLED-audio-server-win

SoundReactive WLED audio streamer for windows
GNU General Public License v3.0
32 stars 1 forks source link

Output matching with WLED AR usermod #1

Open netmindz opened 9 months ago

netmindz commented 9 months ago

Ideally, the output from this app would match exactly what you would get from Line-In and the analysis code in WLED

This is important not only so the effects look as intended, but that users can swap between say testing at home with this setup for convenience and then swap to a club/festival where they are using Line-In feed from the mixing desk and get the same results

I have reached out to one of the other devs to help answer some of the queries you had @Victoare

Victoare commented 9 months ago

Will try to match the two but there are many questions need more research. Thanks again for the help, and looking forward for the input from the other devs.

netmindz commented 8 months ago

Do you have a WLED mic or line-in setup to compare against? You can find videos on YouTube with various test tones, which might help you compare the two

Victoare commented 8 months ago

Thanks for the tip for the videos, I will check them. Unfortunately I don't have any input hardware on hand. Checked the I2S line input module, but that is out of budget for me (at least for this purpose), and don't really want to hack together an analog one. Right now in a separate branch I made some bigger reworking on the audio processing. Turning the spagetti code to a bit sophisticated one allowing me to play with different AGC and FFT settings and modes. Also started to check and implement the code I found in the main audioreactive usermodule.

netmindz commented 8 months ago

These are super cheap, just need to add a mini jack or photo cable to hack one end off and solder to the board https://www.aliexpress.com/item/32777376004.html

Victoare commented 8 months ago

Saw that (and already added to my cart) but read somewhere that it has issues with wled and put the order on hold. But as now checked the doc in https://mm.kno.wled.ge/soundreactive/Line-Input/#ti-pcm1808 it seems reasonably okay. I think i will order one and play with it when arrives. (Also ordered a couple esp32 modules, because for now I'm only using esp8266 boards)

Victoare commented 8 months ago

Back to the original issue: Checked the original source for audioreactive part (https://github.com/Aircoookie/WLED/tree/main/usermods/audioreactive) but there is too much magic numbers. They seemed like trial-and-error kind of values to "make it somewhat work" on the given hardware.

Found out samplePeak's reason: it is a beat detection flag. It wasn't obvious for me. Implemented a simple beat detection to check if it works.