Skip to content

Tutorial 6. Network mode

Chadwick Boulay edited this page Oct 18, 2019 · 1 revision

LSL can record data from several data sources in a network. E.g. one laptop runs the stimulus presentation, sending out a marker stream, a second computer runs the EEG acquisition software, sending out an EEG stream and a third computer is running the LabRecorder to store the data.

In this tutorial, you will learn to record several audio streams that originate from different computers.

  • Connect several computers via a network. You can either use a local wifi - or you can connect several computers using a router

  • Make sure that the different machines are connected to each other

    • Open Windows Command prompt (type ‘cmd’ in the Windows search window
    • By typing ‘ipconfig’ you get the computer IP address.
      • Look for ‘IPv4 Address’
    • Note the IP address of all machines
    • You can check whether the machines you want to use for the experiment can see each other by typing ‘ping xxx.xxx.xxx.xxx’ (where xx is the IP address of the other machines)
    • If the other computer cannot be reached a time-out will occur
      • You will see something like Packets: sent = 4, received = 0, lost = 4 (100% loss)
      • If the other computer can be reached you will see
        • Reply from … time<1ms
        • Packets: sent = 4, received = 4, lost = 0 (0% loss)
        • Approximate round trip times in milliseconds
        • Minimum = 1 ms, Maximum = 1 ms, Average = 0 ms
  • Create a config file for your specific setup

  • Run AudioCaptureWin on the different machines

  • Run LabRecorder on one of the machines

  • Run Keyboard Capture app on one of the machines

  • In the LabRecorder, you should see the audio capture and keyboard streams from all machines

  • Repeat the experiment from tutorial 2

    • Start the LabRecorder
    • Press in the keys on the machine that runs the Keyboard app
    • Pronounce the letters loud enough so that your voice gets picked up by all the microphones that are currently in use.
    • Stop the LabRecorder
  • Load the resulting .xdf file into MATLAB

    • You should see one marker stream (from the keyboard)
    • You should see several audio streams (.info provides more information about the origin of each stream).
    • Visualize the different audio streams
    • Given that the input signal was identical for all microphones we expect that the different traces overlap. Mind the sampling rate of the audio stream (>44000 Hz).