Package com.pcmsolutions.device.EMU.E4

Examples of com.pcmsolutions.device.EMU.E4.PathFactory


            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

            }
        };
    }

    protected void makeVoicePanel(java.util.List expansionMemory) throws ZDeviceNotRunningException {
        ContextEditablePreset cp = (ContextEditablePreset) preset;
        RowHeaderedAndSectionedTablePanel vp;
        voiceOverviewTable = new EditableVoiceOverviewTable(cp);
        if (expansionMemory != null)
            ((VoiceOverviewTableModel) voiceOverviewTable.getModel()).setExpansionMemory(expansionMemory);
View Full Code Here

                }
                final int f_i = i;
                final String name = (stripIndex ? ZUtilities.removeFirstPattern(ZUtilities.stripExtension(files[f_i].getName()), AudioUtilities.sampleIndexPattern) :
                        ZUtilities.stripExtension(files[f_i].getName()));
                try {
                    sc.newSample(new IsolatedSample() {
                        public String getName() {
                            return name;
                        }

                        public Integer getOriginalIndex() {
View Full Code Here

            }
        };
        JMenuItem pmi = null;
        try {
            ArrayList selPresets = new ArrayList();
            PresetContext dpc = device.getDefaultPresetContext();
            MultiModeContext mmc = device.getMultiModeContext();
            for (int i = 0; i < selRows.length; i++) {
                Integer preset = mmc.getPreset(IntPool.get(selRows[i] + 1));        // +1 because midi channels indexed from 1
                if (preset.intValue() >= 0)
                    selPresets.add(dpc.getReadablePreset(preset));
            }
            if (selPresets.size() > 0) {

                Object[] sp = ZUtilities.eliminateDuplicates(selPresets.toArray());
                String name = (sp.length > 1 ? "Presets on selected channels" : ((ReadablePreset) sp[0]).getPresetDisplayName());
View Full Code Here

        generatePanels();

        if (voice.getPreset().getIcon() instanceof PresetIcon)
            icon = new VoiceEditingIcon((PresetIcon) voice.getPreset().getIcon());

        pla = new PresetListenerAdapter() {
            public void presetNameChanged(PresetNameChangeEvent ev) {
            }

            public void presetRefreshed(PresetRefreshEvent ev) {
                revalidate();
View Full Code Here

    protected Icon icon = null;
    protected String title;

    public void init(ReadablePreset.ReadableVoice voice) {
        this.voice = voice;
        pla = new PresetListenerAdapter() {
            public void presetNameChanged(PresetNameChangeEvent ev) {
                updateTitle();
            }

            public void presetRefreshed(PresetRefreshEvent ev) {
View Full Code Here

    }

    public boolean editCellAt(int row, int column, EventObject e) {
        if (e instanceof MouseEvent && ((MouseEvent) e).getClickCount() >= 2) {
            if (getValueAt(row, column) instanceof ReadablePreset) {
                final ReadablePreset p = (ReadablePreset) getValueAt(row, column);
                new ZDBModifyThread("Preset Default Action") {
                    public void run() {
                        p.performDefaultAction();
                    }
                }.start();
            }
        }
        return false;
View Full Code Here

TOP

Related Classes of com.pcmsolutions.device.EMU.E4.PathFactory

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.