Clarify the values encoded in SoundSync packets
Is your feature request related to a problem? Please describe.
To generate your own SoundSync packets separate from WLED, it would very valuable to know more about the units and values encoded in the packet, ideally in this description of the format.
Describe the solution you'd like
Add an entry-by-entry list which describes, for each member of the V2 audioSyncPacket struct:
- What the value means to WLED, i.e. how it is interpreted for sound reactive effects.
- What units the value is measured in (if applicable).
- What range of values it may possibly take.
- What range of values it typically takes, when produced by WLED.
- Any other notes (whether it is optional, etc.).
Describe alternatives you've considered
I've considered reverse engineering these values but would need debug console access to WLED UDP SoundSync received packets.
Additional context
One small confusion. The Wiki cautions:
this is a C language "struct". Due to padding performed by gcc, the actual package is slightly bigger
But it looks like this is an explicitly packed struct, with the gaps included verbatim. Perhaps this note of caution is vestigial?
Thanks for your work on WLED!
This fork has been replaced by the MoonModules fork.
You can find out more about the audio sync at https://mm.kno.wled.ge/soundreactive/sync/
@jdtsmith
I've recently explained some more details of the format here: https://github.com/chrisgott/feed_my_wled/issues/1#issuecomment-2564771886
"this is a C language "struct", but it looks like this is an explicitly packed struct
The statement is still valid, however we have recently changed the definition for the V2 data structure to "packed struct", to make the gaps explicit. Byte offsets in the structure have not changed.
Thanks. Might be nice to add that info to the MoonModules page, along with some "observations" about the typical values and a bit more about what they constitute.
For example, you mention value of biggest FFT result from a single FFT run, but FFT codes differ in how they present "values". Are "FFT values" the value in a specific channel in Volts (from a hypothetical mic), the amplitude in Volts^2, or perhaps a decibel value, relative to some fiducial amplitude?