System.arraycopy(p.sysex,9,newsysex,10,296-9); Patch patchtowrite = new Patch(newsysex, this);
System.arraycopy(((Patch)p).sysex,9,newsysex,10,296-9); IPatch patchtowrite = new Patch(newsysex, this);
    public void storePatch (Patch p, int bankNum,int patchNum)    {        byte [] newsysex = new byte[297]; // a dump and write format is one byte longer than an edit buffer dump        System.arraycopy(p.sysex,0,newsysex,0,7);        newsysex[7] = (byte)0x02;        newsysex[8] = (byte)(0x05+bankNum);        newsysex[9] = (byte)(patchNum);        System.arraycopy(p.sysex,9,newsysex,10,296-9); //-10);        Patch patchtowrite = new Patch(newsysex, this);        // need to convert to a "patch dump and write" format        try {Thread.sleep(100); } catch (Exception e){}        sendPatchWorker(patchtowrite );        try {Thread.sleep(100); } catch (Exception e){}        setBankNum(bankNum);        setPatchNum(patchNum);    }