Back to Blog

Synchronizing multi-device recordings with Lab Streaming Layer

How Lab Streaming Layer keeps EEG, event markers, and peripheral devices aligned to sub-millisecond precision during a session.
Engineering
June 18, 2022
Synchronizing multi-device recordings with LSL

Timing is everything. The moment you add a second device — eye tracker, EMG, response pad, another amplifier — synchronization becomes the hardest part of the recording. A few milliseconds of drift can blur an ERP or break a coupling analysis. This post explains how Lab Streaming Layer keeps every stream on the same clock, and how Qusp builds on it.

The Multi-Device Timing Problem

Each device has its own clock, and clocks drift. Sample one stream at 1000 Hz and another at 256 Hz, start them a few milliseconds apart, and let them run for an hour — by the end they can be tens of milliseconds out of alignment. For anything that depends on precise event timing, that drift is the difference between a clean result and noise.

"Unsynchronized streams don't fail loudly — they just quietly move your effects around." — Qusp Engineering Team

How Lab Streaming Layer Solves It

  1. Unified time base: LSL stamps every sample from every device against a common clock, so streams can be realigned exactly after the fact.
  2. Network transport: Streams are published over the network and discovered automatically, so adding a device doesn't mean rewiring the rig.
  3. Drift correction: Per-stream clock offsets are measured continuously and corrected, holding alignment to sub-millisecond precision.
  4. Marker streams: Event markers ride the same time base as the data, so triggers land exactly where they happened.

Building on LSL with Qusp

Qusp treats LSL as a first-class input: any LSL-compatible device can stream into a Qusp session and be recorded against the shared clock alongside the EEG. There's no separate alignment step later, because the synchronization happened at capture.

Because the timing metadata is preserved end to end, downstream analysis can trust that a marker at time t really corresponds to sample t across every device. That trust is what makes cross-device measures — like gaze-locked or movement-locked EEG — actually work.

Practical Tips for Clean Sync

Start every stream before the session begins and let the clock offsets settle. Keep devices on the same network segment to minimize jitter. And always record the marker stream through LSL rather than as a side channel — a trigger that isn't on the shared clock is a trigger you can't fully trust.

Validate alignment on a known event — a flash, a tap, a sync pulse — at the start and end of each session. A two-point check is cheap insurance against drift you'd otherwise discover only in analysis.

Final Thoughts

Multi-device EEG lives or dies on timing. Lab Streaming Layer gives every stream a common clock, and Qusp records against it so synchronization is solved at capture instead of patched in post. Get the timing right once, and every analysis downstream inherits it.