}
return false;
}
public static boolean autoMapVoiceKeyWin(final PresetContext pc, final Integer preset, Integer[] voices) throws PresetEmptyException, NoSuchPresetException, NoSuchContextException {
RangePartitioner rp = new RangePartitioner(0, 127);
voices = (Integer[]) voices.clone();
try {
for (int i = 0; i < voices.length; i++) {
int nz = pc.numZones(preset, voices[i]);
if (nz > 0)
for (int z = 0; z < nz; z++)
rp.addPoint(pc.getZoneParams(preset, voices[i], IntPool.get(z), new Integer[]{ID.origKey})[0].intValue());
else
rp.addPoint(pc.getVoiceParams(preset, voices[i], new Integer[]{ID.origKey})[0].intValue());
}
RangePartitioner.Point[] points = rp.getPoints();
int rpi = 0;
for (int i = 0; i < voices.length; i++) {
pc.setVoicesParam(preset, new Integer[]{voices[i]}, ID.keyLow, new Integer[]{IntPool.get(0)});
pc.setVoicesParam(preset, new Integer[]{voices[i]}, ID.keyHigh, new Integer[]{IntPool.get(127)});
int nz = pc.numZones(preset, voices[i]);