PatchEdit.MidiOut.writeLongMessage(getPort(),patchtowrite.sysex);
send(patchtowrite.sysex);
    public void storePatch (Patch p, int bankNum,int patchNum)    {        byte [] newsysex = new byte[264];        System.arraycopy(p.sysex,0,newsysex,0,264);        newsysex[4] = (byte)(0x70 + getChannel() -1); // must do it ourselve since sendPatchWorker didn't support                                                 // adding midi channel info in half a byte        newsysex[5] = (byte)(0x20); // 20 is to send data to the Casio        newsysex[6] = (byte)(0x20+patchNum); //0x20 is the offset to internal memory location        Patch patchtowrite = new Patch(newsysex, this);        // need to convert to a "patch dump and write" format        try {Thread.sleep(100); } catch (Exception e){}        try {                   PatchEdit.MidiOut.writeLongMessage(getPort(),patchtowrite.sysex);        }catch (Exception e) {ErrorMsg.reportStatus(e);}        try {Thread.sleep(100); } catch (Exception e){}        setBankNum(bankNum);        setPatchNum(patchNum);    }