MindWave to Max/MSP

Maurice Methot's icon

MindWave is an inexpensive bio sensor product made by NeuroSky - has anyone developed a Max object to read the data from this sensor into Max? There is an object at nonpolynomials.com that seems to have been developed for another similar product made by the same company - but I cannot make it work with the MindWave EEG sensor. The suggested API's for developing for the MindWave seem to be java or Flash - has anyone had any experience with this? I think I saw some people controlling the Euclidean Patter Generator at the Max Science Fair in Brooklyn last year - were they using some other EEG device? Any experience with the MindWave Max/MSP connection would be most appreciated!

newdendrite's icon

You might have seen the video of my EEG project from the first Max science fair in CA. At the time I was using one of the EEG amplifiers that I use in my clinical practice. It's expensive (~$2500).

Since then I've experimented with two different NeuroSky headsets. The Mindwave headset works with the nonpolynomial Max Object but is more expensive and less convenient for the user. The Mindset headset uses a different baud rate and does not work correctly with that object.

During most of 2011, I was in frequent contact with NeuroSky and in occasional contact with nonpolynomial asking for an update. It should be a relatively easy fix. There were many promises but neither source produced an updated object. User support at NeuroSky is very slow, very poor and very uninformed. I finally gave up on them and on the NeuroSky products. Unless they work out of the box for the buyer, I wouldn't recommend them.

Maurice Methot's icon

thank you for the reply - much appreciated! Yes - so far I have had no luck with NeuroSky support - not a good sign! But in the meantime - although I downloaded the Max object from nonpolynomial.com, installed it as a Max external and the help file it comes with seems fine in a patcher - it still will not connect to the MindWave sensor - I may be wrong, but it seems designed for one of NeuroSky's other sensors - the MindSet. My understanding is that the MindWave, less expensive than the MindSet, uses an RF dongle to communicate with the computer - and the object from nonpolynomial.com requires a bluetooth connection - which the mindwave sensor does not provide - but again - all naive speculation! Have you (or anyone) had any success with the mindWAVE and the nonpolynomial.com object?

newdendrite's icon

The Mindset is an older headset priced at about twice the cost of the newer Mindwave. The Mindset covers both ears with a padded headphones, which could be a plus or a minus, depending on how you want to use it. The user cannot hear ambient sound as well when wearing it. One of its connections depend on the headphone pad pressing an electrode against the ear. This can be result in unreliable input at times. The pluses of the Mindset are an internal rechargeable battery and Bluetooth with no dongle required. I have used it for performances and demo's several times.

I have both the Mindset and the Mindwave. I can confirm that the Mindset does work with the nonpolynomial Max object as long as the physical connections to the user are maintained well. Knowing a bit about how to get and keep a clean EEG signal really helps.

In the past, I have been able to use the nonpolynominal to connect with the Mindwave, but the connection is unreliable and the data output is not correct. The problem with the nonpolynomial Max object is not the RF dongle vs. Bluetooth difference -- it is the difference in baud rate for the data stream from the two devices.

Maurice Methot's icon

Again - thanks so much for the help - I finally managed to get the MindWave to send data to the nonpolynomials object - I was initializing the port incorrectly - but yes, you are certainly correct - the data stream is unreliable and not very useful, and entirely different than what one sees in the mindwave visualizer app - and the problem does in fact seem the result of an difference in communication speed / device - to - device sync. I wonder if there is a way to tweak the object to reflect the difference in baud rate between the MindSet and the MindWave devices? Sounds like a question for the guy who wrote the object over at nonpolynomials - I'll see if I can reach him - if I have any luck I will pass it on to this forum for future reference - again - THANK YOU!

m

bareimage's icon

Okey, here is the truth, The device sends data at one second interval. You have to scale the data between these intervals. That is what happening with their brain visualizer. Try simple processing script that uses think gear connector.

That said I am currently using Mindset in the Museum installation and running into horrible problems with audio quality and can't recommend moving to this unit for the sake of Audio output. Hell, the Emotive Sensor seems to look more interesting by the day

mat_kinotek's icon

hey guys did you get any luck with the nonpolynomials object for max? Im using a MIndwave Mobile and max crashes everytime i try to launch the np_mindset object. Is there any way to change the baudrate of the object??
any hint si really appreciated!!
/m

genfu's icon

Also interested in this, has there been any progression in getting the MindWave to work effectively in Max/MSP?

efx's icon

hello, I got the mindwave working with the nonpolynomial.com object. I paired my MIndWave with the general MindWave Manager and changed the input port to: port /dev/tty.MindWave in Max/Msp.
Now I get every 7 seconds a signal. Maybe its possible to decrease that delay, but I am very new to Max/Msp.

George Khut's icon

Hi all, a couple of weeks ago I presented a project in Sydney, Australia - called ThetaLab with James Peter Brown. We used Myndplay's "BrainBand" which uses the ThinkGear chip and bluetooth serial system. Trent Brooks a developer in Sydney, wrote an app for us to parse the bluetooth serial data from the Thinkgear chip - into OSC. It needs a bit more refinement - specifically some changes to how it's sending the OSC data - (currently seding without "/" at start of OSC messages – but if you're interested - try this out…

Here's a max patch that receives the data as presently formated

BrainOSC_receiver.maxpat
Max Patch
seejayjames's icon

What's your take on the BrainBand? Do you get reliable signals? Are they complex enough to do a lot of things via Max or other software?

It wasn't totally clear what data is sent using the BrainBand versus with their dev kit, which costs a lot more but presumably sends more data as well...

Really would like a good, cheap, open-source solution for EEG, with straightforward transmitting of data: bluetooth or UDP (maybe just UDP and assume a wireless network), adjustable data update timing, sends all the raw data, etc. It could come with apps to do the analysis for spectrum levels, or do it onboard.

Just seems like there's a lot of different options, and they all have their pros and cons, and it's a pain to get the data...and if you want the raw data, you pay a lot more...

I just wanna control stuff with my mind! Is that too much to ask?? ;)

genfu's icon

Looks interesting, so does this work work only with the BrainBand at present?

I spotted this earlier:
http://www.mm.cs.sunysb.edu/323/OSC-UDP-Tutorial/MindWave.html
Is the 'BrainOSC' referred to in this the same as what you are talking about?

I'm hoping to try this out tomorrow, i've had quite a bit of frustration trying to get signals from the MindWave into Max/MSP.

MakesItLookEasy's icon

I'm curious if there has been any more progress on this front. I'm looking into purchasing a new EEG and I'm looking at the Neurosky lineup as well as the brain band and even the IBVA Brain Machine that I already know connects seamlessly with Max. Ideally, I would have access to the streaming data via bluetooth as well as the possibility of ultimately integrating with another environment like Unity 3D or C++. Any suggestions would be greatly appreciated. I'm running on a Mac.

donaghy_liam@hotmail.com's icon

I have developed a free android app to connect the neurosky mobile headset to MAX using Open Sound Control, its called mindwaveOSC, its very basic, just set the IP and Port number and hit connect on the app. Screenshot attached.

OSC Messages (all int's) :

/mindwave/medatation
/mindwave/attention
/mindwave/blink
/mindwave/lowbattery
/mindwave/signal
/mindwave/rawstream

Screen-Shot-2013-08-16-at-19.02.21.png
png
amrb's icon

Hi!
I'm using the BrainOSC_receiver.maxpat to get data into Max. However, it doesn't recognize blinking.
I tried this one: mindwave.maxpat
but it doesn't seem to recognize blinking either; I get only signal, attention and meditation.
From what I gather, the detection has to be enabled, but how? How can I get all the data possible form my MindWave in Max?
Thanks!

giorgioesse's icon

Talking of Mindwave headset

BrainOSC.app
I've been able to get all OSC messages (attention, Meditation, all waves, from BrainOsc.app
The messages are formatted this way (see print from udpreceive):
/BrainWave/Delta
or /BrainWave/Alpha1

however, seems like that the OSC messages MAYBE are not entirely correct
(compare data with Brain Grapher app)
For example I get very high Delta Waves and very low Beta.. which is kind of odd, since I'm not
trying this while sleeping.

BrainOsc seems a fine tool but any info about this problem or update would be very very appreciated.

--------

BrainWaveOSC.app
I've been able to use it now
Settings.xml must be edited to work with the dev/tty/MindWave address
Again I'm getting high deltas... Is it me?

--------

nonpolynomial Max object:
On their website there is only a maxhelp file. mxo object is totally missing...

--------

Emotiv headset
it's a more sophisticated machine but poor OSC support (MindYourOsc works correctly only on Windows)

also, after a few months of non use, the saline solution broken most of the plastic sensors

sruss's icon

Hi all --

I am also trying to use the MindWave with Max/MSP. Has anyone had any luck with the blink detection bug in mindwave.maxpat?

Emily's icon

however, seems like that the OSC messages MAYBE are not entirely correct
(compare data with Brain Grapher app)
For example I get very high Delta Waves and very low Beta.. which is kind of odd, since I’m not
trying this while sleeping.

I'm getting the same thing. Super high delta, some low alpha, and very spotty values elsewhere. I'm using the Neurosky Mindwave (the white one). Anyone else experiencing this?

tkarches@gmail.com's icon

I'm suspecting a sensitivity to where the headset sensor touches the forehead. I have been using the Mindwave Mobile with PureData. I have been running the data through a PureData "line" object to smooth out the bumps. Experiments are ongoing.

Has anyone ever tried running 2 instances of BrainwaveOSC with 2 separate sensor headsets? As long as they appear as unique devices in Bluetooth and I use different port numbers, technically it should work.

amarmlal's icon

Hey all,

I've also been experiencing range issues when using BrainWaveOSC with MindWave Mobile, wondering if anyone has any further insight into this?

Further, I'm developing a series of patches similar to BrainWaveOSC that are designed to communicate using TCP/IP with ThinkGear Connector using ThinkGear Socket Protocol and eliminate the need for a non-Max program to be open. Some early portions are up here: https://github.com/amlal/NeuroSkyMaxMSP including flexible parameter routing and visualization. I'm sharing in advance of the completion of development in case these are useful in their current state to anyone here.

I'm having the same ranges issues as in BrainWaveOSC, and I also am having some issues with getting data from ThinkGear Connector - I send the appropriate authorization message and can see that the application is connected on the TGC systray icon, but am unable to receive data until I open another program such as MindWave Mobile Tutorial - then, I begin to receive data in my Max patch.

Any insight into anything I might be missing would be great! Feel free to poke around with those patches or ask questions. There's some patches in there that will be geared towards similar visualization, routing and scaling of the Emotive Epoch's output as well.

-A

kcoul's icon

I'll +1 that in the rare cases I am getting everything working correctly, I get high delta and little of anything else.

Has anyone had any luck with a more elaborate product like something from Emotiv's product line?
Right now I am leaning towards the OpenBCI kit..

lila sulie's icon

Super post,up.+ 1

emj_antonin's icon

Hi Amar,

I'm trying your patches and I can say they are working quite fine. do you know if there is any way to use 2 MindWave Mobile together? I mean if I need a sort of interaction between two users in a performance, both of them producing their own MindWave outputs to be collected by a single application (a Max/msp patch) in order to modulate different sounds and synth parameters.
from what I see and read probably I need two independent computers each of them binded to one MindWave Mobile set...
I'm wondering if I can work on a single computer.
thank you,
ANtonino

Darya Dubouskaya's icon

I have a problem with your patch. I made everything as you wrote in readme file but when I opened file NeuroSkyInput it couldn't find 'tcpClient'.
And also I was trying to get any information just from serial port and I'm getting some numbers, I don't know what do they mean. I attached screenshot here.

Screen-Shot-2015-03-06-at-11.42.05-AM.png
png
Anton's icon
Ali Murtaza Arif's icon

Hey Amarmlal,

Your NeuroSkyMaxMSP project looks great, and might just help me accomplish something I've been wanting to for a while. Unfortunately I'm a complete Max rookie, so have been failing at my attempts at getting Mindwave to play sounds based on the various brainwave data it collects. Would that be possible? And could you guide me a bit in case it is?

Thanks in advance.

- Ali

Dario's icon

anybody have access to the nonpolynomials object? it doesn't seem to be on the site anymore

ygreq's icon

For anyone still searching for a way to make Mindwave Mobile 2 work on Max, I found BrainWaveOSC to work pretty well with the device.

Here are the steps on Windows but probably almost the same on a Mac:

-Install mobile app Mindwave Mobile Tutorial to test de device, but not before connecting the headset to the smartphone.

-Test device by following steps in the app

-Once everything work in the app, close bluetooth on smartphone and ok go to PC

-Add the headset as a bluetooth device

-Install Thinkgear Connector (not necessary for BrainWaveOSC (ver.win_0.98), I think.

-Open BrainWaveOSC (tested win version)

-It should work as soon as it opens visualizing and sending data via OSC

-To send to Max, just use udpreceive 7771 and route objects. For specific OSC messages, check https://github.com/trentbrooks/BrainWaveOSC