Search in sources :

Example 11 with BlueProject

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

the class ProjectPropertiesTopComponent method reinitialize.

public void reinitialize() {
    BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
    ProjectProperties projectProperties = null;
    BlueData data = null;
    if (project != null) {
        data = project.getData();
        if (data != null) {
            projectProperties = data.getProjectProperties();
        }
    }
    for (ProjectPluginEditor editor : pluginEditors.values()) {
        editor.edit(data);
    }
    this.projectInformationPanel1.setProjectProperties(projectProperties);
    this.realtimeRenderSettingsPanel1.setProjectProperties(projectProperties);
    this.diskRenderSettingsPanel1.setProjectProperties(projectProperties);
}
Also used : ProjectPluginEditor(blue.project.ProjectPluginEditor) BlueData(blue.BlueData) BlueProject(blue.projects.BlueProject) ProjectProperties(blue.ProjectProperties)

Example 12 with BlueProject

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

the class RenderToDiskAndOpenAction method actionPerformed.

@Override
public void actionPerformed(ActionEvent e) {
    BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
    if (project != null) {
        BlueData data = project.getData();
        if (data != null) {
            RenderToDiskUtility.getInstance().renderToDisk(data, f -> {
                DiskRenderSettings settings = DiskRenderSettings.getInstance();
                String command = settings.externalOpenCommand;
                try {
                    if (System.getProperty("os.name").contains("Windows")) {
                        String p = f.getAbsolutePath().replace("\\", "\\\\");
                        command = command.replaceAll("\\$outfile", p);
                        Runtime.getRuntime().exec(command);
                    } else {
                        command = command.replaceAll("\\$outfile", f.getAbsolutePath());
                        String[] cmdArray = ProcessConsole.splitCommandString(command);
                        Runtime.getRuntime().exec(cmdArray);
                    }
                    System.out.println(command);
                } catch (Exception ex) {
                    JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), "Could not run command: " + command, "Error", JOptionPane.ERROR_MESSAGE);
                    System.err.println("[" + BlueSystem.getString("message.error") + "] - " + ex.getLocalizedMessage());
                    ex.printStackTrace();
                }
            });
        }
    }
}
Also used : BlueData(blue.BlueData) BlueProject(blue.projects.BlueProject) DiskRenderSettings(blue.settings.DiskRenderSettings)

Example 13 with BlueProject

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

the class UserDefinedOpcodeTopComponent method reinitialize.

private void reinitialize() {
    BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
    if (project == null) {
        opcodeListEditPanel1.setOpcodeList(null);
    } else {
        OpcodeList opcodeList = project.getData().getOpcodeList();
        opcodeListEditPanel1.setOpcodeList(opcodeList);
    }
}
Also used : OpcodeList(blue.udo.OpcodeList) BlueProject(blue.projects.BlueProject)

Example 14 with BlueProject

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

the class MixerTopComponent method reinitialize.

protected void reinitialize() {
    BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
    BlueData data = null;
    channelGroupsPanel.removeAll();
    if (project != null) {
        data = project.getData();
        for (ChannelList list : data.getMixer().getChannelListGroups()) {
            ChannelListPanel panel = new ChannelListPanel();
            channelGroupsPanel.add(panel);
            panel.setChannelList(list, data.getMixer().getSubChannels());
            panel.revalidate();
        }
        channelGroupsPanel.add(channelsPanel);
        channelGroupsPanel.add(subChannelsPanel);
        setMixer(data.getMixer());
        setArrangement(data.getArrangement());
    }
    channelGroupsPanel.revalidate();
    channelGroupsPanel.repaint();
}
Also used : BlueData(blue.BlueData) BlueProject(blue.projects.BlueProject) ChannelList(blue.mixer.ChannelList)

Example 15 with BlueProject

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

the class MidiInputEngine method reinitialize.

protected void reinitialize() {
    BlueProject project = BlueProjectManager.getInstance().getCurrentProject();
    BlueData data = null;
    if (project != null) {
        data = project.getData();
        arrangement = data.getArrangement().getArrangement();
        processor = data.getMidiInputProcessor();
    }
}
Also used : BlueData(blue.BlueData) BlueProject(blue.projects.BlueProject)

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