
EEG & Hardware Integrations
Labvanced connects to EEG and other lab hardware in two ways, and both can carry Lab Streaming Layer (LSL) markers, an open standard for time-synchronized data streams. The Desktop App has LSL built in, so a study can send a marker at every stimulus, response, or condition change and receive markers from other devices.
The WebSocket API connects a study to a script on the same computer. The script can bridge LSL markers in both directions for studies that run elsewhere, and it can also reach devices that do not use LSL.
Table of Contents
Two Ways to Connect
An EEG recording is only interpretable if the recording system knows when each stimulus appeared and what the participant did, and markers provide that. Both routes can carry LSL markers. They differ in where the study runs and in which devices they reach.
| Connection | Best when |
|---|---|
| Built-in LSL in the Desktop App | The study runs offline on the lab computer, next to the EEG or sensor recorder. LSL markers are sent and received with an action and a trigger in the event editor, with no code. See Desktop App. |
| WebSocket API with a script | The study connects to a script on the same computer, on Linux, macOS, or Windows. The script can bridge LSL markers in both directions, so a study that does not run in the Desktop App still reaches an LSL recorder. It can also talk to devices that do not use LSL, and it suits closed-loop setups, biofeedback, or sending data to another server. See the WebSocket API guide. |
Built-In LSL in the Desktop App
In the Desktop App, LSL is built in: markers are sent over an LSL stream that you define in the study settings, and no code is required.
Sending Markers From Your Study
You activate Lab-Streaming-Layer in the study settings and define one or more output streams, each with a name, a channel format, and a channel count. A Send LabStreamingLayer Marker action then sends a value to a chosen stream, for example the condition of the current trial or the moment a participant clicks a stimulus. Channel formats include string, 32-bit and 64-bit floating point, and 8, 16, and 32-bit integer. By default a marker carries the current time, and a custom timestamp can be supplied when the event time is known from elsewhere.


Receiving Markers From Other Devices
The Received LSL Marker trigger starts an event when a marker arrives on an input stream. The event can read the received values together with the LSL timestamps and the clock correction, so that a study can react to a signal from another device and relate it to its own timeline.
Helpful Documentation for Built-In LSL
LSL Bridging and Other Devices With the WebSocket API
The WebSocket API connects a study to a script running on the same computer. For LSL, the example scripts send markers from Labvanced and receive markers into it, so the same markers reach the recorder without the built-in LSL support, on Linux, macOS, or Windows. For devices without LSL support, the script talks to the device directly. A Send To Websocket action sends events or values from your study to the script, and a Websocket Trigger starts an event when the script sends a message back, so any device with a programmable interface can exchange triggers and data with the study in real time.
The example below uses this route to record a hardware eye tracker and Labvanced webcam eye tracking together in one session.
Helpful Documentation for the WebSocket Approach
- WebSocket API guide
- LSL marker scripts on GitHub
- Library studies: sending markers and receiving markers
One Study for Remote and In-Lab Participants
Some experiments have a two-part structure: a large group of participants takes part remotely, while a smaller group comes into the lab and performs the same experiment while wearing EEG equipment. The same Labvanced study can serve both groups, so it does not have to be built and programmed twice. For example, 50 participants might be recorded in the lab with EEG while 400 more take part online, all in the same study. See the Desktop App for running the in-lab part offline.
Examples of Hardware You Can Connect
Any device that supports LSL can exchange data with a Labvanced study, and these are common examples.
| Hardware | What it adds to a study |
|---|---|
| EEG | Event markers from your trials recorded alongside the EEG signal for event-related analysis, with any LSL-compatible EEG system. See the EEG integration walkthrough for an example with a Muse 2 headset. |
| GSR and other sensors | Skin conductance or other physiological signals aligned to the same event markers. |
| Hardware eye trackers | Gaze recordings from a dedicated eye tracker synchronized with the study's events. |
| Motion sensors and wearables | Movement data from sensors and wearables recorded in the same session. |
When no extra hardware is available, gaze, facial emotion, and heart rate can also be recorded from the participant's webcam.
Remote Physiological Measurement
Gaze, emotion detection, and heart rate detection from one webcam.
Desktop App
Run studies offline in the lab and connect external devices.
Technical Demos
Demo studies that send and receive LSL markers.
Questions about your study design or platform fit?
Popular Research Applications
These are popular applications of hardware-synchronized studies:
- Cognitive psychology: Event-related EEG studies mark the onset of each stimulus and the participant's response, so that the signal can be segmented by condition. The walkthrough sends markers based on the stimulus category and on the click, which is the typical pattern. See Cognitive Psychology.
- Clinical research: Behavioral tasks can be recorded together with physiological signals in the same session, giving each task event a place in the physiological recording. A webcam-based option is available when a participant cannot attend the lab. See Clinical Psychology.
- Linguistics: Reading and listening studies can send a marker at the onset of each word, sentence, or sound. The markers line up the stimulus timeline with the EEG signal. See Linguistics.
- Sports and movement research: Motion sensors and wearables can be recorded alongside task events, so movement data sits in the same session as the task. See Sports Psychology.

Cognitive Psychology
Event-related EEG with stimulus markers.

Clinical Psychology
Tasks recorded with physiological signals.

Linguistics
Word and sentence onset markers.

Sports Psychology
Motion sensors beside task events.
Frequently Asked Questions
Which hardware can I connect to a Labvanced study?
Do I need to write code to send markers?
Can I use LSL in a browser study?
How are marker times set?
What can a marker contain?
Further Reading
Desktop App
Run studies offline in the lab and connect external devices.
Remote Physiological Measurement
Gaze, emotion detection, and heart rate detection from one webcam.
Timing Precision
Millisecond-precise stimulus timing and response measurement.
Questions about your study design or platform fit?