Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How I can get 5x keyboadrs and mouses streams from different computers on LSL? #3

Open
Tkachenko-Denis opened this issue Mar 23, 2022 · 6 comments

Comments

@Tkachenko-Denis
Copy link

When I try to run keyboard.exe on different computers, I only see 1 stream in labrecorder. What can I do to get a couple or more keyboard streams in labrecorder?

@cboulay
Copy link
Contributor

cboulay commented Mar 23, 2022

Ah, yeah that'll be a problem because each stream will appear nearly identical. I thought the latest version of LabRecorder differentiated streams based on host, so you should get them.

If that's failing, the fastest way to accommodate this use-case is to modify the C++ code so the entry point can accept command-line arguments, and add a command-line argument for Stream Name.

@cboulay
Copy link
Contributor

cboulay commented Mar 23, 2022

I just took a quick look at the LabRecorder and I did find the code that uses the host name to help sort. So they should be identified independently in LabRecorder.

Without digging in to the LSL code right now, I suppose it's possible that this is failing because there is no unique source id.

Whether or not that's the case, we should probably add a source id to the stream info instantiation. The source id needs to be unique to each computer so this should probably be generated at runtime based on host id. In other applications I've used a hash for this.

Is this something you can tackle?

@Tkachenko-Denis
Copy link
Author

I don't really understand much about the LSL protocol, I'm just learning. I found an old archive that has a program for capturing marks from the keyboard. (2013 if I'm not mistaken). I assumed it was an application conflict, but I couldn't solve it with C++

@dmedine
Copy link

dmedine commented Mar 28, 2022

These apps should probably be updated to use .NET anyway. That way they could be cross-platform.

@Tkachenko-Denis
Copy link
Author

less than 2 weeks have passed since I learned how to compile through VS using CMake. Finally. Thank you very much for your help @cboulay, I'll try to understand what you mean =)

@tstenner
Copy link
Contributor

tstenner commented Apr 6, 2022

These apps should probably be updated to use .NET anyway. That way they could be cross-platform.

At least for those Linux / macOS-users that have the correct .NET runtime installed.

Some points against it:

  • at least on Linux there's backends (e.g. evdev) with way better temporal resolution, timestamped events, per-device queues and exclusive mode, i.e. you open "keyboard 1" and all keypresses go exclusively to your process without interfering with the UI you already have
  • the archive with the two current input apps and liblsl is <1MB, everything (well, except the msvc runtime) included
  • no JIT, FFI or GC introducing jitter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants