OpenViBE forum

The OpenViBE community
It is currently Sat May 26, 2018 11:05 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Feb 27, 2015 4:04 pm 
Offline

Joined: Sun Nov 23, 2014 5:32 am
Posts: 21
I've try to send both data and stimulus on LSL export box in openViBE, but I can't understand how to recieve the stimulus, I have write a matlab code, which is shown below to recieve the data and the stimulus, but it's recieve the data and additional row, which is always has the value zero. for example if I have 4 channels I will receive (444 4445 4446 1478 0) where the first four values is the values of channels and the last one always has the value zero.

I expect the last value or the additional row is the stimulus value, but why it's always has the value zero! I have applied many stimulus by the keyboard stimulus but it's still give me zero ! could you help me to know how to recieve the stimulus?

Code:
disp(Loading the library...');
lib = lsl_loadlib();
disp('Resolving an EEG stream...');
result = {};

while isempty(result)
    result = lsl_resolve_byprop(lib,'type','EEG'); end

% create a new inlet
disp('Opening an inlet...');
inlet = lsl_inlet(result{1});

disp('Now receiving data...');
while true
    [vec] = inlet.pull_sample();
    disp('new data : ')
    fprintf('%.2f\t\n',vec);
    % Ex : vec  = [9987 4452 1147 7777 0]
end


Top
 Profile  
Reply with quote  
PostPosted: Mon May 04, 2015 9:16 am 
Offline

Joined: Tue Dec 04, 2012 3:53 pm
Posts: 696
Location: INRIA Rennes, FRANCE
Hello,

if I understand correctly, the LSL Export box you're talking about (in 1.0 its called 'LSL Export (Gipsa)') is supposed to append the stimuli as a number in the last column, with 0 meaning there is no stimulation at the time corresponding to that sample.

In 1.0, you can also try the other LSL Export box which encodes stimulations in a separate integer stream.


Happy hacking,
Jussi


Top
 Profile  
Reply with quote  
PostPosted: Tue May 19, 2015 9:17 am 
Offline

Joined: Tue Dec 04, 2012 3:53 pm
Posts: 696
Location: INRIA Rennes, FRANCE
Btw, I've posted a brief documentation about using LabStreamingLayer in OpenViBE 1.0.0 here,

http://openvibe.inria.fr/how-to-use-lab ... -openvibe/


Cheers,
Jussi


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Americanized by Maƫl Soucaze.