Neuro Rook Biosensing/Neurofeedback Open Source Suite

I’ve released an early version of the Neuro Rook biosensing/neurofeedback open source suite on GitHub. Currently, it connects to the amplifier board and processes signals through the pipeline. The suite performs sliding window analysis, detrending, applies optional bandpass and notch filters, calculates Power Spectral Density, and computes band powers.
While the current features may not seem too exciting, most of the complex math and signal processing work is complete and covered by extensive tests. The state store manages most user-configurable parameters, providing a solid foundation for future development of the user interface and additional features.
This is my second attempt at the project. The first version was somewhat messy, and I was dissatisfied with the code quality. This time, I adopted a more structured approach. The original project was written in Python with a QT interface. I became enthusiastic after acquiring the Neuro Pawn amplifier board and wanted to quickly build something functional. However, I ended up adding features without focusing on fundamentals. Despite this, I don’t consider the first attempt a failure, it gave me valuable insight into what I want to achieve and how to approach it. It also refreshed my knowledge of signal processing, which I hadn’t worked with since university. From that project, I have a gif showing a screen capture of the interface, and my goal is to eventually reach feature parity with that version.

Now, onto some crucial design decisions for this project. I chose Kotlin multiplatform. Although I’ve worked with Kotlin for some time, this is my first experience with multiplatform development. My primary consideration was the programming language; I knew that Brain Flow would be the library of choice. Brain Flow supports Python, C++, Java, C#, Julia, Matlab, R, Typescript, and Rust. For a brief moment, I considered using Scala, my preferred language, but I needed broad support for different platforms. I wanted a single codebase for all platforms, using a modern language I am comfortable with. Kotlin fits these requirements well.
For now, my focus is on the desktop application, but I plan to provide a mobile version eventually. The idea is to support a lightweight headset with a mobile phone. However, I don’t want to get ahead of myself, so I’ll concentrate on the desktop version first and see how it develops.