Welcome
Guest
, you are in:
<root>
Elements
•
Login
EventIDE Wiki
Navigation
¶
Main Page
Random Page
Create a new Page
All Pages
Categories
Navigation Paths
Administration
File Management
Create Account
Search the wiki
Back
LSL Event Marker Element
Modified on 2023/05/22 07:23
by
Administrator
Categorized as
Communications
,
Elements
<div style="margin-right: 10px; margin-left: 16px; margin-bottom:10px; float: right; width: 500px; overflow: hidden; height: auto; padding: 0px; background: #fafafa; background: -webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#fafafa));background: -moz-linear-gradient(top, #fbfbfb, #fafafa);border: 1px dashed #ddd;box-shadow: 0 0 0 3px #fff, 0 0 0 5px #ddd, 0 0 0 10px #fff, 0 0 2px 10px #eee;"> == Summary == {s:Element Info Panel | title=LSL Event Marker | category=Communication | icon=[image|Element Icon|{UP(LSL-Event-Marker-Element)}LSL-Event-Marker-Element-Icon.png] | author= OkazoLab | addin= Signal Processing | scope= Parent event | usage= Snippets | ownsnippets= None } == Properties == {| |- ! Name ! Description ! Constraints ! Type ! On<br/>runtime<br/>change |- | colspan="5" bgcolor="#AADDDDD" | LSL Settings |- | Stream Type | Defines a type of the LSL stream. Arbitrary type names can be defined, but some software may require the 'Markers' type, in order to process event markers correctly | {s:atDesign} | String | |- | Stream Name | Defines which LSL stream will be connected at runtime. You must have the LSL stream running, when you change this property for the first time. Note that the channel configuration of the element is updated each time as you change this property | {s:atDesign} | String | |- | Marker Type | Define a sample type of the event marker. | {s:atDesign} | Int32 | |- | Working Mode | Define a working mode for the element. | {s:atDesign} | Int32 | |- | colspan="5" bgcolor="#AADDDDD" | Runtime Control |- | Marker Value | Defines a value that will be sent as event marker, The value type must match or be convertible to the chosen marker type | {s:atNormal} | String | |- | Send Marker Now | Runtime action that instantly sends an event marker with the current marker value. You have to invoke this action in snippets by 'SendMarkerNow=true;', if the element works in the manual mode. | {s:atRuntimeAction} | Boolean | |- | colspan="5" bgcolor="#AADDDDD" | Control |- | Is Enabled | If set to false the element is completely omitted when the experiment is run | {s:atDesign} | Boolean | |- | Title | Title of the element | {s:atDesign} | String | |- |} == == </div> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> '''LSL Event Marker Element''' sends custom text markers and timestamps to an external application via a single-channel [^https://labstreaminglayer.org/#/|LSL stream].<br><br> {TOC} == Description == When you run an experimental task in EventIDE, sometimes it is necessary to send synchronization markers to another applications. For example, you may have EEG recording software running on another computer in a network and you want to mark different events such as stimuli and participant's responses in an EEG recording. If such external hardware supports the LSL protocol, you can use one or multiple '''LSL Event Marker Elements''' for that purpose. The '''LSL Event Marker Element''' creates a new LSL stream(s) and instantly sends submitted text markers into it. The LSL timestamps in such streams are based on the experiment time. == Practical Use == The '''LSL Event Marker Element''' can function in one of 2 modes selected by the '''Working Mode''' property: '''Auto output on event onset''' and '''Manual Output''' === Using the element in the Auto output on event onset mode === # Create the LSL Event Marker element in an event that needs to be marked in another application # Define a new '''Stream Name''', if necessary, If multiple '''LSL Event Marker Elements''' use the same stream name, they will share a single LSL stream at runtime (the most common scenario) # Set the '''Marker Value''' property with a fixed marker text. For example, you can use 'Stimulus onset' for a stimulus event in your experiment # Optionally, you can click on the '''Send Marker Now''' property to test creation of an LSL marker stream and sending a single marker. After such test, the LSL marker stream should be detectable by en external application # Add LSL Event Marker elements to other relevent events in your experiment # Run your experiment and connect to the LSL marker stream in an external application === Using the element in the Manual Output mode === # Create the LSL Event Marker element in any event of your experiment. In the manual mode, the element can be uses across all events # Create 2 proxy variables linked to the '''Marker Value''' and '''Send Marker Now''' properties of the element # Add the marker sending code into a selected snippet of your expeirment. For example, the following C# code instantly sends a marker containing a current response's info: <div style="margin-left:0px; margin-right:10px; margin-top:10px; width: auto; overflow: hidden; height: auto; background: #fafafa; background: -webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#fafafa));background: -moz-linear-gradient(top, #fbfbfb, #fafafa);border: 1px dashed #ddd;box-shadow: 0 0 0 3px #fff, 0 0 0 5px #ddd, 0 0 0 10px #fff, 0 0 2px 10px #eee;"> <pre> <code class="language-csharp"> MarkerValue="Response by "+ResponseButtonName+" at "+ResponseTime; SendMarkerNow=true; </code> </pre> </div> == Notes == * Note that the LSL marker stream is created as you start an experiment. Only after that the stream can be connected in an external app. If this order can not be used, make a test with the '''Send Marker Now''' property in the EventIDE designer before starting an expeirment.
Meta Keywords:
Meta Description:
Change Comment:
ScrewTurn Wiki
version 5.2.0.8. Some of the icons created by
FamFamFam
.