Package com.pcmsolutions.system

Examples of com.pcmsolutions.system.CommandFailedException


                        Thread.yield();
                    }

            }
        } catch (NoSuchPresetException e) {
            throw new CommandFailedException("Preset Not Found.");
        } catch (NoSuchVoiceException e) {
            throw new CommandFailedException("No such voice ");
        } catch (PresetEmptyException e) {
            throw new CommandFailedException("Preset Empty");
        } catch (CannotRemoveLastVoiceException e) {
            throw new CommandFailedException("Cannot remove last voice");
        } catch (NoSuchContextException e) {
            throw new CommandFailedException("No such context");
        }
    }
View Full Code Here


                            presets[i].setPresetName(base++ + presets[i].getPresetName());
                        } catch (NoSuchPresetException e) {
                        } catch (PresetEmptyException e) {
                        }
                } catch (NumberFormatException e) {
                    throw new CommandFailedException("Not a valid number");
                }

                break;
            case 3: // numerical postfix
                try {
                    int base = Integer.parseInt(s);
                    len = s.length();
                    for (int i = 0; i < presets.length; i++)
                        try {
                            presets[i].setPresetName(ZUtilities.postfixString(presets[i].getPresetName(), String.valueOf(base++), DeviceContext.MAX_NAME_LENGTH));
                        } catch (NoSuchPresetException e) {
                        } catch (PresetEmptyException e) {
                        }
                } catch (NumberFormatException e) {
                    throw new CommandFailedException("Not a valid number");
                }
                break;
            case 4: // to upper
                for (int i = 0; i < presets.length; i++)
                    try {
View Full Code Here

        int zc = 0;
        for (int i = 0; i < presets.length; i++)
            try {
                zc += PresetContextMacros.presetZoneCount(presets[i].getPresetContext(), presets[i].getPresetNumber());
            } catch (Exception e) {
                throw new CommandFailedException(e.getMessage());
            }

        if (zc != 0) {
            int res = UserMessaging.askOptions("Original key matching", "Apply Matching to", new String[]{"Voices", "Zones", "Voices and Zones"});
            if (res == JOptionPane.CLOSED_OPTION)
View Full Code Here

        Integer lowSample = ((AggRemoteName) arguments[0]).getIndex();
        Integer highSample = ((AggRemoteName) arguments[1]).getIndex();

        if (lowSample.intValue() > highSample.intValue())
            throw new CommandFailedException("Invalid Range");

        ContextReadableSample targ = getTarget();
        int num = highSample.intValue() - lowSample.intValue() + 1;
        Integer[] destIndexes = ZUtilities.fillIncrementally(new Integer[num], lowSample.intValue());
        Integer[] srcIndexes = new Integer[destIndexes.length];
        Arrays.fill(srcIndexes, targ.getSampleNumber());
        try {
            SampleContextMacros.copySamples(targ.getSampleContext(), srcIndexes, destIndexes, false, true, "Sample Copy to Range");
        } catch (NoSuchSampleException e) {
            throw new CommandFailedException("No sample: " + e.getAggName());
        } catch (com.pcmsolutions.device.EMU.E4.preset.NoSuchContextException e) {
            throw new CommandFailedException("No sample context");
        } catch (IsolatedSampleUnavailableException e) {
            throw new CommandFailedException("Could not copy samples: " + e.getMessage());
        }
    }
View Full Code Here

    {
        EditableParameterModel[] params = getTargets();
        int num = params.length;

        if (num < 2)
            throw new CommandFailedException("Need at least 2 targets for a linear fade");

        final double[] percents = new double[num];

        if (cmdMode == 4 || cmdMode == 5) {
            try {
                int maxFirst = params[0].getParameterDescriptor().getMaxValue().intValue();
                int minFirst = params[0].getParameterDescriptor().getMinValue().intValue();
                int firstVal = params[0].getValue().intValue();

                int maxLast = params[num - 1].getParameterDescriptor().getMaxValue().intValue();
                int minLast = params[num - 1].getParameterDescriptor().getMinValue().intValue();
                int lastVal = params[num - 1].getValue().intValue();

                startPercent = (double) (firstVal - minFirst) / (double) (maxFirst - minFirst) * 100.0;
                endPercent = (double) (lastVal - minLast) / (double) (maxLast - minLast) * 100.0;

            } catch (ParameterUnavailableException e) {
                throw new CommandFailedException("Parameter Unavailable");
            }
        }

        if (inclusive) {
            for (int i = 0; i < num; i++)
View Full Code Here

                    }
                    Thread.yield();
                }
            }
        } catch (NoSuchPresetException e) {
            throw new CommandFailedException("Preset Not Found");
        } catch (PresetEmptyException e) {
            throw new CommandFailedException("Preset Empty");
        } catch (NoSuchVoiceException e) {
            throw new CommandFailedException("No such voice");
        } catch (TooManyVoicesException e) {
            throw new CommandFailedException("Too many voices");
        }
    }
View Full Code Here

                            samples[i].setSampleName(base++ + samples[i].getSampleName());
                        } catch (NoSuchSampleException e) {
                        } catch (SampleEmptyException e) {
                        }
                } catch (NumberFormatException e) {
                    throw new CommandFailedException("Not a valid number");
                }

                break;
            case 3: // numerical postfix
                try {
                    int base = Integer.parseInt(s);
                    len = s.length();
                    for (int i = 0; i < samples.length; i++)
                        try {
                            samples[i].setSampleName(ZUtilities.postfixString(samples[i].getSampleName(), String.valueOf(base++), DeviceContext.MAX_NAME_LENGTH));
                        } catch (NoSuchSampleException e) {
                        } catch (com.pcmsolutions.device.EMU.E4.sample.SampleEmptyException e) {
                        }
                } catch (NumberFormatException e) {
                    throw new CommandFailedException("Not a valid number");
                }
                break;
            case 4// to upper
                for (int i = 0; i < samples.length; i++)
                    try {
View Full Code Here

        for (int i = 0; i < presets.length; i++) {
            try {
                int nv = presets[i].numVoices();
                PresetContextMacros.autoMapVoiceKeyWin(presets[i].getPresetContext(), presets[i].getPresetNumber(), ZUtilities.fillIncrementally(new Integer[nv], 0));
            } catch (NoSuchPresetException e) {
                throw new CommandFailedException(e.getMessage());
            } catch (PresetEmptyException e) {
            } catch (NoSuchContextException e) {
                throw new CommandFailedException(e.getMessage());
            }
        }
    }
View Full Code Here

                    }
                    Thread.yield();
                }
            }
        } catch (NoSuchPresetException e) {
            throw new CommandFailedException("Preset Not Found");
        } catch (PresetEmptyException e) {
            throw new CommandFailedException("Preset Empty");
        } catch (TooManyVoicesException e) {
            throw new CommandFailedException("Too Many Voices");
        }
    }
View Full Code Here

        int notCopied = 0;
        try {
            notCopied = PresetContextMacros.copyPresetDeep(indexes, presets[0].getPresetContext(), ((AggRemoteName) arguments[0]).getIndex(), ((Boolean) arguments[1]).booleanValue(), ((Boolean) arguments[2]).booleanValue(), ((Boolean) arguments[3]).booleanValue(), true);
            return;
        } catch (NoSuchPresetException e) {
            throw new CommandFailedException("No such preset");
        } catch (NoSuchContextException e) {
            throw new CommandFailedException("Missing preset context");
        }
    }
View Full Code Here

TOP

Related Classes of com.pcmsolutions.system.CommandFailedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.