sccn / lsl_archived

Multi-modal time-synched data transmission over local network
242 stars 133 forks source link

Stop recording LSL #344

Closed robertoguarnieri closed 6 years ago

robertoguarnieri commented 6 years ago

I am trying to crate a Matlab GUI in which, using a toggle button, I can stop the recording from an EEG amplifier. How can I do that? Thanks

cboulay commented 6 years ago

How are you recording the data to begin with? Are you using LabRecorder?

robertoguarnieri commented 6 years ago

Yes indeed


From: Chadwick Boulay notifications@github.com Sent: Monday, September 10, 2018 7:06:52 PM To: sccn/labstreaminglayer Cc: roberto9110; Author Subject: Re: [sccn/labstreaminglayer] Stop recording LSL (#344)

How are you recording the data to begin with? Are you using LabRecorder?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sccn/labstreaminglayer/issues/344#issuecomment-419987519, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFeURO0mYnw8oXTmYZhAw-1cGQxhr1G3ks5uZpwsgaJpZM4WhiCI.

cboulay commented 6 years ago

There currently isn't a way to do that. LabRecorder needs support for scripting/interprocess-communication but it doesn't exist right now.

robertoguarnieri commented 6 years ago

Ok. It is something will be possible to develop in the future Thanks


From: Chadwick Boulay notifications@github.com Sent: Monday, September 10, 2018 9:21:09 PM To: sccn/labstreaminglayer Cc: roberto9110; Author Subject: Re: [sccn/labstreaminglayer] Stop recording LSL (#344)

There currently isn't a way to do that. LabRecorder needs support for scripting/interprocess-communication but it doesn't exist right now.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sccn/labstreaminglayer/issues/344#issuecomment-420029395, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFeURHUIXvnF_yQEKJ6y8xCR6tJyn3nLks5uZrulgaJpZM4WhiCI.

dmedine commented 6 years ago

Controlling an amplifier itself from Matlab (or wherever) is not something that LSL does. This is the job of your hardware device's SDK.

Back in the day, LabRecorder was scriptable because it was implemented in Python. It got re-done in C++ sometime ago. For a while I was thinking of going back to the python implementation (the bugs in liblsl-Python got hammered out) but since then a fair amount of improvement has been made.

One idea would be to implement a kind of REST-style protocol for messaging via LSL marker streams. This would be a way to expose any LSL app's functionality to pretty much anything. This requires a lot of careful consideration and design.

cboulay commented 6 years ago

I was thinking about that too. My thought-experiment solutions were a bit awkward in that anytime an app wanted to send a command to LabRecorder it would have to REcreate the control stream to clobber the old one and take over control. Would these control apps then have to destroy their outlets? Would LabRecorder be able to handle the disappearance and reappearance of the "same" stream from different apps?

robertoguarnieri commented 6 years ago

But, using the 'while' in matlab, is it possible to manage this? Thanks


Da: Chadwick Boulay notifications@github.com Inviato: martedì 11 settembre 2018 07:24 A: sccn/labstreaminglayer Cc: roberto9110; Author Oggetto: Re: [sccn/labstreaminglayer] Stop recording LSL (#344)

I was thinking about that too. My thought-experiment solutions were a bit awkward in that anytime an app wanted to send a command to LabRecorder it would have to REcreate the control stream to clobber the old one and take over control. Would these control apps then have to destroy their outlets? Would LabRecorder be able to handle the disappearance and reappearance of the "same" stream from different apps?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sccn/labstreaminglayer/issues/344#issuecomment-420150850, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFeURFCcstEeK-kdT3NvjikNaEuT_ryVks5uZ0kfgaJpZM4WhiCI.

tstenner commented 6 years ago

One idea would be to implement a kind of REST-style protocol for messaging via LSL marker streams.

That was also one of my ideas, but it doesn't map well to LSL, as you don't want one producer and a lot of consumers but one consumer and multiple producers. My current plan is to write Lua bindungs to the recording lib and then embed a Lua interpreter in the Lab Recorder. With that, adding any kind of interface (REST, telnet style with newline separated commands, ...) would be possible while keeping the recorder app clean. However, this discussion should take place in the right issue (#120), so I'm closing this one.

dmedine commented 6 years ago

@tstenner You are right of course about the consumer/producer inversion. I was thinking of this as a kind of stop-gap just for LabRecorder. It could have a listening thread that could spawn inlets to listen for the pre-defined commands (like 'stop'). Realistically no one would ever try to connect a bunch of outlets to control LabRecorder. Lua bindings is certainly more desirable.