Page 1 of 1

DummyApplication and State Variable

Posted: 18 Mar 2016, 05:19
by inesplc
Hi BCI2000 community,

I am currently trying to control a game in Unity using the Sensory-motor rhythm from BCI2000 using BioSemi ActiveTwo.
So far I have been successful in using the AppConnector for sending/receiving via messages between platforms, and using the Contrib version for BioSemi. I have also downloaded and built the Source version.

The problem I am dealing with right now is how to select the right modules. Using the Launcher, I select BioSemi as source, the SpectralSignalProcessing and the DummyApplication. I also load the parameters from my amplifier (BioSemi) and the MuFeedback. I get the following errors in the PreFlight phase:

Code: Select all

2016-03-18T10:09:32 - Normalizer::Preflight: When processing "(Feedback==0)": Variable "Feedback" does not exist.
2016-03-18T10:09:32 - Normalizer::Preflight: When processing "(Feedback)&&(TargetCode==1)", multiple errors occurred.
 * Variable "Feedback" does not exist.
 * Variable "TargetCode" does not exist.
2016-03-18T10:09:32 - Normalizer::Preflight: When processing "(Feedback)&&(TargetCode==2)", multiple errors occurred.
 * Variable "Feedback" does not exist.
 * Variable "TargetCode" does not exist.
2016-03-18T10:09:32 - Script error: Could not set configuration
I am assuming this is related to the state variables definition in the code (or the lack of), but I am not sure on how to proceed from here as I am not very familiar with C++.
My goal is actually to not use these variables (since my game is not related to CursorTask), but to have my own states that are related to my application. So I would like to change their names, and have them controlled only in my application, setting their values from Unity using the AppConnector.

I apologize if this is a newbie question. I have read the wiki on the Mu rhythm, the Normalizer and ExpressionFilter and how to Build System, but would appreciate some guidance in how to proceed.

Best,
InĂªs

Re: DummyApplication and State Variable

Posted: 18 Mar 2016, 11:04
by pbrunner
Inesplc,

you are getting this error message because in the SpectralSignalProcessing you are using the normalization filter. In this filter your specify the two conditions to which you want to normalize your output signal to by the means of an expression that uses the Feedback and TargetCode state. These states are present in the CursorTask, but not in the DummyApplication. Two options to resolve the error message:

1) Disable the the normalization filter, by clicking on "Config" in the Operator, then select the "Filtering" tab, scroll down to the Normalizer and set the Adaptation for all dimensions to "0" (i.e., if you have two then "0 0") and edit the BufferConditions and set the size of the matrix to 1 x 0.

2) Using the CursorTask as the application.

I would recommend the second option, specifically in light of what you would like to accomplish. For this please follow the instructions in the thread "signal control and cursor task" [1]. With this you will first train the subject to have BCI control through the CursorTask feedback, and then switch over to providing feedback through your game engine.

Regards, Peter

[1] http://www.bci2000.org/phpbb/viewtopic.php?t=2891#p8146