Skip to main content

Elata SDK

The Elata SDK is a cross-platform Hardware Abstraction Layer (HAL) for EEG devices with real-time signal processing, analysis models, and remote photoplethysmography (rPPG). It provides three npm packages for web applications.

Architecture

┌──────────────────────────────────────────────────────┐
│                        Elata SDK                      │
├──────────────────────────────────────────────────────┤
│  Platform Bindings                                    │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐            │
│  │  WASM    │  │  Swift   │  │  Kotlin  │            │
│  │ (Browser)│  │  (iOS)   │  │(Android) │            │
│  └────┬─────┘  └────┬─────┘  └────┬─────┘            │
│       └─────────────┴─────────────┘                  │
│                      │                                │
│  Models Layer        │                                │
│  ┌─────────────────┐ ┌─────────────────┐              │
│  │ Alpha Bump      │ │ Calmness        │              │
│  │ Detector        │ │ Model           │              │
│  └────────┬────────┘ └────────┬────────┘              │
│           └────────┬──────────┘                       │
│  Signal Processing │                                  │
│  ┌─────────────────────────────────────┐              │
│  │ FFT │ Band Power │ Filtering        │              │
│  └─────────────────────────────────────┘              │
│                    ▲                                  │
│  HAL Layer         │                                  │
│  ┌─────────────────────────────────────┐              │
│  │         EegDevice Trait             │              │
│  │ connect() │ start_stream() │ read() │              │
│  └─────────────────────────────────────┘              │
└──────────────────────────────────────────────────────┘

npm Packages

PackageVersionDescription
@elata-biosciences/eeg-web0.1.0EEG WASM bindings — signal processing, band power, models
@elata-biosciences/eeg-web-ble0.1.0Web Bluetooth transport for EEG headband devices
@elata-biosciences/rppg-web0.1.1rPPG pipeline — heart rate from camera via face detection

Installation

# EEG signal processing (WASM)
pnpm add @elata-biosciences/eeg-web

# BLE headband connectivity (requires eeg-web)
pnpm add @elata-biosciences/eeg-web-ble @elata-biosciences/eeg-web

# rPPG (camera-based heart rate)
pnpm add @elata-biosciences/rppg-web
Requirements: Node.js 18+, modern browser with WebAssembly support.

Rust Crates

The SDK is built on Rust crates that compile to WASM and native targets:
CratePurpose
eeg-halCore HAL traits: EegDevice, SampleBuffer, ChannelConfig
eeg-hal-syntheticSynthetic EEG device for testing
eeg-signalFFT, band power analysis, filtering
eeg-modelsAlpha Bump Detector, Calmness Model
eeg-ffiUniFFI bindings for iOS/Android
eeg-wasmWebAssembly bindings for browser
rppgrPPG pipeline core
rppg-wasmrPPG WASM bindings
bridge-protoBLE packet format and protocol
muse-protoMuse classic and Athena protocol

Device Support

DeviceProtocolChannelsStatus
Muse 2Classic BLE4 EEG (TP9, AF7, AF8, TP10)Supported
Muse SClassic BLE4 EEG + PPGSupported
Muse S (Athena)Athena v28 EEG + optics + accgyroSupported
Synthetic BridgeBLE bridgeConfigurableTesting only

Platform Support

PlatformEEG ProcessingBLE HeadbandrPPG
Chrome/Edge (desktop)WASMWeb BluetoothMediaPipe
Chrome (Android)WASMWeb BluetoothMediaPipe
Safari/iOSWASMNative bridge requiredMediaPipe
Node.jsWASMN/AN/A
iOS (Swift)UniFFICoreBluetoothNative
Android (Kotlin)UniFFIAndroid BLENative
Rust (desktop)NativeN/ANative
Safari/iOS does not support Web Bluetooth. Use a native app shell with CoreBluetooth, or a companion bridge app streaming frames over WebSocket.

Build from Source

git clone https://github.com/elata-bio/elata-sdk.git
cd elata-sdk

./run.sh install          # Install dependencies
./run.sh build all        # Release build (WASM + TS)
./run.sh test             # Run all tests
./run.sh demo eeg         # Launch EEG demo
./run.sh demo rppg        # Launch rPPG demo

Next

EEG Web

Signal processing and models

BLE Transport

Connect to headband devices

rPPG

Heart rate from camera