[FieldTrip] Combine Fieldtrip with BCI2000

"Jörn M. Horschig" jm.horschig at donders.ru.nl
Mon May 12 09:14:17 CEST 2014

Hi Luca,

nice to hear that you are using the FieldTrip buffer. I guess you saw 
the relevant pages on our wiki? Like

In general for sending events, you can set all relevant fields to 
anything you want, so if you want to define:

> event.type=....
> event.sample=....
> event.offset=....
> event.duration=....
> event.value=....
The type is a string, and you can set it to whatever you want to 
distinguish in your code between different types. Sample will be 
automatically set by the buffer. Offset and duration are, for usual 
purposes, not necessary in a real-time application (though you could set 
them to meaningful values). The event.value field is the probably most 
important field. This is your trigger value, in your case for example 
the classification outcome. Check out the pages above, especially the 
last one, I guess it will become clearer then. Also check out the 
example scripts in the realtime folder. If you have any more questions 
that don't become obvious from above pages, feel free to ask again here ;)


On 5/9/2014 12:38 PM, Luca Mossa wrote:
> Dear community,
> My name is Luca Mossa and I'm working in a company in Turin (Italy) on 
> BCI experiments.
> Currently I'm trying to develop some Matlab code to improve the signal 
> processing process.
> I'm currently trying to use FieldTripBuffer (in matlab) as the Signal 
> Processing module for a mu rhythm application. I have no problems to 
> read the raw signal and states but I have trouble to find a way to 
> sent the processing result back to Bci for the classification.
> Thanks to Mr. Oostenveld now I know that I must use the ft_write_event 
> function but when I tried to use my code (with ft_write_event 
> function) appears an error:
> Error using buffer
> events must be given as struct.
> Error in ft_write_event
> buffer('put_evt', event, host, port)
> Now I think that I must define some parameters, like:
> event.type=....
> event.sample=....
> event.offset=....
> event.duration=....
> event.value=....
> but I don't understand which kind of value to insert in these field. 
> Have you some hint? Did you make me some example?
> Thank you very much.
> Luca
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

E-Mail: jm.horschig at donders.ru.nl
Tel:    +31-(0)24-36-68493
Web: http://www.ru.nl/donders

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands

More information about the fieldtrip mailing list