patch = (drv.createPatch(dsysex))[0];
patch = (drv.createPatch(dsysex));
    void generateNewPatch(PatchBasket library) {        lib = library.getPatchCollection();        libSize = lib.size();        // Choose the base patch.        // XXX Users may want to specify the base patch.        IPatch base = getRandomPatch();         ErrorMsg.reportStatus("base : " + base);        int sysexSize = base.getSize();        ErrorMsg.reportStatus("length : " + sysexSize);        IDriver drv = (IDriver) base.getDriver();        byte[] dsysex = new byte[sysexSize];        dsysex[0] = (byte) SysexMessage.SYSTEM_EXCLUSIVE;        for (int i = 1; i < sysexSize - 1; i++) {            IPatch source;            byte[] ssysex;            // look for a patch with the same Driver and enough length            do {                source = getRandomPatch();                ssysex = source.getByteArray();            } while (source.getDriver() != drv || ssysex.length - 1 < i);            dsysex[i] = ssysex[i];        }        dsysex[dsysex.length - 1] = (byte) ShortMessage.END_OF_EXCLUSIVE; // EOX        patch = (drv.createPatch(dsysex))[0];        ErrorMsg.reportStatus("done : " + patch);    }