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

Examples of com.pcmsolutions.device.EMU.E4.preset.IsolatedSample


            }
        };
    }

    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

                    final int j = destRowObjects.length;
                    for (int i = j - 1; i >= 0; i--) {
                        final int f_i = i;
                        final Object sobj = destRowObjects[i];
                        if (sobj instanceof ContextEditableSample) {
                            IsolatedSample is = null;
                            try {
                                if (i == 0)
                                    is = ips.getIsolatedSample(i);
                                else
                                    is = ips.getIsolatedSample(i);
                                is.doAssert();
                            } catch (IsolatedSampleUnavailableException e) {
                                e.printStackTrace();
                            } finally {
                                z.updateProgressElement(progressOwner);
                                if (is == null) {
                                    z.updateProgressElement(progressOwner);
                                    if (i >= j - 1)
                                        z.endProgressElement(progressOwner);
                                    errors++;
                                    continue;
                                }
                            }
                            final IsolatedSample f_is = is;
                            // new ZDBModifyThread("D&D: New Samples from IsolatedSamples") {
                            //   public void run() {
                            // TODO!! should use a signal here to achieve correct ordering of threads
                            try {
                                z.setProgressElementIndeterminate(progressOwner, true);
                                z.updateProgressElementTitle(progressOwner, "Copying " + f_is.getName() + " to " + ((ContextEditableSample) sobj).getSampleDisplayName());
                                ((ContextEditableSample) sobj).newSample(f_is, f_is.getName());
                                f_is.zDispose();
                            } catch (NoSuchSampleException e) {
                                JOptionPane.showMessageDialog(ZoeosFrame.getInstance(), e.getMessage(), "Problem", JOptionPane.ERROR_MESSAGE);
                                errors++;
                                continue;
                            } catch (IsolatedSampleUnavailableException e) {
View Full Code Here

            ss.setUseTempNames(false);
            ArrayList fl = new ArrayList();
            try {
                for (int i = 0, j = ss.getSampleCount(); i < j; i++) {
                    try {
                        IsolatedSample is;
                        is = ss.getIsolatedSample(i);
                        is.doAssert();
                        fl.add(is.getLocalFile());
                    } catch (IsolatedSampleUnavailableException e) {
                        return null;
                    }
                }
                return fl;
View Full Code Here

    public IsolatedSample getIsolatedSample(final Integer sample, final AudioFileFormat.Type format) throws NoSuchSampleException, NoSuchContextException, SampleEmptyException {
        SDBReader reader = sampleDatabaseProxy.getDBRead();
        try {
            reader.getSampleRead(this, sample);
            try {
                return new IsolatedSample() {
                    private final String name = getSampleName(sample);
                    private SampleRetrievalInfo sri = new Impl_SampleRetrievalInfo(sample, format);
                    private File localFile = sri.getFile();
                    private AudioFileFormat.Type aFormat = format;
View Full Code Here

        SDBReader reader = sampleDatabaseProxy.getDBRead();
        try {
            reader.getSampleRead(this, sample);
            try {
                //return new Impl_IsolatedSample(this, sampleMediator, sample, fileName);
                return new IsolatedSample() {
                    private final String name = getSampleName(sample);
                    private SampleRetrievalInfo sri = new Impl_SampleRetrievalInfo(sample, new File(TempFileManager.getTempDirectory(), fileName), format, true);
                    private File localFile = sri.getFile();
                    private AudioFileFormat.Type aFormat = format;
View Full Code Here

        SDBReader reader = sampleDatabaseProxy.getDBRead();
        try {
            reader.getSampleRead(this, sample);
            try {
                // return new Impl_IsolatedSample(this, sampleMediator, sample, File);
                return new IsolatedSample() {
                    private final String name = getSampleName(sample);
                    //private SampleRetrievalInfo sri = new Impl_SampleRetrievalInfo(sample, File, format, true);
                    private File localFile = file;
                    private AudioFileFormat.Type aFormat = format;
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

    }

    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.preset.IsolatedSample

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.