PatchEdit.MidiOut.writeShortMessage (getPort(),(byte)(0xB0+(getChannel()-1)),(byte)0x00,(byte)(0x00)); PatchEdit.MidiOut.writeShortMessage (getPort(),(byte)(0xB0+(getChannel()-1)),(byte)0x20,(byte)(0x00+bankNum));
send(0xB0+(getChannel()-1), 0x00, 0x00); send(0xB0+(getChannel()-1), 0x20, 0x00+bankNum);
  public void setBankNum(int bankNum)  {    try      {	byte[] programMode = {(byte)0x4E, (byte)0x02, (byte)0x00, (byte)0xF7};	PatchEdit.MidiOut.writeShortMessage(getPort(),(byte)0xF0,(byte)0x42);	PatchEdit.MidiOut.writeShortMessage(getPort(),(byte)(0x30+(getChannel()-1)),(byte)0x35);	PatchEdit.MidiOut.writeLongMessage(getPort(), programMode);		// change bank	try {Thread.sleep(100); } catch (Exception e){} 	PatchEdit.MidiOut.writeShortMessage (getPort(),(byte)(0xB0+(getChannel()-1)),(byte)0x00,(byte)(0x00)); //MSB	PatchEdit.MidiOut.writeShortMessage (getPort(),(byte)(0xB0+(getChannel()-1)),(byte)0x20,(byte)(0x00+bankNum)); //LSB	try {Thread.sleep(100); } catch (Exception e){}       } catch (Exception e) {};  }