PatchEdit.MidiOut.writeShortMessage (port, (byte) (0xB0 + ((channel - 1) & 0xf)), (byte) 0x00, (byte) (bankNum / 128)); PatchEdit.MidiOut.writeShortMessage (port, (byte) (0xB0 + ((channel - 1) & 0xf)), (byte) 0x20, (byte) (bankNum % 128));
ShortMessage msg = new ShortMessage(); msg.setMessage(ShortMessage.CONTROL_CHANGE, channel - 1, 0x00, bankNum / 128); PatchEdit.MidiOut.send(port, msg); msg.setMessage(ShortMessage.CONTROL_CHANGE, channel - 1, 0x20, bankNum % 128); PatchEdit.MidiOut.send(port, msg);
    protected void setBankNum(int bankNum) {        try {	    PatchEdit.MidiOut.writeShortMessage		(port,		 (byte) (0xB0 + ((channel - 1) & 0xf)),	// Control Change		 (byte) 0x00,	// Bank Select		 (byte) (bankNum / 128)); // Bank Number (MSB)	    PatchEdit.MidiOut.writeShortMessage		(port,		 (byte) (0xB0 + ((channel - 1) & 0xf)),	// Control Change		 (byte) 0x20,	// Bank Select (LSB)		 (byte) (bankNum % 128)); // Bank Number (LSB)	} catch (Exception e) {	}    }