sum += p.sysex[i]; p.sysex[ofs] =  (byte) (sum & 0x7F);
sum += d[i]; d[ofs] =  (byte) (sum & 0x7F);
    protected static void calculateChecksum(Patch p, int start, int end, int ofs)  {                int sum = 0;                for (int i = start; i <= end; i++)            sum += p.sysex[i];                p.sysex[ofs] =  (byte) (sum & 0x7F);     }