Event marker/Triggers for Emotiv using BCI2000

Forum for software developers to discuss BCI2000 software development
Locked
Navin
Posts: 6
Joined: 18 Aug 2011, 11:14

Event marker/Triggers for Emotiv using BCI2000

Post by Navin » 14 Jul 2012, 16:02

Dear All:

We are trying to use Emotiv with BCI2000 software..We were able to get the EEG data and interface Emotiv using BCI2000..I would kindly like the group to point me to any info/links to figure out the event marker/trigger information for emotiv !!

We are looking to develop a new application and hence would need info as to how we could integrate event markers with the EEG recorded by Emotiv !!

I guess I got my query across..Looking forward to the replies

Thanks in advance

Cheers
Navin

griffin.milsap
Posts: 58
Joined: 08 Jun 2009, 12:42

Re: Event marker/Triggers for Emotiv using BCI2000

Post by griffin.milsap » 16 Jul 2012, 10:49

Navin,

I had to do a bit of research to determine what you meant by "event markers". This is what I came up with:
While data is being buffered, you can make API calls which enter data event markers (single bytes which can indicate up to 255 possible event types) and these markers are added into the buffer at exactly the segment of data that was stored most recently, so you can later find exactly where in the data sequence each specific event occurred.


If this is indeed what you're after, BCI2000 takes care of that for you already. BCI2000 records only EEG from the Emotiv EPOC at the moment (and gyro/contact quality information). State data is recorded synchronously with these brain signals and corresponds to anything from key presses to mouse movements and beyond. In fact, the gyro/contact quality information is also recorded into states and can be viewed alongside your signal over time.

Is this what you're after?

-Griff

Navin
Posts: 6
Joined: 18 Aug 2011, 11:14

Re: Event marker/Triggers for Emotiv using BCI2000

Post by Navin » 16 Jul 2012, 17:47

Hi Griff:

Thanks for the reply/info..We were successful in getting the data,trigger(i.e event marker) for the P300 speller provided on BCI2000 !!

We need help creating a trigger (event marker) for our own application...Can we create a new simple application module which basically helps us get the start and end of experiment, marked on the EEG data, while engaging the other modules (signal source, and signal processing) to start downloading and recording data for analysis.

We are trying to look into the source code to build custom applications !!

Looking forward to your reply

Have a nice day ahead

Cheers
Navin

griffin.milsap
Posts: 58
Joined: 08 Jun 2009, 12:42

Re: Event marker/Triggers for Emotiv using BCI2000

Post by griffin.milsap » 17 Jul 2012, 10:31

Navin,

If all you're interested in is the start and end of the experiment, the "Running" state (Event marker) should be exactly what you're looking for. Running is 0 while the system is in a suspended state and goes to 1 once the "Start" or "Resume" button is clicked. This state actually won't change in a BCI2000 .dat file because the .dat file is only recording while the "Running" state (event marker) evaluates to "true".

The guide here will help you in creating a new application module. It is written to get you started on a new signal processing module, but the same process can be used to create an application module for BCI2000. The template source it generates for you is heavily commented and it should be pretty easy to get started from there. Just know that you'll need to make a new BCI2000 "application" module using NewBCI2000Module.exe, then create a new BCI2000 "filter" using NewBCI2000Filter.exe derived from ApplicationBase.

This quickstart guide should be a good "all around" read for programming with BCI2000.

Hope that helps!

-Griff

Navin
Posts: 6
Joined: 18 Aug 2011, 11:14

Re: Event marker/Triggers for Emotiv using BCI2000

Post by Navin » 17 Jul 2012, 14:08

Hi Griff:

Thanks for the reply..Yup your pointers did help definitely..Will delve deep into it and come back if we have any issues !!

Have a nice week ahead

Cheers
Navin

Navin
Posts: 6
Joined: 18 Aug 2011, 11:14

Re: Event marker/Triggers for Emotiv using BCI2000

Post by Navin » 19 Jul 2012, 13:48

Hey Griff:

We have a quick question for you !! We are developing a new application module from a template and are experiencing the following error when we try to build "LINK : error LNK2001: unresolved external symbol AppRegistry"..Can you help us corrrect this error !

Also please let us know if it is possible to interface external devices and Emotiv with BCI2000, which enables synchronized data recording !! Kindly point to any relevant work already done in this aspect

Looking forward to your reply :)

Have a nice day

Cheers
Navin

griffin.milsap
Posts: 58
Joined: 08 Jun 2009, 12:42

Re: Event marker/Triggers for Emotiv using BCI2000

Post by griffin.milsap » 24 Jul 2012, 13:32

Perhaps your linker isn't linking the BCI2000 application framework library correctly? I have not run into this error before. I'll try compiling a simple application module quickly and I'll find out if the templates are currently broken.

As far as interfacing other devices, there are several "Environment Extensions" which allow you to do just this. We can record from Joysticks, Mice, Keyboards, Eyetrackers, Wii Remotes, and more. Find out more about these capabilities by checking out the Contributions:Extensions page.

-Griff

griffin.milsap
Posts: 58
Joined: 08 Jun 2009, 12:42

Re: Event marker/Triggers for Emotiv using BCI2000

Post by griffin.milsap » 24 Jul 2012, 14:07

All works well over here. I just

1. Created a new BCI2000 module with NewBCI2000Module.exe
- Module type 3 - Application
- Name - APPTEST
- Default parent directory

This created a directory with a APPTESTTask.cpp and .h in it. The NewBCI2000Filter.exe is not necessary for this application module anymore because it already has a default Task filter.

2. Regenerated my Visual Studio project with CMake

3. Compiled APPTEST with Visual Studio. All works and links correctly.

Are you compiling against SVN HEAD?

-Griff

Navin
Posts: 6
Joined: 18 Aug 2011, 11:14

Re: Event marker/Triggers for Emotiv using BCI2000

Post by Navin » 28 Jul 2012, 17:56

Dear Griff,

I have done exactly as you and the tutorial for building modules instructed using a free download of Visual C++ 2010 Express.

I do believe I am indeed building against SVN HEAD.
An error occur when following the tutorial:
http://www.bci2000.org/wiki/index.php/P ... ient_Setup and we download and un-zipped the source code in a different manner. I used "Zipeg" to un-zip the source code and not TotoiseSVN.

When using the TortoiseSVN:
I Right-clicked the folder. Then from the context menu, I chose the "SVN Checkout..." option – a dialog window appears.
In the dialog window, I entered the repository URL: http://www.bci2000.org/svn/trunk, as instructed, and chose "HEAD revision", and clicked OK.

Then the following errors followed:
Error: PROPFIND of '/svn/trunk': Could not read status line: An established connection
Error: was aborted by the software in your host machine.
Error:(http://www.bci2000.org)

Could my initial improvisation in acquiring the source code be the source of my "link error" previously mentioned.

Any help in solving this error would be greatly appreciated.

Looking forward to your reply.

Have a great day,

Navin

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: Event marker/Triggers for Emotiv using BCI2000

Post by mellinger » 31 Jul 2012, 09:18

Hi,

to fix the PROPFIND error, please follow the instructions at
http://www.bci2000.org/wiki/index.php/P ... leshooting

As Griff wrote, there is nothing wrong with creating and linking a new application module. Make sure not to modify the VisualStudio project file after running CMake. Rather, change the CMakeLists.txt file of your new application module in order to add files, and rerun CMake after that.

Regards,
Juergen

Navin
Posts: 6
Joined: 18 Aug 2011, 11:14

Re: Event marker/Triggers for Emotiv using BCI2000

Post by Navin » 04 Aug 2012, 18:31

Hi Juergen:

Thanks for the reply...We solved that error. :)

We are trying to use BCI2000 to integrate the webcam with Emotiv Epoch headset( a supported contributed signal source)..We enabled contributed extensions in our CMake configuration and reran the project batch file..

We then opened up the source module(ie signal generator or emotiv) but were unable to find the WebcamLogger section in the source tab..Also please let us know what "Once the extension is built into the source module, enable it by starting the source module with the --LogWebcam=1 command line argument" exactly means.

Looking forward to your reply

Have a nice weekend

Cheers
Navin

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: Event marker/Triggers for Emotiv using BCI2000

Post by mellinger » 21 Aug 2012, 11:12

Hi Navin,

BCI2000 modules are started up using the BCI2000Launcher, or by executing one of batch files from BCI2000/batch. The BCI2000Launcher does not allow to specify command line options, so you will need to start BCI2000 from a batch file.

Please go to BCI2000/batch, and choose a batch file that comes closest to your desired setup. Then, make a copy, and edit it such that the "start executable ..." lines show the names of the modules that you want to use.

Then, after the source module's executable name, add a space character, followed with "--LogWebcam=1".
Finally, double-click the new batch file in order to start BCI2000 with the webcam logger enabled.

HTH,
Juergen

Locked

Who is online

Users browsing this forum: Google [Bot] and 26 guests