Sketch 1
import rwmidi.*;
MidiInput input;
MidiOutput output;
void setup() {
input = RWMidi.getInputDevices()[0].createInput(this);
output = RWMidi.getOutputDevices()[0].createOutput();
}
void noteOnReceived(Note note) {
println("note on " + note.getPitch());
}
void sysexReceived(rwmidi.SysexMessage msg) {
println("sysex " + msg);
}
void mousePressed() {
int ret = output.sendNoteOn(0, 3, 3);
ret = output.sendSysex(new byte[] {(byte)0xF0, 1, 2, 3, 4, (byte)0xF7});
}
void draw() {
}
