Abstract
Accurately recording the interactions of humans or other organisms with their environment and other agents requires synchronized data access via multiple instruments, often running independently using different clocks. Active, hardware-mediated solutions are often infeasible or prohibitively costly to build and run across arbitrary collections of input systems. The Lab Streaming Layer (LSL) framework offers a software-based approach to synchronizing data streams based on per-sample time stamps and time synchronization across a common local area netowrk (LAN). Built from the ground up for neurophysiological applications and designed for reliability, LSL offers zero-configuration functionality and accounts for network delays and jitters, making connection recovery, offset correction, and jitter compensation possible. These features can ensure continuous, millisecond-precise data recording, even in the face of interruptions. In this paper, we present an overview of LSL architecture, core features, and performance in common experimental contexts. We also highlight practical considerations and known pitfalls when using LSL, including the need to take into account input device throughput delays that LSL cannot itself measure or correct. The LSL ecosystem has grown to support over 150 data acquisition device classes and to establish interoperability between client software written in several programming languages including C/C++, Python, MATLAB, Java, C#, JavaScript, Rust, and Julia. The resilience and versatility of LSL have made it a major data synchronization platform for multimodal human neurobehavioral recording, now supported by a wide range of software packages including major stimulus presentation tools, real-time analysis envirnoments, and brain-computer interface applications. Beyond basic science, research, and development, LSL has been used as a resilient and transparent back-end in deployment scenarios including interactive art installations, stage performances, and commercial products. In neurobehavioral studies and other neuroscience applications, LSL facilitates the complex task of capturing organismal dynamics and environmental changes occurring within and across multiple data streams on a common timeline.
Full Text Availability
The license terms selected by the author(s) for this preprint version do not permit archiving in PMC. The full text is available from the preprint server.