Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@cabra-lat
Copy link
Contributor

@cabra-lat cabra-lat commented Feb 5, 2025

Maybe it would be nice to update the example to show how to build the payload for controlling the device in music mode.

source

Probably closes #118

@jasonacox jasonacox merged commit 72e89f3 into jasonacox:master Feb 8, 2025
16 checks passed
@jasonacox
Copy link
Owner

Thanks @cabra-lat ! Great example. I'm even considering putting this into the library as a music function, but at a minimum the example is gold. Thank you! 🙏

@cabra-lat
Copy link
Contributor Author

Thanks @cabra-lat ! Great example. I'm even considering putting this into the library as a music function, but at a minimum the example is gold. Thank you! 🙏

Glad you liked it!

Thank you for your great library and tutorials as well @jasonacox !
I made also a rudimentary "daemon" that sends this music payload by analyzing the frequencies (nothing too fancy) but I got interesting results.

You might get interested tuyactl

I got the analysis around here

I split the full audible spectrum 10Hz - 20kHz evenly by the number of devices (which may not be too smart - a dynamic range would distribute the frequencies better among the devices).

Then I just did a FFT on the audio being played to find the dominant frequency and set the color based on that.

I also tried to make a beat detection but I was not able to tell if it was really following the music or not,

It needs more testing with a proper sweep and beats, but the results were pretty cool.

@jasonacox
Copy link
Owner

Nice project @cabra-lat ! Thanks for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Music mode

2 participants