Closed Yury-Shevchenko closed 4 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
yes, i think it totally makes sense to connect the LSL functionality with UI and let the user decide.
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
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'));