Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import de.humatic.mmj.*;
import rwmidi.*;
import microkontrol.controls.*;
import microkontrol.*;

MidiInput input; "microKONTROL - Port 2 KORG INC.";
MidiOutput output; "microKONTROL - Port 2 KORG INC.";

void setup() {MicroKontrolHardware.input_device_a = "microKONTROL - Port 2 KORG INC.";
MicroKontrolHardware.input_device_b = "microKONTROL - Port 3 KORG INC.";
MicroKontrolHardware.output_device = "microKONTROL - Port 2 KORG INC.";

  size(800, 600);
  frameRate(30);
  background(0);
  println(RWMidi.getInputDevices());
  println(RWMidi.getOutputDevices());
  output = RWMidi.getOutputDevice("IAC Bus 3 <MOut:2> Apple Computer, Inc.").createOutput();
  input = RWMidi.getInputDevice("IAC Bus 3 <MIn:2> Apple Computer, Inc.").createInput(this);
}

void draw(){
}  
void keyPressed(){
   output.sendController(int(key)-48, 0, 0);
}

void sysexReceived(SysexMessage message){
  byte[] m = message.getMessage();
  println(message);
}