LSL driver: does OpenViBE support non-integer sampling freq.

Obtaining data from various hardware devices
Post Reply
stanislavzabodaev
Posts: 2
Joined: Wed Jun 20, 2018 11:20 am

LSL driver: does OpenViBE support non-integer sampling freq.

Post by stanislavzabodaev »

Hello!

We have an EEG acquisition device which provides a non-integer sampling frequency range, e.g. 121.37 Hz.
Producer provides an LSL server for this device which makes an LSL outlet with 121.37 Hz sampling frequency.
I choose driver: LSL in Acquisition server, set it properly, connect to device and start signal acquisition.
Console of Acquisition server noted "Opened an LSL stream with 8 channels and nominal rate of 121.37 Hz"

In OpenViBE Designer I see the sample rate 121 Hz instead 121.37 Hz, but signal goes well.
The problem is that Acquisition server shows increased in time Device drift and sometimes it becomes freezed.

Does OpenViBE support non-integer sampling freqencies?

All the best,
Stanislav

jtlindgren
Posts: 778
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: LSL driver: does OpenViBE support non-integer sampling f

Post by jtlindgren »

Hello Stanislav,

unfortunately non-integer sampling rates are not currently supported. In this case it might be best to modify the LSL driver to drop an extra sample now and then to get to an integer rate. This is because if you want to mark your EEG with events in OpenViBE (e.g. for training classifiers in BCI we need this), the TCP Tagging we use to align EEG markers to the signal uses the declared sampling rate in order to figure start and end times of chunks. I haven't tested the behavior when therq is a constant mismatch between the declared and the real sampling rate.

If the integer sampling rate is different from the real one, in that case its normal that the drift *measure* will increase as the AS will compute the expected number of samples based on the integer sampling rate, not the actual one. However, it should not freeze and if it does, there's a bug somewhere.

Cheers,
Jussi

stanislavzabodaev
Posts: 2
Joined: Wed Jun 20, 2018 11:20 am

Re: LSL driver: does OpenViBE support non-integer sampling f

Post by stanislavzabodaev »

jtlindgren wrote:Hello Stanislav,

unfortunately non-integer sampling rates are not currently supported. In this case it might be best to modify the LSL driver to drop an extra sample now and then to get to an integer rate. This is because if you want to mark your EEG with events in OpenViBE (e.g. for training classifiers in BCI we need this), the TCP Tagging we use to align EEG markers to the signal uses the declared sampling rate in order to figure start and end times of chunks. I haven't tested the behavior when therq is a constant mismatch between the declared and the real sampling rate.

If the integer sampling rate is different from the real one, in that case its normal that the drift *measure* will increase as the AS will compute the expected number of samples based on the integer sampling rate, not the actual one. However, it should not freeze and if it does, there's a bug somewhere.

Cheers,
Jussi
Dear Jussi, thanks for the fast reply. I think modification of the driver is a good idea.

Post Reply