Name MidiIO
Examples
import promidi.*;

MidiIO midiIO;

void setup(){
  size(128*5,128*5);
  smooth();
  background(0);
  
  midiIO = MidiIO.getInstance(this);
  println("printPorts of midiIO");
  midiIO.printPorts();
  midiIO.openInput(0);
}

void draw(){

}

void noteOn(Note note){
  int vel = note.getVelocity();
  int pit = note.getPitch();
  
  fill(255,vel*2,pit*2,vel*2);
  stroke(255,vel);
  ellipse(vel*5,pit*5,30,30);
}

void noteOff(Note note){
  int pit = note.getPitch();
  
  fill(255,pit*2,pit*2,pit*2);
  stroke(255,pit);
  ellipse(pit*5,pit*5,30,30);
}

void controllerIn(Controller controller){
  int num = controller.getNumber();
  int val = controller.getValue();
  
  fill(255,num*2,val*2,num*2);
  stroke(255,num);
  ellipse(num*5,val*5,30,30);
}

void programChange(ProgramChange programChange){
  int num = programChange.getNumber();
  
  fill(255,num*2,num*2,num*2);
  stroke(255,num);
  ellipse(num*5,num*5,30,30);
}

Description MidiIO is the base class for managing the available midi ports. It provides you with methods to get information on your ports and to open them.
Constructors
Methods
closeInput ( )   Use this Methode to close an input. You can close it with its number or name. There is no need of closing the ports, as promidi closes them when the applet is closed.

closeInputs ( )   Use this Methode to close all opened inputs. There is no need of closing the ports, as promidi closes them when the applet is closed.

closeOutput ( )   Use this Methode to close an output. You can close it with its number or name. There is no need of closing the ports, as promidi closes them when the applet is closed.

closeOutputs ( )   Use this Methode to close all opened outputs. There is no need of closing the ports, as promidi closes them when the applet is closed.

closePorts ( )   Use this Methode to close all opened ports. There is no need of closing the ports, as promidi closes them when applet is closed.

getInputName ( )   Use this method to get the name of an input.

getInstance ( )   Use this method to get instance of MidiIO.

getNumberOfInputs ( )   Use this method to get the number of available midi inputs.

getNumberOfOutputs ( )   Use this method to get the number of available midi outputs.

getOutputName ( )   Use this method to get the name of an output.

openInput ( )   Use this Methode to open an input.

openOutput ( )   Use this Methode to open an output.

printInputs ( )   Use this method for a simple trace of all available midi inputs.

printOutputs ( )   Use this method for a simple trace of all available midi outputs.

printPorts ( )   Use this method for a simple trace of all midi ports.

Usage Web & Application
Related MidiOut
Note
Controller
ProgramChange