Forums > MaxMSP

EEG | Brainwave Synthesis

November 30, 2008 | 8:17 am

Hey,

Has anyone successfully created a EEG that runs into Max/MSP? If so, can you provide the schematics you used?

I’m just looking for general information to get me started.

Thanks :-)


November 30, 2008 | 4:00 pm

taken from the multislider help file in max 4.63, maybe of use for you.

jrp

max v2;
#N vpatcher 30 70 582 742;
#P origin 0 -1;
#P toggle 62 29 15 0;
#P user multiSlider 62 498 88 103 -1. 1. 2 3192 15 0 0 2 0 0 0;
#M frgb 0 15 132;
#M brgb 249 218 164;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 152 499 157 65 -1. 1. 2 3961 15 0 0 2 0 0 0;
#M frgb 176 6 26;
#M brgb 199 240 189;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 131 158 27 196617 – 2;
#P comment 44 280 100 196617 1st order iir filter;
#P newex 167 461 27 196617 + 0.;
#P newex 202 434 38 196617 * -0.7;
#P newex 202 411 27 196617 f 0.;
#P newex 202 386 27 196617 t f b;
#P newex 62 397 52 196617 pack 0. 0.;
#P newex 167 334 27 196617 + 0.;
#P newex 167 287 45 196617 * 0.005;
#P newex 167 358 27 196617 + 0.;
#P newex 167 387 33 196617 * 0.5;
#P newex 216 312 33 196617 * 0.1;
#P newex 216 292 27 196617 f 0.;
#P newex 216 267 27 196617 t f b;
#P newex 186 158 29 196617 * -1;
#P newex 131 179 27 196617 +;
#P newex 131 138 50 196617 random 4;
#P newex 188 138 27 196617 + 5;
#P newex 188 118 50 196617 random 8;
#P newex 131 118 42 196617 del 100;
#P newex 62 233 27 196617 t f b;
#P message 112 224 14 196617 0;
#P newex 62 211 27 196617 + 0.;
#P newex 62 304 39 196617 * 0.09;
#P newex 62 327 27 196617 + 0.;
#P newex 62 159 38 196617 / 500.;
#P newex 62 138 28 196617 – 50;
#P newex 62 118 62 196617 random 100;
#P newex 183 75 41 196617 + 1200;
#P newex 183 54 62 196617 random 200;
#P newex 131 97 62 196617 metro 1000;
#P newex 62 97 50 196617 metro 40;
#P newex 99 327 39 196617 * 0.91;
#P comment 212 348 100 196617 2nd order iir filter;
#P comment 12 30 51 196617 turn on ->;
#P window linecount 3;
#P comment 241 193 100 196617 EKG taken from multiSlider.help in Max 4.63;
#P connect 38 0 4 0;
#P connect 4 0 8 0;
#P connect 8 0 9 0;
#P connect 9 0 10 0;
#P connect 10 0 13 0;
#P connect 13 0 15 0;
#P connect 15 0 12 0;
#P connect 12 0 11 0;
#P connect 11 0 29 0;
#P connect 29 0 37 0;
#P connect 18 0 13 1;
#P connect 14 0 13 1;
#P connect 20 0 13 1;
#P connect 3 0 11 1;
#P connect 11 0 3 0;
#P connect 26 0 29 1;
#P connect 15 1 14 0;
#P connect 38 0 5 0;
#P connect 5 0 16 0;
#P connect 16 0 19 0;
#P connect 19 0 35 0;
#P connect 35 0 20 0;
#P connect 21 0 20 1;
#P connect 29 0 36 0;
#P connect 15 0 27 0;
#P connect 27 0 28 0;
#P connect 28 0 26 0;
#P connect 26 0 25 0;
#P connect 25 0 33 0;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 5 1;
#P connect 24 0 28 1;
#P connect 33 0 26 1;
#P connect 32 0 33 1;
#P connect 18 0 21 0;
#P connect 5 0 17 0;
#P connect 17 0 18 0;
#P connect 26 0 30 0;
#P connect 30 1 31 0;
#P connect 31 0 32 0;
#P connect 15 0 22 0;
#P connect 22 1 23 0;
#P connect 23 0 24 0;
#P connect 30 0 31 1;
#P connect 22 0 23 1;
#P pop;


November 30, 2008 | 6:02 pm

Max 5, tutorial 18.


December 1, 2008 | 3:48 am

For the actual hardware, I’m looking forward to the Emotiv coming out, assuming there’s a way to get the info into Max easily. Multislider is definitely the way to go, in bar or scrolling display form. Then you can use your values for whatever you want (relaxation, meditation, audiovisual controls, hypnosis, brainwashing, telekenesis :)

I got the OCZ Neural Impulse Actuator to work with Max, with some effort and a "bridge" program called niaReader. You can also get it directly from the official nia program, but it sends keystrokes and clicks and you lose a lot of resolution (4 "zones" for each sensor instead of the raw values). Interesting to spray letters out from your brain… but scary when those same letters or clicks start to mess with your patch…

The screenshot is of the overall layout once it was working. The nia is interesting and relatively cheap, but I’m thinking the Emotiv will be better by leaps and bounds… can’t wait!

–CJ


January 13, 2009 | 1:00 am

@ Seejayjames

Did you make any progress with trying to figure out what the numbers coming from NIA actually mean? I reproduced your method of connecting NIA to Max via Brainbay and NIA Output Reader and it works OK! The only problem is that the Output reader sometimes produces an error and stops streaming data which makes it unrealiable to use in any live-music environment, for instance.

Do you by any chance know, if emotiv will offer any kind of comparable data streaming which could be used in Max?

Thanks:-)


January 13, 2009 | 3:17 am

>
> Do you by any chance know, if emotiv will offer any kind of comparable data streaming which could be used in Max?
>
> Thanks:-)
—————————————————-

Not at all sure, but I know there’s a full SDK that comes with it. So it’s certainly *possible* but you may need to write some custom stuff for it, argh. Might be easy, might not. Maybe there will be a simple way to TCP/IP it to localhost etc., or some other means. I do think it’ll be a much improved piece both in hardware and software… I’m quite tempted to just get it and then assume there will be a way to get the raw data to stream into Max. Probably will not be too tough… the NIA eventually worked, as we’ve been discussing, but it really took far too long and with too many intermediate programs needed. Hopefully there’ll be an object written soon thereafter that will do everything and just give us some juicy lists. :)


Viewing 6 posts - 1 through 6 (of 6 total)