-
Notifications
You must be signed in to change notification settings - Fork 132
Tutorial 2: Getting started with LSL (multiple streams)
In this tutorial, you learn to record two streams simultaneously, one data stream (here Audio), and one marker stream (key presses)
For this tutorial you need
- A Windows Computer with a microphone
- MATLAB (for visualization and data import)
- The LSL MATLAB Viewer (for visualizing the stream)
- The LSL MATLAB Importer (for loading the data into MATLAB)
- The LSL LabRecorder version 12.2b (for data acquisition)
- The LSL AudioCaptureWin App (for streaming the microphone input)
- The LSL Keyboard App (for streaming key presses and releases)
The LSL App can be downloaded from the ftp as .zip files.
- Start LabRecorder.exe
- Start AudioCaptureWin.exe
- Start Keyboard.exe
Now we conduct a little experiment in which we record button presses and microphone input
-
Start a new recording in the LabRecorder: Click 'Start'
-
Repeat the following steps for all letters on the middle row of the keyboard (from ‘a’ to ‘l’, on a QWERTY keyboard)
- Press down the key on the keyboard
- Pronounce the letter
- Release the key (make sure that you release the key once you are finished pronouncing this letter).
-
Stop the recording
-
In MATLAB change to the directory of MATLAB Importer
- Load the .xdf file you just recorded: data=load_xdf(‘C:\yourfilepath\’) (Or simply copy the path that is shown in the LabRecorder 'Storage Location')
- The structure now contains two streams
- Continuous signal of the audio stream (type 'audio')
- Marker stream of the button presses (type 'marker')
- Visualize the results (markers and audio)
The load_xdf function provides several advanced options for time synchronization, support for breaks in the data, as well as other defects (see help load_xdf).
For EEGlab users there is and xdf_import plugin.
- Start EEG lab
- You can load the data either from the gui or the command line
- EEG=pop_loadxdf(filepath,’streamtype’, ‘Audio’)
- Specify in this case that the stream has the type ‘Audio’
- With the option ‘exclude_markerstreams’ you can select to exclude some marker streams if needed
- You now can use the standard functionality of EEGLab such as data visualization or epoching