Patch p = (Patch)ip;
byte[] sysex = ip.getByteArray();
  public IPatch[] extractPatch (IPatch ip) {    Patch p = (Patch)ip;    byte[] ps; // source    byte[] pd; // destination        ps = new byte[188+KorgX3SingleDriver.EXTRA_HEADER]; // patch with 7-bit bytes    pd = new byte[164+KorgX3SingleDriver.EXTRA_HEADER]; // patch as normal bytearray        System.arraycopy(p.sysex, 0, ps, 0, 188+KorgX3SingleDriver.EXTRA_HEADER);     System.arraycopy(p.sysex, 0, pd, 0, KorgX3SingleDriver.EXTRA_HEADER);    int j = KorgX3SingleDriver.EXTRA_HEADER;    byte b7=0; // bit 7    for(int i = 0; i < 188; i++) {      if(i%8==0) {	b7 = ps[i+KorgX3SingleDriver.EXTRA_HEADER];      } else {	// actually this is done: byte b8 = (byte)(getBit( b7, (byte)( ((i%8)-1) ) ) << 7);	byte b8 = (byte)(((b7 & ( (byte)0x01 << ( ((i%8)-1) )   )) >> ( ((i%8)-1) )) << 7);	pd[j] = (byte)((byte)ps[i+KorgX3SingleDriver.EXTRA_HEADER] + (byte)b8); 	j++;      }    }    Patch[] pf = new Patch[1];    pf[0] = new Patch(pd);    return pf;  }