Lab Streaming Layer (LSL) is a protocol that enables streamlined and synchronized collection of time series measurements across multiple machines and applications. The LSL feature is designed to support research experiments requiring sub-millisecond timing precision and to allow efficient, two-way communication between EmotivPRO and other third party software and devices. EmotivPRO’s LSL feature allows users to synchronize data streams across multiple devices and allows real- time processing of raw EEG data in 3rd party Apps. LSL also makes it possible to send distinct markers on different computing devices and synchronize markers across the devices and applications. Here are guidelines and some examples to use LSL with EMOTIV Brainwear®.
- Download and install the EMOTIV Launcher and EmotivPRO.
- Get a EmotivPRO license from https://www.emotiv.com/emotivpro/
After connecting your EMOTIV Brainwear® headset on EmotivPro, go to Settings > LSL > Outlet as below:
-
Stream name: Set the stream name for transmission. The stream name consists of the prefix "EmotivDataStream-" combined with data types such as: EEG, Motion, Performance-Metrics, Contact-Quality, EEG-Quality or Band-Power
-
Data stream: Choose the data stream for transmission and select between supported EEG, Motion, Performance Metrics, Contact Quality, EEG Quality, Band Power Data. An individual LSL stream will be created for each one.
-
Data format: Currently, 2 types are supported: cf_float32 or cf_double64. But if you choose type cf_float32, the timestamp might not be correct as expected because the timestamp value is out of range(-16777216 to 16777216) which mentioned in LSL doc.
-
Transmit type: Set the transmission type by selecting between Sample or Chunk. For Chunk, you can set the Chunk size to be 4/16/32/64/128/256.
The data output format as below table:
Stream type | Data output format | Sample rate | Notes |
---|---|---|---|
EEG | {"Timestamp", "Counter", "Interpolate", , "HardwareMarker", "Markers" } | 128Hz/ 256 Hz | Description of EEG channels at link. The Markers channel is supported from V3.0 and it is marker value of marker object included on EEG data. |
Motion | {"Timestamp", "Counter", "Interpolate", "Q0","Q1","Q2","Q3", "ACCX","ACCY","ACCZ", "MAGX","MAGY","MAGZ"} | 32 Hz / 64 Hz / 128 Hz | Description of Motion channels at link |
Performance-Metrics | {"Timestamp", "Engagement","Excitement","Focus","Interest ", "Relaxation","Stress"} | 2 Hz for high resolution / 0.1 Hz for low resolution | Description of Performance metric at link |
Contact-Quality | {"Timestamp", "BatteryPercent", "Overall", "Signal", } | 2 Hz | Description of Contact Quality at link but the order of channels changes a bit. |
EEG-Quality | {"Timestamp","BatteryPercent","Overall","SampleRateQuality", } | 2 Hz | Description of EEG Quality at link |
Band-Power | {"Timestamp",<EEG sensors/Band>} | 8 Hz | Description of Band Power at link |
After connecting your EMOTIV Brainwear® headset on EmotivPro, go to Settings > LSL > Inlet as below:
After sending marker via LSL, You can see the stream name in the Inlet page. Choose one then click the Connect button. After that, you will see the marker being added to the data stream as below:
Currently we only support sending markers to the Inlet with 2 options:
- A simple marker value - Double / integer type is expected but EmotivPRO will extract only the integer part before adding into data stream.
- Expected format of data:
{"MarkerValue"}
- Marker with time for timing synchronization - The marker event is a vector with 3 elements:
MarkerTime
is the epoch time of the event in double type.MarkerValue
is value of marker. Double / integer type is expected but EmotivPRO will extract only the integer part before adding into data stream.CurrentTime
is current epoch time (double type) when the marker is being pushed to the Inlet. It is usually later than theMarkerTime
.- Expected format of data:
{"MarkerTime", "MarkerValue", "CurrentTime"}
There are some guidelines and examples on 3rd party applications:
-
Guidelines for MATLAB.
-
Guidelines for OpenViBE.
-
Guidelines for C++ project.
-
Guidelines for PsychoPy project.
-
Guidelines for Python project.
-
Guidelines for Unity project.
See here.