Summary
|
LSL Event Marker
|
Info |
Category: |
Communication |
|
AddIn: |
Signal Processing |
Creator: |
OkazoLab |
|
Scope: |
Parent event |
Owns Snippets: |
None |
|
Usage: |
Snippets |
Properties
Name | Description | Constraints | Type | On 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
- 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:
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.