Page 2 of 2

Re: Recording detailed brain wave data through Python-OSC

Posted: Sun Feb 13, 2022 12:46 pm
by banjo
Great point, appreciating your tips :-) I'll do something alike your proposal. Right now I have separate handlers for the different waves, just to get things going and understand what I'm doing, but I'll probably replace those with one handler (similar to abs_handler), and incorporate more error handling there.

Re: Recording detailed brain wave data through Python-OSC

Posted: Mon Apr 10, 2023 2:16 pm
by travelmail26
How can I tell which sensor these values are coming from? Like, If i want the raw or alpha value from AF8, which position is that in the list?

Re: Recording detailed brain wave data through Python-OSC

Posted: Mon Apr 10, 2023 3:27 pm
by James
The order is listed in the data spec here:
https://mind-monitor.com/FAQ.php#oscspec
"TP9, AF7, AF8, TP10 {+AUX on non MU-01 + AUX2 on MS-01|MS-02}"

Re: Recording detailed brain wave data through Python-OSC

Posted: Tue Apr 11, 2023 11:43 am
by travelmail26
Still a little confused (and i appreciate all the help so far!). I'm trying to understand what "args" in the function are. When the dispatch.map() function is called, it triggers 'eeg_handler'.

To see what was going on, I tried to print when each "arg" was called in the 'for arg in arg' loop; what confused me is that often the data in a particular loop comes back empty and not for all values in every loop.

I'd love a bit more detail on what's being streamed each time the band sends data to the app. Does the band send the exact same set of data points (each value for each node) every time it sends data through eeg_handler ?

Maybe i'm doing something wrong.

thanks

Re: Recording detailed brain wave data through Python-OSC

Posted: Tue Apr 11, 2023 12:12 pm
by James
args is the arguments array. The length of which will depend on what was sent. The band sends different arguments for different OSC paths.

dispatcher.map("/muse/eeg", eeg_handler)
This will call eeg_handler for the specific OSC path "/muse/eeg", which will always have the same number of arguments: 4, 5 or 6 depending on your Muse model.

If you want to receive a different OSC path, then you can write a new handler and dispatch it with the same function call e.g.
dispatcher.map("/muse/elements/alpha_absolute", alpha_handler)