Understanding absolute wave values in OSC streaming.

Post Reply
methority
Posts: 3
Joined: Tue Jan 17, 2023 6:01 am

Understanding absolute wave values in OSC streaming.

Post by methority »

Hi James!

Thank you for your app and code!

Recently I started using your Python script (https://github.com/Enigma644/MindMonito ... eedback.py) translating OCR from Muse to laptop. It allows to play sound when one of the waves (gamma in my case) reaches particular relative amount.

You calculated relative amounts using this equation:
rel_waves[wave] = math.pow(10,abs_waves[wave]) / (math.pow(10,abs_waves[0]) + math.pow(10,abs_waves[1]) + math.pow(10,abs_waves[2]) + math.pow(10,abs_waves[3]) + math.pow(10,abs_waves[4]))

I want to modify this code to set the threshold as an absolute value not relative. It’s because the relative one changes rapidly when all values change (if u move, for example).
There is a problem: I see in the FAQ table (https://mind-monitor.com/FAQ.php#oscspec) that absolute waves values are in Bels. But in the .csv file recorded by Mind Monitor these values are in [-1;1] range. What are the absolute values of waves in “abs_waves[wave]”? How can I convert these values into dB that are displayed in the Mind Monitor app?
Thank you in advance!

Best wishes.
User avatar
James
Site Admin
Posts: 1103
Joined: Wed Jan 02, 2013 9:06 pm

Re: Understanding absolute wave values in OSC streaming.

Post by James »

Bels is just a unit used for any logaythmically generated result. You don't need to do any converting, the CSV and OSC values are the same number.

The value that is displayed to the user in the Mind Monitor UI is converted from the approximate {-1:+1} range to {0:100} for easier reading by people who do not understand negative ranges. Before I did this range shift, I got a lot of people asking me the significance of a negative value; to which the answer is, that there is no particular significance, other than the fact that it is a low number.
methority
Posts: 3
Joined: Tue Jan 17, 2023 6:01 am

Re: Understanding absolute wave values in OSC streaming.

Post by methority »

James wrote: Tue Jan 17, 2023 12:09 pm Bels is just a unit used for any logaythmically generated result. You don't need to do any converting, the CSV and OSC values are the same number.

The value that is displayed to the user in the Mind Monitor UI is converted from the approximate {-1:+1} range to {0:100} for easier reading by people who do not understand negative ranges. Before I did this range shift, I got a lot of people asking me the significance of a negative value; to which the answer is, that there is no particular significance, other than the fact that it is a low number.
Hi James, thank you for your answer!

How exactly did you made this shift from [-1;1] to [0;100]? If I just normalize all values using formula ([1-abs_value]/2)*100 I got values are different from app values in dB. Should I use 10^(abs_value) instead? Obviously, I just don't catch something about Bels here... :(
User avatar
James
Site Admin
Posts: 1103
Joined: Wed Jan 02, 2013 9:06 pm

Re: Understanding absolute wave values in OSC streaming.

Post by James »

You were nearly right with your first suggestion: (value+1)*50
methority
Posts: 3
Joined: Tue Jan 17, 2023 6:01 am

Re: Understanding absolute wave values in OSC streaming.

Post by methority »

James wrote: Tue Jan 17, 2023 2:12 pm You were nearly right with your first suggestion: (value+1)*50
Omg! Thank you so much! I don't know why I typed "-" instead of "+". It works now!
Post Reply