Welcome Guest, you are in: Login

EventIDE Wiki

RSSRSS

Navigation




Search the wiki


PoweredBy

LSL Event Marker Element

RSS
Modified on 2023/05/22 07:23 by Administrator Categorized as Communications, Elements

Summary

Element Icon LSL Event Marker
Info
Category: Communication AddIn: Signal Processing
Creator: OkazoLab Scope: Parent event
Owns Snippets: None Usage: Snippets

Properties

NameDescription                              ConstraintsTypeOn
runtime
change
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                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                String         
Marker Type        Define a sample type of the event marker.                Int32         
Working Mode        Define a working mode for the element.                Int32         
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                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.                Boolean         
Control
Is Enabled        If set to false the element is completely omitted when the experiment is run                Boolean         
Title        Title of the element                String         

LSL Event Marker Element sends custom text markers and timestamps to an external application via a single-channel LSL stream.

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 

  1. Create the LSL Event Marker element in an event that needs to be marked in another application
  2. 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)
  3. Set the Marker Value property with a fixed marker text. For example, you can use 'Stimulus onset' for a stimulus event in your experiment
  4. 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
  5. Add LSL Event Marker elements to other relevent events in your experiment
  6. Run your experiment and connect to the LSL marker stream in an external application 

 Using the element in the Manual Output mode

  1. Create the LSL Event Marker element in any event of your experiment. In the manual mode, the element can be uses across all events
  2. Create 2 proxy variables linked to the Marker Value and Send Marker Now properties of the element
  3. 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:


MarkerValue="Response by "+ResponseButtonName+" at "+ResponseTime; 
SendMarkerNow=true; 
           

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.

 
  Name Size
- LSL-Event-Marker-Element-Icon.png 4.19 KB

ScrewTurn Wiki version 5.2.0.8. Some of the icons created by FamFamFam.