ChilloutCharles / BrainFlowsIntoVRChat

BrainFlow code that sends your brain's relaxation, focus metrics, and machine learned thought commands to vrchat avatar paramaters via OSC.
https://linktr.ee/ChilloutCharles
MIT License
209 stars 15 forks source link

Schema proposal: Add new parameters for normalized power bands #9

Open AtriusX opened 5 months ago

AtriusX commented 5 months ago

Currently the schema supports explicitly 5 classes of bands for general use in prefabs: Alpha, Beta, Theta, Delta, and Gamma. With the way Brainflow reports these parameters back, all values for each corresponding group will always add up to 1.

The Problem

While this is generally fine, it inherently limits prefabs from using consistent ranges if the app is running a greater or fewer number of bands. When looking at the default count of 5, to reach equilibrium each value can be at most 0.2. For a band count of 4 and 6, the equilibrium is 0.25 and 0.1666667 respectively. This also imposes a limit on parameter resolution the greater the number of bands as this will decrease each value by a set amount to accommodate the added band-space.

The Solution

A set of normalized parameters can be added, which scales the value to fit within the full 0-1 range relative to the provided band count. This will allow prefab authors to use these parameters consistently regardless of band count. In addition to the normalized parameters, we should also provide a parameter such as Brainflow/Device/BandCount [int] to report back the total band count available to users.