Python micro-api


#1

Hello everybody!

Disclaimer: I’m french and my english is far from well enough! So feel free to correct me if I’m not readable!

After receiving my Muse Headband I wrote a micro api in python for processing osc data stream from MuseIO.

The goal was to get a simple class for my python’s script that allow me to get specific data from MuseIO
in real time once both MuseIO and my little server is start.

Something like:

>>> muse = Muse((server_ip, server_port))
>>> muse.subscribe(IS_GOOD)
>>> muse.subscribe(BLINK)
>>> while True:
           print(muse.is_good, muse.blink)
           muse.update()
[0, 0, 0, 0] [0]
[0, 0, 0, 0] [0]
[1, 0, 1, 1] [0]
[1, 1, 1, 1] [0]
[1, 1, 1, 1] [0]
[1, 1, 1, 1] [1]
[1, 1, 1, 1] [1]
[1, 1, 1, 1] [0]
.
.
.
etc

My question: Have any of you already wrote something like this? Are any of you interesting by something like this?

Thank you!


#2

As far as I’ve been able to figure it out is that the macro runs through the .csv file and removes all other information except for the absolute values and then uses those values to make the chart. I’m thinking that when I open the .csv file in Excel it’s being formatted incorrectly into the cells and so the macro can’t single out the data.