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

Rework parameter schema #11

Closed AtriusX closed 5 months ago

AtriusX commented 5 months ago

Due to complaints about the usability of the new parameter schema, internal discussions were had about how the schema itself should be laid out. The discussions were productive and yielded some solutions for ways we can rework the schema to be a bit more user-friendly. Summarizing the requested changes, they are as follows:

This set of changes will yield us the following layout:

New™️ new schema

BFI:
  Info:
    - VersionMajor [int]
    - VersionMinor [int]
    - SecondsSinceLastUpdate [float]
    - DeviceConnected [bool]
    - BatterySupported [bool]
    - BatteryLevel [float]
  NeuroFB:
    - FocusLeft
    - FocusLeftPos
    - FocusRight
    - FocusRightPos
    - FocusAvg
    - FocusAvgPos
    - RelaxLeft
    - RelaxLeftPos
    - RelaxRight
    - RelaxRightPos
    - RelaxAvg
    - RelaxAvgPos
  PwrBand:
    Left:
      - Alpha [float]
      - Beta [float]
      - Theta [float]
      - Delta [float]
      - Gamma [float]
    Right:
      - Alpha [float]
      - Beta [float]
      - Theta [float]
      - Delta [float]
      - Gamma [float]
    Avg:
      - Alpha [float]
      - Beta [float]
      - Theta [float]
      - Delta [float]
      - Gamma [float]
  Addons:
    - Hueshift [float 0-1]
  Biometrics:
    - HeartrateSupported [bool]
    - HeartBeatsPerSecond [float]
    - HeartBeatsPerMinute [int]
    - OxygenSupported [bool]
    - OxygenPercent [float]
    - BreathsPerSecond [float]
    - BreathsPerMinute [int]

Migration sheet

This will then result in the following parameter migrations:

Old Parameter New Parameter
osc_focus_left BFI/NeuroFB/FocusLeft
osc_focus_right BFI/NeuroFB/FocusRight
osc_focus_avg BFI/NeuroFB/FocusAvg
osc_relax_left BFI/NeuroFB/RelaxLeft
osc_relax_right BFI/NeuroFB/RelaxRight
osc_relax_avg BFI/NeuroFB/RelaxAvg
osc_heart_bpm BFI/Biometrics/HeartBeatsPerMinute
osc_heart_bps BFI/Biometrics/HeartBeatsPerSecond
osc_oxygen_percent BFI/Biometrics/OxygenPercent
osc_heart_bpm BFI/Biometrics/BreathsPerMinute
osc_band_power_left_alpha BFI/PwrBand/Left/Alpha
osc_band_power_left_beta BFI/PwrBand/Left/Beta
osc_band_power_left_theta BFI/PwrBand/Left/Theta
osc_band_power_left_delta BFI/PwrBand/Left/Delta
osc_band_power_left_gamma BFI/PwrBand/Left/Gamma
osc_band_power_right_alpha BFI/PwrBand/Right/Alpha
osc_band_power_right_beta BFI/PwrBand/Right/Beta
osc_band_power_right_theta BFI/PwrBand/Right/Theta
osc_band_power_right_delta BFI/PwrBand/Right/Delta
osc_band_power_right_gamma BFI/PwrBand/Right/Gamma
osc_band_power_avg_alpha BFI/PwrBand/Avg/Alpha
osc_band_power_avg_beta BFI/PwrBand/Avg/Beta
osc_band_power_avg_theta BFI/PwrBand/Avg/Theta
osc_band_power_avg_delta BFI/PwrBand/Avg/Delta
osc_band_power_avg_gamma BFI/PwrBand/Avg/Gamma
osc_battery_lvl BFI/Info/BatteryLevel
osc_is_connected BFI/Info/DeviceConnected
osc_time_diff BFI/Info/SecondsSinceLastUpdate
HueShift BFI/Addons/HueShift
RantiMess commented 5 months ago

I would prefer unsigned to be defined, we shouldent have to bend our stuff for fury support. rather than having FocusLeftSigned w have FocusLeft and for the unsigned value we have FocusLeftU

AtriusX commented 5 months ago

Schema has been updated with corresponding signed params dropping the suffix and adding "Pos" to unsigned parameters