Package com.pcmsolutions.device.EMU.E4.preset

Examples of com.pcmsolutions.device.EMU.E4.preset.ReadablePreset$ReadableVoice


            throw new IllegalArgumentException(this.getClass().toString() + ":initValues -> array not id/value pairs!");

        //params.clear();

        Integer id;
        GeneralParameterDescriptor pd;
        for (int n = 0; n < len; n += 2) {
            id = idValues[n];
            try {
                pd = parameterContext.getParameterDescriptor(id);
            } catch (IllegalParameterIdException e) {
View Full Code Here


            id = ids[n];
            v = (Integer) params.get(id);
            if (v == null) {
                GeneralParameterDescriptor pd = parameterContext.getParameterDescriptor(id);
                if (pd == null)
                    throw new IllegalParameterIdException();
                v = pd.getDefaultValue();
            }
            retVals[n] = v;
        }
        return retVals;
View Full Code Here

        if (len != copyVals.length)
            throw new IllegalArgumentException(this.getClass().toString() + ":setValues -> num ids,num values mismatch!");

        for (int n = 0; n < len; n++) {
            if (!parameterContext.paramExists(ids[n]))
                throw new IllegalParameterIdException();
            copyVals[n] = checkValue(ids[n], copyVals[n]);
        }

        for (int n = 0; n < len; n++)
            params.put(ids[n], copyVals[n]);
View Full Code Here

        if (len != copyVals.length)
            throw new IllegalArgumentException(this.getClass().toString() + ":offsetValues -> num ids,num offsettingValues mismatch!");

        for (int n = 0; n < len; n++) {
            if (!parameterContext.paramExists(ids[n]))
                throw new IllegalParameterIdException();

            if (constrain)
                copyVals[n] = parameterContext.getParameterDescriptor(ids[n]).constrainValue(IntPool.get(copyVals[n].intValue() + getValue(ids[n]).intValue()));
            else
                copyVals[n] = checkValue(ids[n], IntPool.get(copyVals[n].intValue() + getValue(ids[n]).intValue()));
View Full Code Here

        }
    };
*/
    protected void makeGlobalPanel() throws ZDeviceNotRunningException {
        ContextEditablePreset cp = (ContextEditablePreset) preset;
        ParameterContext ppc = preset.getDeviceParameterContext().getPresetContext();
        List cats = ppc.getCategories();
        Collections.sort(cats);
        globalPanel = new JPanel() {
            public Color getBackground() {
                return UIColors.getDefaultBG();
            }
        };
        globalPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10));
        for (int i = 0,n = cats.size(); i < n; i++) {
            List ids = ppc.getIdsForCategory((String) cats.get(i));
            ArrayList models = new ArrayList();
            for (int j = 0,k = ids.size(); j < k; j++)
                try {
                    models.add(cp.getEditableParameterModel((Integer) ids.get(j)));
                } catch (IllegalParameterIdException e) {
View Full Code Here

            params.put(ids[n], copyVals[n]);
    }

    protected Integer checkValue(Integer id, Integer value) throws ParameterValueOutOfRangeException, IllegalParameterIdException {
        if (!parameterContext.getParameterDescriptor(id).isValidValue(value))
            throw new ParameterValueOutOfRangeException();
        return value;
    }
View Full Code Here

            final Object ro = tm.getValueAt(row, 0);
            if (ro instanceof ReadablePreset.ReadableVoice) {
                ReadablePreset.ReadableVoice voice = (ReadablePreset.ReadableVoice) ro;
                Object co = tm.getValueAt(row, col + 1);
                if (co instanceof ReadableParameterModel) {
                    ReadableParameterModel pm = (ReadableParameterModel) co;
                    int id = pm.getParameterDescriptor().getId().intValue();
                    if (ParameterUtilities.isKeyWinId(id)) {
                        values = voice.getVoiceParams(ID.voiceKeyWin);
                        type = WinValueProfile.KEY_WIN;
                    } else if (ParameterUtilities.isVelWinId(id)) {
                        values = voice.getVoiceParams(ID.voiceVelWin);
                        type = WinValueProfile.VEL_WIN;
                    } else if (ParameterUtilities.isRTWinId(id)) {
                        values = voice.getVoiceParams(ID.voiceRTWin);
                        type = WinValueProfile.RT_WIN;
                    } else
                        return null;
                } else
                    return null;
            } else if (ro instanceof ReadablePreset.ReadableVoice.ReadableZone) {
                ReadablePreset.ReadableVoice.ReadableZone zone = (ReadablePreset.ReadableVoice.ReadableZone) ro;
                Object co = tm.getValueAt(row, col + 1);
                if (co instanceof ReadableParameterModel) {
                    ReadableParameterModel pm = (ReadableParameterModel) co;
                    int id = pm.getParameterDescriptor().getId().intValue();
                    if (ParameterUtilities.isKeyWinId(id)) {
                        values = zone.getZoneParams(ID.voiceKeyWin);
                        type = WinValueProfile.KEY_WIN;
                    } else if (ParameterUtilities.isVelWinId(id)) {
                        values = zone.getZoneParams(ID.voiceVelWin);
View Full Code Here

        } else if (numEmpty == 1)
            return "OK to overwrite empty sample location ?";
        else {
            String name = null;
            try {
                name = new AggRemoteName(indexes[0], sc.getSampleName(indexes[0])).toString();
                return "OK to overwrite " + name + " ?";
            } catch (NoSuchSampleException e) {
                e.printStackTrace();
            } catch (SampleEmptyException e) {
                e.printStackTrace();
View Full Code Here

                updateTitle();
        }
    };
*/
    protected void makeGlobalPanel() throws ZDeviceNotRunningException {
        ContextEditablePreset cp = (ContextEditablePreset) preset;
        ParameterContext ppc = preset.getDeviceParameterContext().getPresetContext();
        List cats = ppc.getCategories();
        Collections.sort(cats);
        globalPanel = new JPanel() {
            public Color getBackground() {
                return UIColors.getDefaultBG();
            }
        };
        globalPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10));
        for (int i = 0,n = cats.size(); i < n; i++) {
            List ids = ppc.getIdsForCategory((String) cats.get(i));
            ArrayList models = new ArrayList();
            for (int j = 0,k = ids.size(); j < k; j++)
                try {
                    models.add(cp.getEditableParameterModel((Integer) ids.get(j)));
                } catch (IllegalParameterIdException e) {
                    e.printStackTrace();
                }
            EditableParameterModel[] pms = new EditableParameterModel[models.size()];
            models.toArray(pms);
View Full Code Here

            });
        }
    }

    protected void makeLinkPanel() throws ZDeviceNotRunningException {
        ContextEditablePreset cp = (ContextEditablePreset) preset;
        RowHeaderedAndSectionedTablePanel lp;
        linkTable = new EditableLinkTable(cp);
        linkTable.setCustomAction(new AbstractAction("Hide/Show Filter Section") {
            public void actionPerformed(ActionEvent e) {
                //try {
View Full Code Here

TOP

Related Classes of com.pcmsolutions.device.EMU.E4.preset.ReadablePreset$ReadableVoice

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.