to get a bit closer into the topic here is the current code. i´m a newbee in processing and the code is maybe really rude for you...sorry... I tried to create a array for saving the receiving midi value. i think the buttons are also not the best solution at the moment, but this could be correct later.
Code:import themidibus.*;
import controlP5.*;
PFont myFont;
MidiBus Software_Input;
MidiBus Controller_Input;
MidiBus Linked;
ControlP5 controlP5;
boolean Software;
boolean Controller;
int [] channelA;
int [] channelB;
void setup() {
size(300, 200);
background(50);
stroke (150);
line (0, 30, 300, 30);
channelA = new int [8];
channelB = new int [8];
//MIDI
MidiBus.list(); // List all available Midi devices
Software_Input = new MidiBus(this, 0, 0); // Create a new MidiBus using the device index
//myBus = new MidiBus(this, "IncomingDeviceName", "OutgoingDeviceName"); // Create a new MidiBus using the device names
Controller_Input = new MidiBus(this, 2, 0); // Create a new MidiBus using the device index
//FONT
// Uncomment the following two lines to see the available fonts
// String[] fontList = PFont.list();
// println(fontList);
myFont = createFont("TradeGothicLTCom-BdCn20", 12);
textFont(myFont);
fill (240);
text("MIDI MAPPING Mock-Up", 50, 20);
//Buttons
controlP5 = new ControlP5(this);
controlP5.addToggle("Software", false, 60, 50, 20, 20);
controlP5.addToggle("Controller", false, 60, 100, 20, 20);
controlP5.addToggle("Linked", false, 60, 150, 20, 20);
}
void draw() {
for (int i = 0; i< channelA.length; i++) {
}
}
void noteOn(int channel, int pitch, int velocity) {
// Receive a noteOn
println();
println("Note On:");
println("--------");
println("Channel:"+channel);
println("Pitch:"+pitch);
println("Velocity:"+velocity);
}
void noteOff(int channel, int pitch, int velocity) {
// Receive a noteOff
println();
println("Note Off:");
println("--------");
println("Channel:"+channel);
println("Pitch:"+pitch);
println("Velocity:"+velocity);
}
void controllerChange(int channel, int number, int value) {
// Receive a controllerChange
println();
println("Controller Change:");
println("--------");
println("Channel:"+channel);
println("Number:"+number);
println("Value:"+value);
}
thnx again...