Library / SDK
brainflow-dev/brainflow avatar
brainflow-dev/brainflow

BrainFlow writes the board code once and binds it seven times

BrainFlow is a library intended to obtain, parse and analyze EEG, EMG, ECG and other kinds of data from biosensors

1,774 stars410 forksC++NOASSERTION

At a glance

What is it?
BrainFlow is a C and C++ library for acquiring, filtering and analysing EEG, EMG and ECG data from biosensors, exposed through Python, Java, R, C++, C#, Matlab and Julia bindings that all present the same API. One board agnostic acquisition and processing core is the whole point.
Who is it for?
Adopt BrainFlow if you need to read from more than one biosensor or plan to move between them, or if you want filtering, denoising and downsampling that runs in C and C++ while your own analysis stays in Python, R or Matlab. Do not adopt it if you already have a vendor SDK that works and you will only ever run one device, since the board agnostic layer is then a tax.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The emulator is how seven bindings stay honest

BrainFlow's architecture is a single C and C++ implementation with thin bindings on top. The README states the rule directly: code to read data and to perform signal processing is implemented only once in C/C++, and the bindings just call C/C++ methods.

That is the whole engineering argument, and it is stronger than the usual cross language wrapper claim. Signal acquisition and filtering are the parts where you do not want per language drift, and the repository layout matches the claim: `src/` holds the implementation, and the language packages sit beside it as `python_package/`, `java_package/`, `r_package/`, `cpp_package/`, `csharp_package/`, `matlab_package/`, `julia_package/`, `nodejs_package/`, `rust_package/` and `swift_package/`.

Seven bindings are named as supported in the README's binding list: Python, Java, R, C++, C#, Matlab and Julia. Three more directories exist in the repository tree without being listed in that section, so treat Node.js, Rust and Swift as present but not claimed.

What keeps that many wrappers from drifting is the CI story. The README describes a CI/CD system that runs integration tests for each commit automatically using BrainFlow's Emulator, and the `emulator/` directory is at the top level. The emulator is the piece that makes the claim testable: if the tests never touch a physical board, a board agnostic API can still be verified for shape and behaviour on every commit. That is also the fastest way for a new user to get a working example without hardware.

A uniform API is supposed to make applications board agnostic

The claimed user benefit is not convenience, it is portability. The README says the API is uniform for all boards, and that it makes applications on top of BrainFlow almost board agnostic.

BrainFlow describes itself as a library for obtaining, parsing and analysing EEG, EMG, ECG and other kinds of data from biosensors, with a primary focus on neurointerfaces. The topic tags name the domain: bci, brain-computer-interface, brain-machine-interface, eeg-analysis, emg-signal, ecg, muse and openbci. So the user is a researcher or developer who has a signal, a board that produces it, and analysis code written once.

The three named API areas mirror the actual pipeline. Data acquisition has a straightforward API. Signal processing is described as an API for filtering, denoising and downsampling, which is where the C/C++ core earns its keep, since those are the operations that are slow in a scripting language.

The third area is development tooling, and here it gets specific: a Synthetic board, a Streaming board, and a logging API. Those are not analysis features. A synthetic signal source lets you develop against a known waveform, a streaming board moves data between processes or machines, and the logging API records what crossed the boundary. Whether the Synthetic board substitutes for the emulator in CI or is a separate mechanism is not spelled out in what the README says.

OpenBCI appears in the README as a partner, and the openbci topic tag points the same way, but the README does not list which boards are supported. That list lives in the documentation, and it is the first page to read before committing.

Seven build jobs, one of them running Valgrind

The build status table is worth reading closely because it describes the platforms, not just the green ticks.

There is a Windows test workflow, a Unix workflow covering Linux and macOS, an Android test workflow built on the Android NDK, and an Alpine workflow. Two of the jobs are static checks rather than tests: CppCheck and Clang-Format, the latter matching the `.clang-format` and `.clang-format-ignore` files at the repository root. The fifth is a Valgrind workflow, which is a memory checking job.

Valgrind in continuous integration on a library that talks to USB hardware is a meaningful choice. It implies the memory model is checked on every change, which matters for a core that C, C++, Java, C#, R and Matlab all call into. An error crossing that boundary surfaces as a crash in whichever binding you happened to use, which is the hardest class of bug to attribute.

Android is the surprise entry. A neural signal SDK running on the Android NDK means the same core can serve a mobile brain-computer-interface app, and the `swift_package/` directory suggests iOS is in the same position. That is a wider platform claim than most biosensor libraries make.

The build system is CMake at the root, with a `conanfile.py` for C++ dependency resolution and a `Docker/` directory. The repository also carries an `AGENTS.md`, which usually means instructions for automated coding assistants, plus `CONTRIBUTING.md` and `CODE_OF_CONDUCT.md`.

Installing and a first run without hardware

The README does not give an installation command. It links the documentation at brainflow.readthedocs.io for dev and user guides, and links PyPI, NuGet and a downloads badge as the distribution channels, but there is no `pip install` line to copy.

So the honest instruction is: take the package from PyPI for Python or NuGet for the .NET binding, and read the documentation for the platform specific build steps, because the repository layout shows each language package living in its own directory with its own build expectations. On a source build you would need CMake, a compiler for the core and whatever the Conan packages pull in, but the README does not state these as requirements and this article will not invent them.

For a first real use, the path that does not require a board is the Synthetic board or the Emulator. The README names both as development tools. Start there, confirm your binding loads the shared library and returns data for a synthetic signal, and only then attach hardware. Any other order means debugging your C library build and your biosensor at the same time, and those failures look identical from Python.

Documentation is the routing centre: a main docs index, a developer guide at the BrainFlowDev page, and a Slack workspace for general discussion. The README is explicit that GitHub issues are for tracking requests and bugs, and that Slack is where open discussion belongs.

Uniformity has a cost, and the licence needs reading

A board agnostic layer is a lowest common denominator. The API that serves a cheap EEG board with two channels and a research amplifier with 256 will express the intersection, and the richer features of any single device will need work outside the uniform surface. The README describes the uniformity as near total, and in practice you should expect the abstraction to be excellent for acquisition and filtering and thinner for device specific configuration.

The C and C++ core is the second cost. Every binding depends on a native library loading correctly, which on Windows and macOS means finding the shared object, and on Android means shipping the NDK build inside your application. That is more deployment surface than a pure Python or pure JVM library.

The licence needs a note rather than a summary. GitHub's own licence field for this repository reads Other, which is what it shows when it cannot classify a licence file automatically. The README says all features are free and distributed under MIT licence, and links a LICENSE file. Those two statements are consistent if the LICENSE file is plain MIT with a header the classifier did not recognise, and the way to settle it is to read the LICENSE file at the repository root. If you are shipping a product that links this core, that file is the one to put in front of your own counsel.

On maintenance: the repository is not archived and the last push was on 2026-10-06. The release history shows 5.22.1 on 2026-05-18, 5.22.2 on 2026-05-22 and 5.23.0 on 2026-09-26. Pin a version rather than tracking the master branch.

Editorial conclusion

Adopt BrainFlow if you need to read from more than one biosensor or plan to move between them, or if you want filtering, denoising and downsampling that runs in C and C++ while your own analysis stays in Python, R or Matlab. Do not adopt it if you already have a vendor SDK that works and you will only ever run one device, since the board agnostic layer is then a tax. Verify first against the emulator named in the repository rather than real hardware, and note that GitHub classifies the licence as other while the README states MIT, so read the LICENSE file before shipping.

Frequently asked questions

What programming languages does BrainFlow support?

The README lists bindings for Python, Java, R, C++, C#, Matlab and Julia, and states that all of them provide the same API. The repository also contains nodejs_package, rust_package and swift_package directories, which are not in that supported list.

How do I develop with BrainFlow without a biosensor board?

The README names a Synthetic board, a Streaming board and an Emulator as development tools, and the CI runs integration tests on every commit using the Emulator. Building against one of those first separates a native library loading problem from a hardware problem.

Can I switch EEG boards without rewriting my analysis code?

That is the stated goal, since the API is uniform for all boards and is meant to make applications on top of BrainFlow almost board agnostic. The README does not enumerate the supported boards; that list is in the documentation.

What licence is BrainFlow released under?

The README states MIT and links a LICENSE file at the repository root, while GitHub's own licence field for the repository reads as a custom one it could not classify. Read the LICENSE file to settle which terms apply to your use.

Does BrainFlow do filtering and downsampling, or only data acquisition?

Both. The README lists a straightforward API for data acquisition and a separate API for signal filtering, denoising and downsampling, with that processing implemented once in C/C++ and called through the bindings.

Official sources

  1. brainflow-dev/brainflow on GitHub
  2. Issues
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/brainflow-dev-brainflow.svg)](https://hysenlabs.com/projects/brainflow-dev-brainflow)

Was this useful?