Page 1 of 1

Send stimulation after a certain after a certain stimulation

Posted: Tue Apr 16, 2019 7:39 am
by Nico A.
Is there a already a box (or combination of boxes) that accomplishes this:

- listen for a certain type of Stimulation
- wait a specified time, and then send a Stimulation of a certain specified type?

Re: Send stimulation after a certain after a certain stimula

Posted: Tue Apr 16, 2019 9:30 am
by Thibaut
Hi,
my first tip starting with OpenViBE open all the example scenarios to see which boxes are proposed.^^
To filter stimulation you have the box Stimulation Filter.
To send stimulatio nafter time you have the lua box.
Thibaut

Re: Send stimulation after a certain after a certain stimula

Posted: Tue Apr 16, 2019 10:01 am
by Nico A.
Thanks! I already tried the Lua box, but I find it creates an additional lag of ~200 ms, just as the other scripting boxes.

Re: Send stimulation after a certain after a certain stimula

Posted: Tue Apr 16, 2019 12:21 pm
by Thibaut
Weird with a mirco test the Lua box haven't lag.
Test with this scenario and this script (replace txt extension by lua). My log is :

Code: Select all

[INF] At time 0.000 sec <Box algorithm::(0x00007a62, 0x00007a93) aka Lua Stimulator> Lua script terminated
[INF] At time 0.008 sec <Box algorithm::(0x00001fac, 0x00006047) aka Stimulation listener> For input 0 with name Stimulation stream 1 got stimulation 32769[OVTK_StimulationId_ExperimentStart] at date 0.000 sec and duration 0.000 sec
[INF] At time 5.008 sec <Box algorithm::(0x00001fac, 0x00006047) aka Stimulation listener> For input 0 with name Stimulation stream 1 got stimulation 32775[OVTK_StimulationId_BaselineStart] at date 5.000 sec and duration 0.000 sec
[INF] At time 15.008 sec <Box algorithm::(0x00001fac, 0x00006047) aka Stimulation listener> For input 0 with name Stimulation stream 1 got stimulation 32776[OVTK_StimulationId_BaselineStop] at date 15.000 sec and duration 0.000 sec
[INF] At time 17.008 sec <Box algorithm::(0x00001fac, 0x00006047) aka Stimulation listener> For input 0 with name Stimulation stream 1 got stimulation 32770[OVTK_StimulationId_ExperimentStop] at date 17.000 sec and duration 0.000 sec
The 0.0008 is the time to load scenarios scripts but there is from the beginning to the end