Example connection with MaxMSP
Once you subscribe to the OSC module, the tab is enabled in BCI. The following example demonstrates a connection of EMOTIV BCI with MaxMSP, which is a visual programming language for music and multimedia.
- 1.Connect a simulated device or an OSC compatible EMOTIV Brainwear®
- 3.Select Sending mode: Unicast to Self
- 4.Set the IP: 127.0.0.1
- 5.Set the Port: 8000
- 6.Choose the Data stream you want to connect: Facial expressions, Mental Commands, or Performance Metrics
- 7.Click Start
- 8.Open Max MSP, go to File > Package Manager and install CNMAT Externals
- 10.Create (replicate) the nodes below and change OSC-route according to whichever OSC Pattern you wish to address (in the example image, Facial expressions/Smile) - check table in the previous step for the addresses.
- 11.Open Processing and go to Sketch > Import Library… > Add Library , search and install oscP5
- 12.Open a new File.
- 13.Import oscP5 to the code and initialize an instance listening to port 12000. Example code (copy and paste in Processing):
14. Click the Play button and watch the graphics change according to Smile. importedValue is associated with the circle radius.
15. Open any example code in File > Examples.. 16. Associate importedValue with any float variable from any Library to play around. Be sure to:
- Import oscP5;
- Initialize importedValue (before void setup);
- Initialize oscP5 (place it inside void setup);
- Associate the event with the variable importedValue (place it after void draw);