openFrameworks wrapper for the RapidLib machine learning library
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

alt text


ofxRapidLib is an openFrameworks wrapper for the RapidLib library. RapidLib is a lightweight, interactive machine learning library intended to be used in interactive music and visual projects. It was directly inspired by Rebecca Fiebrink's Wekinator, and was written in collaboration with her at Goldsmiths, University of London, as part of the RAPID-MIX project.

RapidLib is an open source, cross-platform project and is avaiable under a BSD license.

The master branch of ofxRapidLib has been tested with ofx_0.10.0 and MacOS 10.13.


RapidLib DOxygen documentation

Interactive machine learning

The interactive machine learning API has the following classes:

  • classification (k-Nearest Neighbor)
  • regression (Neural Network)
  • seriesClassification (Dynamic Time Warping)

There are also two classes for holding the data that are used to train machine learning models:

  • trainingExample
  • trainingSeries

Basic signal processing

In addition to machine learning, ofxRapidLib provides users with some basic signal processing algorithms for pre-processing incoming sensor data. This is centered around a buffer class, called rapidStream. It offers the following functions:

  • rapidStream.velocity() (aka first-order difference)
  • rapidStream.acceleration() (aka second-order difference)
  • rapidStream.minimum() The smallest value in the buffer
  • rapidStream.maximum() The largest value in the buffer
  • rapidStream.sum() sum of all buffered values
  • rapidStream.mean()
  • rapidStream.standardDeviation()
  • rapidStream.rms() root mean square of values in the buffer
  • rapidStream.bayesfilter(input) Bayesian filter for EMG envelope detection
  • rapidStream.minVelocity()
  • rapidStream.maxVelocity()
  • rapidStream.minAcceleration()
  • rapidStream.maxAcceleration()


Description of examples


RapidLib has been ported to JavaScript. A node module is maintained here Add it to your node app with:

npm install rapidlib

The RapidLib JavaScript library also runs client side. It is extensively documented on CodeCircle. Search for the tag "#RapidLib"