Comments (4)
It's currently not possible as you describe.
Without changing LabRecorder, the best you can do is use the remote control socket control and send it a command to start recording via another application. I'll post a C# sample on how to do that when I find it a little later.
I think this is a worthwhile feature to have though. Rather, I would add a checkbox that enables automatic recording start when all required streams are found. This isn't too difficult to do but I don't have time to do it today. If you want to try to modify LabRecorder this way then I can direct you.
from app-labrecorder.
I should also mention that there is a command-line-interface (CLI) version of LabRecorder. Here is an example from @agricolab on controlling / configuring LabRecorder CLI from a Python program: https://github.com/pyreiz/pyliesl/blob/master/liesl/files/labrecorder/cli_wrapper.py
from app-labrecorder.
Here are a few snippets of C# code we use to control LabRecorder through the remote-control-server:
For setting filename:
using System.Net.Sockets;
private Socket lrSocket;
private IPEndPoint ipe;
ipe = new IPEndPoint(IPAddress.Parse(LRInIP), LRInPort);
lrSocket = new Socket(ipe.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
lrSocket.Connect(ipe);
For filename control:
string msg = "filename ";
if (LRStudyRoot != "")
msg += "{root:" + LRStudyRoot + "}";
if (currentExperiment != "")
msg += "{task:" + currentExperiment + "}";
if (patientID != "")
msg += "{participant:" + patientID + "}";
if (sessionID != "")
msg += "{session:" + sessionID + "}";
if (acquisitionParams != "")
msg += "{acquisition:" + acquisitionParams + "}";
msg += "{modality:" + bidsModality.ToString() + "}";
msg += "\n";
Byte[] bytesSend = Encoding.UTF8.GetBytes(msg);
return lrSocket.Send(bytesSend);
To start / stop recording:
string msg = "start\n"; // Or "stop\n";
Byte[] bytesSend = Encoding.UTF8.GetBytes(msg);
return lrSocket.Send(bytesSend);
from app-labrecorder.
I think the way I would modify LabRecorder is as follows...
here, I would add an else
block with the following:
refreshStreams();
if (missing.empty() && ui->check_autostart->isChecked()) {
startRecording();
}
We'd still need to add that checkbox to the GUI (default unchecked) and then hook it up to some config file parameters, but that's mostly copy-paste-modify examples that are already there.
from app-labrecorder.
Related Issues (20)
- Timestamps of Kinect recording is different from other streams HOT 3
- How does LSL log time_stamps HOT 22
- Does not install on MacOS HOT 1
- The readme claims the Windows release includes all needed dependencies but the Visual Studio runtime is not included HOT 1
- LabRecorder quit unexpectedly - MacBook Pro 2022 (M2) HOT 4
- Code only run when "yes" in the eye tracking box
- LabRecorder crashed while closing the file; saved XDF cannot be read by load_xdf HOT 1
- can we prevent spacebar from stopping a recording? HOT 4
- Can't open Labrecorder on M1 Mac HOT 3
- Setting `PathTemplate` in the configurations file unsets other fields
- all streams selected using RCS HOT 2
- LSL Playback HOT 3
- Send βstartβ invalid HOT 1
- mac os error HOT 1
- Initializing multiple LSL streams for multiple cognitive tasks in Lab Recorder HOT 3
- Support for 22.04 LTS HOT 4
- Bug in which LabRecorder does not record data if the file name ends with a space HOT 4
- RequiredStreams fails for streams with whitespace
- Data conversion HOT 2
- Multiple streams with same name HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from app-labrecorder.