|
2 | 2 |
|
3 | 3 | The MATLAB Viewer is a MATLAB function (vis\_stream) that is included with the full LSL distribution. It allows you to view the signal content of any stream on your lab network in real time. There is also an alternative viewer available that is written in C++ and does not require MATLAB (the StreamViewer). |
4 | 4 |
|
5 | | -# Usage |
| 5 | +# Installation Mac and Windows |
| 6 | + |
| 7 | +After cloning the project, get the latest librairies from https://github.com/labstreaminglayer/liblsl-Matlab/releases/ (note that some releases only have Windows files while others have both Mac and Windows file). This project was successfully run with liblsl-Matlab-lsl1_14-MatlabR2020a-Win64-VS2017.zip (Windows) and liblsl1_13_0_b13-MatlabR2019a-MacOS10_14.zip (MacOS). |
6 | 8 |
|
7 | | - * Start MATLAB and add the MATLAB Viewer folder to the path, either through the GUI, under File / Set Path / Add Folder) or in the command line, by typing: |
| 9 | +The folder should be name "liblsl-Matlab" (if it is not rename it). Some releases of liblsl-Matlab do not contain "bin" subfolders and should be avoided. |
| 10 | + |
| 11 | +# Usage |
8 | 12 |
|
9 | | -> `addpath('C:\\path\\to\\labstreaminglayer\\Apps\\MATLABViewer')` |
| 13 | + * Start MATLAB and add the MATLAB Viewer folder to the path, either through the GUI, under File / Set Path / Add Folder) or in the command line. |
10 | 14 |
|
11 | 15 | * Make sure that you have some stream online. For a quick test you might try the AudioCaptureWin app, or the example program SendData32.exe in labstreaminglayer/LSL/liblsl/bin. |
12 | 16 |
|
13 | | - * Now type `vis_stream` to bring up the viewer GUI; it should give you a window that looks like the following. If you don't have a stream online it will finish with an error message. |
| 17 | + * Now type `vis_stream` to bring up the viewer GUI; it should give you a window that looks like the following. If you don't have a stream online it will finish with an error message. If the program gets stuck or return an error, try instead setting parameters throught he command line to avoid having to use the graphic interfaces (which sometimes create problems). For example, type `vis_stream('timerange',5)` |
14 | 18 |
|
15 | 19 | >  |
16 | 20 |
|
@@ -45,5 +49,14 @@ Since the function can be scripted via the command line, one can make a script t |
45 | 49 |
|
46 | 50 | The MATLAB function is relatively simple and so can be customized quite easily. |
47 | 51 |
|
| 52 | +# Compilation notes for Windows and OSX |
| 53 | +Make sure the program runs from the Matlab command line. You need to do that for all sessions as it adds important paths. |
| 54 | + |
| 55 | +Invoke the Matlab Compiler App. Click on the "App" tab and select "Application compiler." If this is not available for you, it means that you do not have the Matlab compiler installed. |
| 56 | + |
| 57 | +Add the function vis_stream_com.m (this function calls vis_stream.m but allows to set parameters on the command line of the compiled application). Manually add the library "liblsl-Matlab/bin/lsl.dll" (Windows) or sometimes "liblsl-Matlab/bin/lsl64.dll." For Mac the file to add is named for "liblsl-Matlab/bin/liblsl64.dylib" (note that when the zip file of liblsl-Matlab is uncompressed, this file may actually be a symbolic link to "liblsl64.1.13.0.dylib" (for example) and cannot be used for compilation purpose. If this is the case, simply copy liblsl64.1.13.0.dylib onto liblsl64.dylib. Compilation for Ubuntu has not been attempted but there is no reason it should not work. |
| 58 | + |
| 59 | +Press package. Test using the executable in "for_testing" folder. |
| 60 | + |
48 | 61 | # Caveats |
49 | 62 | Currently, marker streams are not being displayed, and streams with irregular sampling rate will not have the correct time axis. |
0 commit comments