https://github.com/sojamo/midimapper
A processing library to assign midi events to members of a sketch.
https://github.com/sojamo/midimapper
java midi midi-device processing processing-library
Last synced: about 1 month ago
JSON representation
A processing library to assign midi events to members of a sketch.
- Host: GitHub
- URL: https://github.com/sojamo/midimapper
- Owner: sojamo
- Created: 2015-02-16T12:49:06.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-14T04:54:15.000Z (about 9 years ago)
- Last Synced: 2023-03-23T01:46:42.524Z (about 2 years ago)
- Topics: java, midi, midi-device, processing, processing-library
- Language: Java
- Homepage:
- Size: 30.3 KB
- Stars: 13
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
Awesome Lists containing this project
README
# 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.```java
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_