Open IngeLeu opened 2 years ago
Yes, this works fine. We actually discovered that the problem is that we cannot collect 2 streams at once. Only the EEG or only the LSL marker stream works just fine. Problem is we need both to test the delay between the amplifier and LSL stream
LabRecorder can record from many streams. If I recall correctly, the BrainAmp software has its own marker stream. Is that correct? And am I assuming correctly that you are sending out a custom marker stream from your own software?
Make sure that each stream has its own unique name and unique_id.
Thank you so much for replying to us.
Yes, the Lab Recorder can record any streams only if they are not empty, otherwise, it would be crashed.
And yes we are going to send our customized markers and collect it as well as the BrainAmp markers at the same time. But the problem is if there already exists a lsl outlet, we could not push samples into a second outlet that we create after the first one (the 2ed one would be empty), even they have different names.
Below is a test script used to create 2 streams. The data being pushed into the 2ed stream is empty and can not be collected by LabRecord or something. This issue happened in some particular computers but works well in others.
Thank you again and if you have any idea about this I would be very appreciated!
% Send 2 stream at the same time
lib = lsl_loadlib();
% make a new stream outlet
info1 = lsl_streaminfo(lib,'EEG1','EEG',1,500,'cf_float32','eeg1');
info2 = lsl_streaminfo(lib,'EEG2','EEG',1,500,'cf_float32','eeg2');
outlet1 = lsl_outlet(info1);
outlet2 = lsl_outlet(info2);
% send data into the outlet, sample by sample
pausetime = 1/500;
sample = 1;
beta = sin(20*2*pi*(1/500:1/500:60));
while true
outlet1.push_sample(beta(sample));
outlet2.push_sample(beta(sample));
sample = sample + 1;
if sample >= length(beta)
sample = 1;
end
pause(pausetime);
end
I don't see any obvious reason why this wouldn't work.
There might be something strange about the Matlab lib in certain operating systems. Could it be necessary to open multiple independent instances of the library? That seems strange.
I'm sorry but I almost never use the Matlab library so I have no guesses here.
Let's ping @dmedine who has more experience in Matlab and with BrainAmp.
Thank you that's helpful! But no matter streams are created by Matlab or Python, or even BrainAmp itself, there only exist 1 lsl stream, which means the stream with more than 1 would be empty and could not be resolved. I wonder if you ever have seen this before or have any ideas about it. Thank you!
That is very unusual.
Can you tell me more about the computer that is having trouble? Is it a Mac? Does it have VM or Docker installed?
Sometimes liblsl has trouble advertising a stream to its neighbours when it can't figure out which devices it should use to do its networking. It can get confused by virtual network adapters created for VMs. There was a recent change to liblsl in version 1.16 (in a branch, not yet in main) that fixes this. Maybe that will help you.
But usually when that happens it manifests as the stream not being visible. But it sounds like in your case that the stream is visible only it's not transmitting data (or at least the data aren't being received).
I still think it's a bad network configuration but I can't narrow it down more than that. There are some things that can be done to debug but that would require building C++ applications and using a debugger. If you're willing to go through that then I can provide a little extra guidance. If you are not willing to do that then the next step would be to reinstall the OS.
It's Windows 10. I will check more information when I access the lab pc.
Before that, I just found the exact same issue has been put out Issue23, which is streaminfos always just contains a single pointer to a stream, although there are multiple streams visible from lab recorde. And you also answered it at the end saying modifying the KnownPeers parameter in the lsl_api.cfg file. But I could not find a lsl_api.cfg anyway, and also the link you've game might be expired? So can you maybe specific the solution of "modifying lsl_api.cfg"? Thank you for helping!
Sorry I don't know how I missed this message before. If lsl_api.cfg doesn't exist then you simply create it.
https://labstreaminglayer.readthedocs.io/info/lslapicfg.html
Sorry I don't know how I missed this message before. If lsl_api.cfg doesn't exist then you simply create it.
https://labstreaminglayer.readthedocs.io/info/lslapicfg.html
Thank you! That would be helpful!
Dear all, We are working on Windows PC with x64 processor and Windows 10 installed. For timing testing purposes we are sending out a marker stream and brainamp eeg stream. The recording starts as normal but when saving the lab recorder freezes and the markers are not saved in the data file. We tried all 4 releases of labrecorder. Any idea what could be the problem? Best Inge (Maastricht University)