A processing library to assign midi events to members of a sketch.
Java Shell
Latest commit 5af62c6 Mar 13, 2016 @sojamo load mapping from json file

readme.md

MidiMapper

MidiMapper is a processing library that allows to maps midi devices and their events to members of a sketch such as variables and functions. Currently this library is in development stage.

The most basic example

Connect to a midi device and assign a note to a variable. Controller changes will be automatically applied to the value of the variable.

    import sojamo.midimapper.*;
    MidiMapper midi;
    float a;

    void setup() {
      midi = new MidiMapper(this);
      /* SLIDER/KNOB is the name of the Korg nanoKontrol2 device as detected on osx */
      midi.connect("SLIDER/KNOB").assign(16).to("a");
    }

    void draw() {
      background(0);
      fill(255);
      translate(width/2, height/2);
      rotate(map(a, 0, 127, -PI, PI));
      translate(-20, -20);
      rect(0, 0, 40, 40);
    }

18 February 2015