Skip to main content
@elata-biosciences/biosignal-session is not published to npm yet. The API below reflects the source in the SDK repository and may change before the first release.

What it does

@elata-biosciences/biosignal-session records a biosignal session (EEG, PPG, rPPG metrics, and more) as a set of typed streams, chunked into self-contained Apache Arrow files. Recording is local-only: the package has no network client. It is built for reliability:
  • every chunk carries a CRC32C checksum and an idempotent (session, stream, sequence) identity
  • the recorder retries, applies backpressure, and never drops data silently
  • real gaps are recorded as explicit discontinuities, never interpolated

The model

Time is session-relative integer microseconds, anchored once when the session starts.

Roles

A recording has two sides that talk over a MessagePort:
Elata doesn’t host session recording yet. Today, use the package in your own host page, or with the in-memory host for development and tests.

Install


Device adapters

Wrap the SDK objects you already use as recording sources:
  • createHeadbandSource(transport): a HeadbandTransport from eeg-web / eeg-web-ble
  • createRppgSource(options): an rppg-web session
  • createPpgSource(options): ppg-web metrics

Try it without hardware

The testing entry runs a full recording against an in-memory host with a seeded synthetic source. Hours of virtual signal run in seconds:

Read chunks back

Every chunk is a complete Arrow IPC file that carries its own schema and identity, so you can decode one on its own, in JavaScript or in Python with pyarrow:

Full guide

The step-by-step recording flow (clock anchor, handshake, opening streams, pushing samples, finalizing) and the host’s guarantees are in the recording guide. AI tools can read node_modules/@elata-biosciences/biosignal-session/llms.txt. To analyze what you record, see biosignal-analytics.