/FlickersOnTop

C# program to superpose SSVEP and c-VEP flickers on top of other graphical interfaces

Primary LanguageC#GNU General Public License v3.0GPL-3.0

Flickers on top πŸ–₯️

DOI

πŸͺ§ Overview

✨ FlickersOnTop is a program written in C# and Python that offers SSVEP and code-VEP (using m-sequence) flickers implementation trough a Graphical User Interface for Windows only πŸͺŸ.
No need to code ! Just use the software to define flickers and place them. Use the sequencer to enable play and pauses in the flickering. The flickers can be displayed on top of any interface or with a black background for pyschopysics experiments. πŸ§‘β€πŸ”¬
It provides Lab Streaming Layer (LSL) integration to send corresponding markers at the start of the flickering.

🧠 It was developped in the Human-Factors department of ISAE-Supaero (France) by the team under the supervision of Frédéric Dehais.

πŸ“š You can cite our work using the DOI on top or in the CITATION.cff file.

⚠️ This project is still under-development and this is a beta version. If you experience some issue/bug, you can share it with us in the GitHub issues webpage and we would be very happy to work on it ! It can also be used to suggest further improvements.

FlickerOnTop

IMPORTANT WARNING: our app is false flagged by some antivirus as a virus, this is due to the direct OS calls necessary for our click-through functionnality, if you are afraid of anything, you can read and directly compile the source code yourself. One of the known antivirus to flag us is Avast. the latest update of windows defender seemed ok with it.

πŸ‘©β€πŸ’» How to use it

πŸ“₯ Download the compiled version in the Release section and then click on Launch.bat. It will launch the GUI and allows you to create some flickers.
As the gui use python, you need to download some package for it to work, specifically "psutil","PyQt5" and "pySDL2": pip install psutil pip install PyQt5 pip install pySDL2

if "Lanch.bat" doesn't work it most likely means that you don't have python in your environment. if you are using anaconda or other third-party python installer, please launch "MainApp.py" from there with the correct package installed.

  1. Click on Add to add a flicker. You can set a name, X and Y positions, width, height, frequency and phase (for SSVEP). To place and set dimensions of flickers you can use the information of the Mouse position, on the bottom right of the interface. It is also possible to change the color of the flicker (default to white) and the amplitude depth of the flicker (default from 0 to 100%).

  2. By default it would use a black background but you can put the flickers on top of your current interface by a click in the checkbox: Add a Black Screen background when running.

  3. You can also load an image (as for now only in BMP format, you can find some online converter) to replace the rectangle by an image (a checkerboard for instance).

πŸƒ You can then click on TEST to make the flicker run for 10s, you can stop it before with an Escape press. If you click on RUN it will run until you press Escape or on stop. One LSL marker per flicker (with the corresponding information) is sent at the start to synchronize the EEG recording.

πŸ’Ύ The configuration files of the flickers is saved automatically in XML format. You can use it to inspect later your design or to load it in the GUI (Import button) to run the same configuraton.

⏯️ Sequencing

You can click on Sequencing to define a specific sequence of pauses and flickering for each stimulus. Then, every time a flicker stops or restarts a new LSL marker is sent. Currently, you can change in the settings whether you want all flicker to be link to one sequence or for all flicker to have different sequence. This functionality is still under development so the ergonomy could be improved.
Please send us your recommendation! πŸ™

πŸ“ Organization of the repo

The code is divided in two parts :

  • Interface2App: A GUI to design and place flickers. It creates an XML files that would be used as input for the second part.
  • VisualSimuli: Use directly the XML file without GUI to create and animate flickers.

πŸ—œοΈ Make your own build

If you want to build the software by yourself instead of using our executable , here are some information:

  • All files are coded in C# and runing in VisualStudio.

  • Download VisualStudio 2022: https://visualstudio.microsoft.com/vs/

  • There are 2 application extension:

    • SDL2.dll
    • LSL.dll
  • For most cases, it will automatically be added to project when you do download. However, if you meet problem like [BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)] when trying to complite program You should make sure the two extentions are in x64 bits version and you can download them there:

  • https://www.libsdl.org/download-2.0.php

  • https://github.com/sccn/liblsl/releases

And then, you must go to project's properties -> Build -> change Platform target to x64. Select plateform

πŸ†˜ Help

If you experience issues during installation and/or use of this program, you can post a new issue on the GitHub issues webpage. We will reply to you as soon as possible and are very interested in to the improvement of this tool !