Search in sources :

Example 16 with BlueProject

use of blue.projects.BlueProject in project blue by kunstmusik.

the class ParameterTimeManagerImpl method getTime.

@Override
public double getTime() {
    if (RealtimeRenderManager.getInstance().isAuditioning()) {
        return -1.0f;
    }
    BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
    if (project == null) {
        return -1.0f;
    }
    BlueData data = project.getData();
    if (data == null) {
        return -1.0f;
    }
    double val = data.getRenderStartTime();
    return val;
}
Also used : BlueData(blue.BlueData) BlueProject(blue.projects.BlueProject)

Example 17 with BlueProject

use of blue.projects.BlueProject in project blue by kunstmusik.

the class MainToolBar method reinitialize.

private void reinitialize() {
    BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
    BlueData data = null;
    if (project != null) {
        data = project.getData();
        setData(data);
    }
}
Also used : BlueProject(blue.projects.BlueProject)

Example 18 with BlueProject

use of blue.projects.BlueProject in project blue by kunstmusik.

the class GlobalScoreTopComponent method reinitialize.

private void reinitialize() {
    BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
    if (project == null) {
        scoreText.setText("");
        scoreText.getJEditorPane().setEditable(false);
    } else {
        GlobalOrcSco localGlobals = project.getData().getGlobalOrcSco();
        scoreText.setText(localGlobals.getGlobalSco());
        scoreText.getJEditorPane().setEditable(true);
        globalOrcSco = localGlobals;
    }
    undo.discardAllEdits();
}
Also used : GlobalOrcSco(blue.GlobalOrcSco) BlueProject(blue.projects.BlueProject)

Example 19 with BlueProject

use of blue.projects.BlueProject in project blue by kunstmusik.

the class BlueProjectPropertyChangeListener method propertyChange.

@Override
public void propertyChange(PropertyChangeEvent evt) {
    if (BlueProjectManager.CURRENT_PROJECT.equals(evt.getPropertyName())) {
        BlueProject oldProject = (BlueProject) evt.getOldValue();
        BlueProject newProject = (BlueProject) evt.getNewValue();
        if (oldProject == newProject) {
            return;
        }
        if (oldProject != null) {
            detachListeners(oldProject);
        }
        for (AudioLayerGroupBinding binding : layerGroupBindings.values()) {
            binding.clearBinding();
        }
        layerGroupBindings.clear();
        for (AudioLayerChannelBinding binding : layerBindings.values()) {
            binding.clearBinding();
        }
        layerBindings.clear();
        if (newProject != null) {
            synchronizeAudioLayersAndMixer(newProject.getData());
            attachListeners(newProject);
        }
        currentProject = newProject;
    }
}
Also used : BlueProject(blue.projects.BlueProject) AudioLayerChannelBinding(blue.score.layers.audio.ui.bindings.AudioLayerChannelBinding) AudioLayerGroupBinding(blue.score.layers.audio.ui.bindings.AudioLayerGroupBinding)

Example 20 with BlueProject

use of blue.projects.BlueProject in project blue by kunstmusik.

the class ImportCsdAction method importCsdAction.

protected void importCsdAction() {
    final Frame mainWindow = WindowManager.getDefault().getMainWindow();
    List<File> rValue = FileChooserManager.getDefault().showOpenDialog(this.getClass(), mainWindow);
    if (rValue.size() > 0) {
        File temp = rValue.get(0);
        if (!(temp.getName().trim().toLowerCase().endsWith(".csd"))) {
            String errorMessage = BlueSystem.getString("message.file.incorrectEnding") + " .csd";
            JOptionPane.showMessageDialog(mainWindow, errorMessage, "Error", JOptionPane.ERROR_MESSAGE);
        }
        /*
             * if(!saveCheck()) { System.out.println("!saveCheck() in
             * BlueMainFrame"); return;
             */
        final Object[] values = { BlueSystem.getString("csd.import1"), BlueSystem.getString("csd.import2"), BlueSystem.getString("csd.import3") };
        Object selectedValue = JOptionPane.showInputDialog(mainWindow, BlueSystem.getString("csd.importMethod.message"), BlueSystem.getString("csd.importMethod.title"), JOptionPane.INFORMATION_MESSAGE, null, values, values[0]);
        if (selectedValue == null) {
            return;
        }
        int modeType = 0;
        for (int i = 0; i < values.length; i++) {
            if (selectedValue == values[i]) {
                modeType = i;
                break;
            }
        }
        BlueData tempData = CSDUtility.convertCSDtoBlue(temp, modeType);
        if (tempData != null) {
            BlueProject project = new BlueProject(tempData, null);
            BlueProjectManager.getInstance().setCurrentProject(project);
        } else {
            JOptionPane.showMessageDialog(mainWindow, BlueSystem.getString("message.file.couldNotImport"), BlueSystem.getString("message.error"), JOptionPane.ERROR_MESSAGE);
        }
    }
// else if (rValue == JFileChooser.CANCEL_OPTION) {
// StatusDisplayer.getDefault().setStatusText(
// BlueSystem.getString("message.actionCancelled"));
// }
}
Also used : BlueData(blue.BlueData) Frame(java.awt.Frame) BlueProject(blue.projects.BlueProject) File(java.io.File)

Aggregations

BlueProject (blue.projects.BlueProject)31 BlueData (blue.BlueData)18 File (java.io.File)6 BlueProjectManager (blue.projects.BlueProjectManager)4 Frame (java.awt.Frame)3 GlobalOrcSco (blue.GlobalOrcSco)2 DiskRenderSettings (blue.settings.DiskRenderSettings)2 ProjectProperties (blue.ProjectProperties)1 Tables (blue.Tables)1 ChannelList (blue.mixer.ChannelList)1 ProjectPluginEditor (blue.project.ProjectPluginEditor)1 Score (blue.score.Score)1 ScoreObject (blue.score.ScoreObject)1 AudioLayerChannelBinding (blue.score.layers.audio.ui.bindings.AudioLayerChannelBinding)1 AudioLayerGroupBinding (blue.score.layers.audio.ui.bindings.AudioLayerGroupBinding)1 Tempo (blue.score.tempo.Tempo)1 RenderTimeManager (blue.services.render.RenderTimeManager)1 NoteParseException (blue.soundObject.NoteParseException)1 PolyObject (blue.soundObject.PolyObject)1 OpcodeList (blue.udo.OpcodeList)1