/LSL_Neuromore

Connecting LSL Stream to Neuromore Studio

Primary LanguagePython

This is an adaptation of LSL_Neuromore from ViacheslavBobrov adapted to work alongside OpenSignals.

LSL for Neuromore Studio (OpenSignals Fork)

Connecting BITalino devices to Neuromore Studio

demo video

The script redirects LSL stream to OSC, which Neuromore Studio takes as its input. The script connects Muse headband, but in theory it can work with other devices (for example Open BCI) as long as the data from them goes thought LSL stream. Below is the instruction for Windows 10. For the other platforms the steps are similar, except no need for running BlueMuse, because muse-lsl can be used instead (https://github.com/alexandrebarachant/muse-lsl)

Prerequisites

  1. Python 3 (tested with 3.7 version) with pylsl and python-osc packages installed
    pip install pylsl
    pip install python-osc
  2. OpenSignals (r)evolution https://biosignalsplux.com/products/software/opensignals.html
  3. Neuromore Studio https://github.com/neuromore/studio (tested with 1.4.4 version)

OpenSignals/BITalino Setup

  1. Pair your device in the bluetooth preferences of your OS
  2. Start OpenSignals
  3. Go to the device finder and enable your device. Sample rate and channel selection can also be altered here
  4. In the settings, go to INTEGRATION and tick Lab Streaming Layer
  5. Copy
  6. Begin acquisition (red record button)

Running the script

  1. Connect the Muse headband to BlueMuse
  2. Run python3 stream_data.py
  3. Open Neuromore Studio and configure OSC Server (Edit -> Settings) to listen on input port 4545, address 0.0.0.0 (if everything runs on a local machine)
  4. In the Studio create a Classifier and create 4 (or 5 for aux channel) OSC Input nodes Screenshot
  5. Configure each node to listen to one of the OSC addresses (/bitalino/A1, /bitalino/A2 etc.) and set the sampling rate to 256
  6. To see the raw data: View -> Add -> Signal View

The Script should work for Muse 2 as well, alternative solution https://github.com/naxocaballero/muse2-neuromore

Troubleshooting

  1. By default, the script takes data from the OpenSignals directory. If this returns an error, copy from OpenSignals (r)evolution/configurationsdevice_list.json/ to the LSL_Neuromore folder and add run python3 stream_data.py local_dir

Limitations

  1. Currently, this has only been tested with BITalino

  2. This has not been tested with multiple devices in the configuration file, only one device should be enabled at one time

  3. Only streaming (max 6) analog channels by default, digital channels can be added to the cahnnel list, however.