PatchEdit.MidiOut.writeShortMessage(getPort(),(byte)0xF0,(byte)0x42); PatchEdit.MidiOut.writeShortMessage(getPort(),(byte)(0x30+(getChannel()-1)),(byte)0x35); PatchEdit.MidiOut.writeLongMessage(getPort(), programWriteRequest);
send(0xF0, 0x42); send(0x30+(getChannel()-1), 0x35); send(programWriteRequest);
  public void storePatch (Patch p, int bankNum,int patchNum)  {       setBankNum(bankNum);    setPatchNum(patchNum);    try {Thread.sleep(100); } catch (Exception e){}    sendPatchWorker(p);    try {Thread.sleep(100); } catch (Exception e){}       byte[] programWriteRequest = {(byte)0x11, (byte)bankNum, (byte)patchNum, (byte)0xF7};    try {      PatchEdit.MidiOut.writeShortMessage(getPort(),(byte)0xF0,(byte)0x42);      PatchEdit.MidiOut.writeShortMessage(getPort(),(byte)(0x30+(getChannel()-1)),(byte)0x35);      PatchEdit.MidiOut.writeLongMessage(getPort(), programWriteRequest);                         } catch (Exception e) {      ErrorMsg.reportError("Error", "Error with patch storing",e);    };  }