Package com.pcmsolutions.device.EMU.E4.gui.table

Examples of com.pcmsolutions.device.EMU.E4.gui.table.RowHeaderedAndSectionedTablePanel


            GeneralParameterDescriptor preset_pd = mmd.getPresetParameterDescriptor();
            GeneralParameterDescriptor vol_pd = mmd.getVolumeParameterDescriptor();
            GeneralParameterDescriptor pan_pd = mmd.getPanParameterDescriptor();
            GeneralParameterDescriptor submix_pd = mmd.getSubmixParameterDescriptor();

            MultiModeMap m = mmc.getMultimodeMap();

            for (int i = 0, n = selCols.length; i < n; i++) {
                if (selCols[i] == 0) {
                    try {
                        values[0] = m.getPreset(channel);
                        valueStrings[0] = preset_pd.getStringForValue(values[0]);
                    } catch (IllegalMidiChannelException e) {
                        e.printStackTrace();
                    } catch (ParameterValueOutOfRangeException e) {
                        e.printStackTrace();
                    }
                }

                if (selCols[i] == 1) {
                    try {
                        values[1] = m.getVolume(channel);
                        valueStrings[1] = vol_pd.getStringForValue(values[1]);
                    } catch (IllegalMidiChannelException e) {
                        e.printStackTrace();
                    } catch (ParameterValueOutOfRangeException e) {
                        e.printStackTrace();
                    }
                }
                if (selCols[i] == 2) {
                    try {
                        values[2] = m.getPan(channel);
                        valueStrings[2] = pan_pd.getStringForValue(values[2]);
                    } catch (IllegalMidiChannelException e) {
                        e.printStackTrace();
                    } catch (ParameterValueOutOfRangeException e) {
                        e.printStackTrace();
                    }
                }
                if (selCols[i] == 3) {
                    try {
                        values[3] = m.getSubmix(channel);
                        valueStrings[3] = submix_pd.getStringForValue(values[3]);
                    } catch (IllegalMidiChannelException e) {
                        e.printStackTrace();
                    } catch (ParameterValueOutOfRangeException e) {
                        e.printStackTrace();
View Full Code Here


        dropOverExtent = -1;
    }

    public void setSelection(VoiceParameterSelection sel) {
        try {
            DeviceParameterContext dpc = voices[0].getPreset().getDeviceParameterContext();
            Integer[] ids = sel.getIds();
            Integer[] vals = sel.getVals();
            int thisCat = VoiceParameterSelection.voiceCategoryStringToEnum(category);
            int selCat = sel.getCategory();
            if (thisCat != selCat) {
                for (int i = 0,j = ids.length; i < j; i++) {
                    // need convert ids first
                    ids[i] = ParameterUtilities.convertVoiceEnvelopeId(thisCat, selCat, ids[i]);
                    vals[i] = dpc.getParameterDescriptor(ids[i]).constrainValue(vals[i]);
                }
            }

            try {
                PresetContextMacros.setContextVoicesParam(voices, ids, vals);
View Full Code Here

        this.ids = new Integer[ids.length];
        this.vals = new Integer[ids.length];
        //this.valStrings = new String[ids.length];
        this.category = category;
        MasterContext mc = dev.getMasterContext();
        DeviceParameterContext dpc = dev.getDeviceParameterContext();
        this.ids = (Integer[]) ids.clone();
        vals = mc.getMasterParams(ids);

        /*for (int i = 0, n = ids.length; i < n; i++) {
            try {
View Full Code Here

    public boolean isCellEditable(int rowIndex, int columnIndex) {
        if (columnIndex == 1 && rowIndex >= 0 && rowIndex < tableRowObjects.size()) {
            Object o = getValueAt(rowIndex, columnIndex);
            if (o instanceof EditableParameterModel) {
                EditableParameterModel epm = (EditableParameterModel) o;
                if (epm.getParameterDescriptor() instanceof FilterParameterDescriptor && !((FilterParameterDescriptor) epm.getParameterDescriptor()).isCurrentlyActive())
                    return false;
            }
            return true;
        }
        return false;
View Full Code Here

        private final String[] valueStrings = new String[4];

        public Impl_MultiModeChannelSelection(MultiModeContext mmc, int[] selCols, int row) {
            channel = IntPool.get(row + 1);
            MultiModeDescriptor mmd = mmc.getMultiModeDescriptor();
            GeneralParameterDescriptor preset_pd = mmd.getPresetParameterDescriptor();
            GeneralParameterDescriptor vol_pd = mmd.getVolumeParameterDescriptor();
            GeneralParameterDescriptor pan_pd = mmd.getPanParameterDescriptor();
            GeneralParameterDescriptor submix_pd = mmd.getSubmixParameterDescriptor();

            MultiModeMap m = mmc.getMultimodeMap();

            for (int i = 0, n = selCols.length; i < n; i++) {
                if (selCols[i] == 0) {
                    try {
                        values[0] = m.getPreset(channel);
                        valueStrings[0] = preset_pd.getStringForValue(values[0]);
                    } catch (IllegalMidiChannelException e) {
                        e.printStackTrace();
                    } catch (ParameterValueOutOfRangeException e) {
                        e.printStackTrace();
                    }
                }

                if (selCols[i] == 1) {
                    try {
                        values[1] = m.getVolume(channel);
                        valueStrings[1] = vol_pd.getStringForValue(values[1]);
                    } catch (IllegalMidiChannelException e) {
                        e.printStackTrace();
                    } catch (ParameterValueOutOfRangeException e) {
                        e.printStackTrace();
                    }
                }
                if (selCols[i] == 2) {
                    try {
                        values[2] = m.getPan(channel);
                        valueStrings[2] = pan_pd.getStringForValue(values[2]);
                    } catch (IllegalMidiChannelException e) {
                        e.printStackTrace();
                    } catch (ParameterValueOutOfRangeException e) {
                        e.printStackTrace();
                    }
                }
                if (selCols[i] == 3) {
                    try {
                        values[3] = m.getSubmix(channel);
                        valueStrings[3] = submix_pd.getStringForValue(values[3]);
                    } catch (IllegalMidiChannelException e) {
                        e.printStackTrace();
                    } catch (ParameterValueOutOfRangeException e) {
                        e.printStackTrace();
                    }
View Full Code Here

        Integer id;
        for (int n = 0; n < len; n++) {
            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

    protected void translateToParameterContext(ParameterContext pc) {
        this.parameterContext = pc;
        Map oldParams = (Map) params.clone();
        params.clear();
        Integer key;
        GeneralParameterDescriptor pd;
        Map newIds = pc.getIdsAndDefaultsAsMap();     // id(Integer) -> default value(Integer)
        for (Iterator i = newIds.keySet().iterator(); i.hasNext();) {
            key = (Integer) i.next();
            if (oldParams.containsKey(key)) {
                try {
View Full Code Here

            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

TOP

Related Classes of com.pcmsolutions.device.EMU.E4.gui.table.RowHeaderedAndSectionedTablePanel

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.