Mind Monitor Python OSC Examples

banjo
Posts: 17
Joined: Sat Feb 05, 2022 4:10 pm

Re: Mind Monitor Python OSC Examples

Post by banjo »

Ok, feel stupid... the reason for data not received properly was that in the Mind Monitor settings I had "TY" in the OSC Path prefix. Don't know how it was there, but I last used this app a few years ago, so I might have put it there then.
So now at least able to record data to .CSV-files.

The other issue still remains, i.e. the graphical window is not shown when running "OSC Receiver Audio Feedback.py"
User avatar
James
Site Admin
Posts: 1109
Joined: Wed Jan 02, 2013 9:06 pm

Re: Mind Monitor Python OSC Examples

Post by James »

Oh yeah, I see the TY/ in the sample output you sent in your last message! Glad you fixed it :-)
Re matplotlib, I'm sure there are other libs out there that would work too, it was just the first one I found when I coded up the examples.
I just tested it and it's working on my Win10x64 machine with these versions:
* Python v3.9.0
* matplotlib v3.4.1
* python-osc v1.7.4
* playsound v1.2.2

You can get the versions with "pip show <packagename>"
banjo
Posts: 17
Joined: Sat Feb 05, 2022 4:10 pm

Re: Mind Monitor Python OSC Examples

Post by banjo »

Thx James, everything's working now!
Upgraded Python from 3.6.3 to 3.10.2 and of course needed to reinstall the different modules, that helped.
User avatar
James
Site Admin
Posts: 1109
Joined: Wed Jan 02, 2013 9:06 pm

Re: Mind Monitor Python OSC Examples

Post by James »

Awesome! Glad you got it sorted! :-)
User avatar
Peter Gamma
Posts: 180
Joined: Sat Jun 29, 2019 11:02 am
Location: Switzerland
Contact:

Re: Mind Monitor Python OSC Examples

Post by Peter Gamma »

Thank you, James for your great Mind Monitor Python OSC Examples.

Thank you, banjo to demonstrate, that it can be connected to Matplotlib.

For future developement, I suggest to connect the Python OSC Example to the Home Assistant platform, to store sensor data in InfluxDB and vizualize it in Grafana.

Nils Cyclenerd from livetrack.io developed a path from ipBike (sports sensor app) to InfluxDB and Grafana. Unfortunately, he stopped this service as soon as I became interested in the path for data analysis.

I saw that research institutions connect for instance weather sensors to Home Assistant. Why should it not work with Muse sensors? There is an image available which can run on a Rasperri PI. I tried to connect the Polar Sensor Logger app to it over MQTT, but failed. But I think it is worth to try it once more.

Enric Sala developed an InfluxDB client for Matlab for house sensors to store sensor data in InfluxDB and visualize it in Matlab. But Matlab is expensive and difficult to use for mobile applications. Home Assistant is open source and I invite everybody to do some experiments with it.
stargazer
Posts: 19
Joined: Wed Jun 17, 2020 10:50 pm

Re: Mind Monitor Python OSC Examples

Post by stargazer »

Hi Peter, yes, Matlab is very expensive but GNU Octave (https://www.gnu.org/software/octave/) is free, and it is 95% interchangeable with Matlab.
User avatar
Peter Gamma
Posts: 180
Joined: Sat Jun 29, 2019 11:02 am
Location: Switzerland
Contact:

Re: Mind Monitor Python OSC Examples

Post by Peter Gamma »

Do you mean to use Octave instead of Home Assistant? Great idea. EEGLAG runs also in Octave. Maybe Nils Knieling who is an excellent programmer stopped his livestreaming service for stability or accuracy reasons? I don t know whether Home Assistant can deal with physiological signals. I also don t know whether it is a good solution to stream different physiological sensors into one InfluxDB without an (MQTT-) broker. These brokers where invented for a reason.
Hanson
Posts: 2
Joined: Thu Feb 29, 2024 10:30 pm

Re: Mind Monitor Python OSC Examples

Post by Hanson »

Hi James,
I run OSC Receiver Simple.py in PyCharm but nothing shows up other than "Listening on UDP port 5000" (attached screenshot).
I enabled Firewall port UDP 5000 and pressed the stream button on MindMonitor.
What am I missing? Thank you in advance.
Attachments
Listening on UDP port 5000
Listening on UDP port 5000
Screenshot 2024-02-29 223403.png (17.26 KiB) Viewed 3588 times
Hanson
Posts: 2
Joined: Thu Feb 29, 2024 10:30 pm

Re: Mind Monitor Python OSC Examples

Post by Hanson »

Hi James,
Thank you for your support. I missed to set machine's local WiFi IP as the OSC Stream Target IP in Mind Monitor settings.
It is working now thank you!

My next step is to find resources for analyzing an Oddball task to do an ERP analysis. Please guide me to the right forum if any. Thank you again!
Post Reply