makebrainwaves / BrainWaves

An easy-to-use platform for EEG experimentation in the classroom
MIT License
60 stars 26 forks source link

integrating lsl #71

Closed Yury-Shevchenko closed 4 years ago

Yury-Shevchenko commented 5 years ago

jsPsych experiment pushes a value into the created lsl stream on each on_start event. To subscribe to the stream, I have used the following code in a separate application running on a different computer in the same network:

const lsl = require('node-lsl'); const streams = lsl.resolve_byprop('type', 'Marker'); streamInlet = new lsl.StreamInlet(streams[0]); streamInlet.streamChunks(12, 1000); streamInlet.on('chunk', console.log); streamInlet.on('closed', () => console.log('LSL inlet closed'));

teonbrooks commented 5 years ago

cool, this looks good.

after chatting with @jdpigeon, we discussed that we would like to this to be a pref based on the experiment creation. with the custom experiments, we have a checkbox to determine whether it will use eeg or not. we would like to add a checkbox for whether we will use LSL or not. then we will use that state to pref it on here.

this isn't a high priority right now, just wanted to give some feedback on what we were thinking

Yury-Shevchenko commented 5 years ago

yes, i think it totally makes sense to connect the LSL functionality with UI and let the user decide.

sdikker commented 5 years ago

yes this would be great! we're looking into integrating other physio measures besides EEG that may be easier to collect (e.g., HR) that are LSL compatible