Page 1 of 1

Calculating absolute, extracting absolutes from AF7 & AF8 via extOSC in unity

Posted: Thu Feb 22, 2024 8:45 am
by Loktarg
Hello, another (games) student using the muse2 and unity to create a horror experience that aims to adapt to the players physiologicals.

The aim is to enlighten the viability and design challenges of designing games based on a players biofeedback when designing for a VR game.

I am having trouble calculating the absolutes like they are shown on the app, which I really like. I would also like to use the AF7 and AF8 sensors, since they are furthest away from the speakers of VR headsets - and the frontal lobe is also where the amygdala is located (though I am not sure if it makes sense as a whole).

My current calculation of absolute, timing the current value I am getting with 100 (Not the average, its set to all values in the app).

Code: Select all

    protected void MessageReceivedBeta(OSCMessage message)
    {
        beta_absolute = message.Values[0].FloatValue;
        beta_absolute = beta_absolute * 100;
        
        string format_beta = beta_absolute.ToString("F1");
        oscText_beta.text = "Beta Activity: " + format_beta + "dB";
    }
I am using extOSC for unity and would really like to extract the beta/gamma absolutes from AF7/8 - sorry if this is not the right place to ask about this.

It has been really interesting to use the app so far, I hope this makes sense - if not, I am ready to answer questions. Thanks very much! /Thomas

Re: Calculating absolute, extracting absolutes from AF7 & AF8 via extOSC in unity

Posted: Thu Feb 22, 2024 9:48 am
by James
If you're asking how to convert from ~{-1:+1} to ~{0:100}, you add 1 and then divide by 0.02
I would note however, that you don't need to do this. I only do this as people were getting confused about negative values and having a normalized range of 0-100 makes sense to more people.

Regarding AF7 and AF8, this is detailed in the OSC spec here:
https://mind-monitor.com/FAQ.php#oscspec

The sensor order is: ALL or TP9, AF7, AF8, TP10
In Mind Monitor you can toggle the OSC setting "OSC Stream Brainwaves" between "Average Only" and "All Values"

Re: Calculating absolute, extracting absolutes from AF7 & AF8 via extOSC in unity

Posted: Thu Feb 22, 2024 10:59 am
by Loktarg
Thank you for the speedy response. It works!

I might want to argue that players being aware of their own physiologicals might affect them, so I could be including them in-game, hence converting to 0-100.