Code Monkey home page Code Monkey logo

bci-workshop's Introduction

README

This is my fork of the workshop code that sends relaxation and focus metrics to vrchat avatar paramaters via OSC

Demos

Instructions

  1. See the document INSTRUCTIONS.md for instructions on how to prepare your pc hardware, bluetooth, and install the base packages. Specifically: the intro, sections A1 and A2. Don't worry about muse-lsl. We'll replace that with the next step.
  2. Instead of following section A3, download the Experimental version of Petal Metrics App.
  3. Install python-osc
  4. Turn on your Muse headset and click on Stream in the Petal App. The headset will connect automatically and stream data via LSL
  5. Run the script python\osc_multichannel.py. That will start sending OSC messages to set Avatar Parameters

OSC Avatar Parameters

Avatar parameters being sent are floats that range from -1.0 to 1.0. Negative and Positive values correspond to low and high focus/relaxation. Left and right sides of the brain are measured and can be recieved by VRC seperately. Update your avatar paramaters as needed to influnece animations and the like. Have fun!

  • /avatar/parameters/osc_relax_left
  • /avatar/parameters/osc_relax_right
  • /avatar/parameters/osc_focus_left
  • /avatar/parameters/osc_focus_right

Adjusting sensitivity per OSC path can be done by having float parameters in your avatar that are prefixes of the paramater name + '_tune'. This will allow you to adjust how reactive the metrics are on the fly from your radial menu. For example, having a parameters named osc_relax_tune will adjust the sensitivity for the paramaters:

  • /avatar/parameters/osc_relax_left
  • /avatar/parameters/osc_relax_right
  • /avatar/parameters/osc_relax_avg

While having a parameter named osc_relax_left_tune will only adjust /avatar/parameters/osc_relax_left

Interplay with other OSC programs

Considering that sensitivity adjustment requires receiving data back from vrchat, other OSC programs might fight over port 9001. The server part of this code has been changed so that it will forward vrchat messages on port 9002 by default. You can also change the receive, send, and forward ports in the OSC threads section of python/osc_multichannel.py (line 87)

Deprecated OSC Avatar Parameters

These paramaters have been deprecated. They will always report the left channels since taking the average of each side of the brain averages the noise as well:

  • /avatar/parameters/osc_relax_avg
  • /avatar/parameters/osc_focus_avg

License

MIT.

bci-workshop's People

Contributors

rcassani avatar chilloutcharles avatar hubertjb avatar jdpigeon avatar micuat avatar syswsi avatar

Stargazers

 avatar Mustafa Zaki Assagaf avatar PJ Sernatinger avatar Atrius avatar  avatar Superior avatar Diana avatar Euler Lobo avatar TeodorP avatar  avatar Jerry Wang avatar  avatar RedRain0o0 avatar  avatar BigSoulja avatar DracoMan671 avatar shintaro ono avatar Najla  avatar Jacob C avatar Rames The Generic avatar

Watchers

Najla  avatar  avatar

Forkers

feynyxx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.