Package com.pcmsolutions.system

Examples of com.pcmsolutions.system.CommandFailedException


    {
        if (custom) {
            try {
                unitStep = Double.parseDouble(arguments[0].toString());
            } catch (NumberFormatException e) {
                throw new CommandFailedException("Not a valid number");
            }
        }

        EditableParameterModel[] params = getTargets();
        int num = params.length;
        if (num == 0)
            throw new CommandFailedException("Need at least 2 targets");

        int maxv = params[0].getParameterDescriptor().getMaxValue().intValue();
        int minv = params[0].getParameterDescriptor().getMinValue().intValue();
        int currv;
        try {
            currv = params[0].getValue().intValue();
            double rng = maxv - minv;
            if (rng == 0.0)
                percentFact = 1.0;
            else
                percentFact = ((currv - minv) / rng);
        } catch (ParameterUnavailableException e) {
            throw new CommandFailedException("First Parameter not available");
        }


        currStep = 0;
        ParameterModelUtilities.dispatchEditChainGroups(ParameterModelUtilities.extractEditableParameterModelChainGroups(params), new EditableParameterModel.EditChainValueProvider() {
View Full Code Here


                editVoices(new ContextEditablePreset.EditableVoice[]{v});
            } else {
                editVoices(voices);
            }
        } catch (IllegalParameterIdException e) {
            throw new CommandFailedException("Problem setting up view");
        } catch (ComponentGenerationException e) {
            throw new CommandFailedException(e.getMessage());
        }
    }
View Full Code Here

    {
        ContextEditablePreset.EditableVoice[] voices = getTargets();
        try {
            PresetContextMacros.autoMapVoiceKeyWin(voices);
        } catch (NoSuchPresetException e) {
            throw new CommandFailedException("Preset Not Found");
        } catch (PresetEmptyException e) {
            throw new CommandFailedException("Preset Empty");
        }
    }
View Full Code Here

        Integer[] srcIndexes = ZUtilities.extractIndexes(presets);
        Integer[] destIndexes = ZUtilities.fillIncrementally(new Integer[presets.length], destIndex);
        try {
            PresetContextMacros.copyPresets(presets[0].getPresetContext(), srcIndexes, destIndexes, false, true, "Preset Block Copy");
        } catch (NoSuchPresetException e) {
            throw new CommandFailedException("No preset: " + e.getAggName());
        } catch (NoSuchContextException e) {
            throw new CommandFailedException("No preset context");
        }
    }
View Full Code Here

                    }
                    Thread.yield();
                }
            }
        } catch (NoSuchPresetException e) {
            throw new CommandFailedException("Preset Not Found.");
        }
    }
View Full Code Here

        }
    }

    private void assertPreset(ReadablePreset p) throws CommandFailedException, NoSuchPresetException {
        if (p == null)
            throw new CommandFailedException("Null Target");
        if ( !p.isPresetInitialized())
            throw new CommandFailedException(p.getPresetDisplayName() + " is not initialized");
        p.assertPresetRemote();
    }
View Full Code Here

        try {
            if (num == 0) {
                // try use primary target
                p = getTarget();
                if (p == null)
                    throw new CommandFailedException("Null Target");
                minValue(p);
            }
            for (int n = 0; n < num; n++) {
                minValue(params[n]);
                Thread.yield();
            }
        } catch (ParameterValueOutOfRangeException e) {
            throw new CommandFailedException("Parameter Value Out Of Range");
        } catch (ParameterUnavailableException e) {
            throw new CommandFailedException("Parameter unavailable");
        }
    }
View Full Code Here

        }
    }

    private void minValue(EditableParameterModel p) throws ParameterValueOutOfRangeException, ParameterUnavailableException, CommandFailedException {
        if (p == null)
            throw new CommandFailedException("Null Target");
        p.setValue(p.getParameterDescriptor().getMinValue());
    }
View Full Code Here

    {
        Integer offset;
        try {
            offset = IntPool.get(Integer.parseInt(arguments[0].toString()));
        } catch (NumberFormatException e) {
            throw new CommandFailedException("not a valid offset");
        }

        ContextEditablePreset[] presets = getTargets();
        int num = presets.length;
        ContextEditablePreset p;
        try {
            for (int n = 0; n < num; n++) {
                offsetLinks(presets[n], offset);
                Thread.yield();
            }
        } catch (NoSuchPresetException e) {
            throw new CommandFailedException("Preset Not Found.");
        }
    }
View Full Code Here

            } else {
                for ( int i=0;i<voices.length;i++)
                voices[i].trySetOriginalKeyFromSampleName();
            }
        } 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");
        }
    }
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.