Patch p = (Patch)ip;
public void calculateChecksum(Patch p)  {    calculateChecksum(p,checksumStart,90+p.sysex[60]*86,checksumOffset);    int sourceDataStart=91;    int numWaveData=0;    for (int i=0;i<p.sysex[60];i++)     {      if (((p.sysex[sourceDataStart+28]&7)*128+p.sysex[sourceDataStart+29])==512) numWaveData++;      sourceDataStart+=86;     }   int waveDataStart=91+p.sysex[60]*86;   for (int i=0; i<numWaveData;i++)    {      calculateChecksum(p,waveDataStart+1,waveDataStart+805,waveDataStart);      waveDataStart+=806;    }  }