Search in sources :

Example 21 with BlueData

use of blue.BlueData 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 22 with BlueData

use of blue.BlueData 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)

Example 23 with BlueData

use of blue.BlueData 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 24 with BlueData

use of blue.BlueData in project blue by kunstmusik.

the class ReplaceWithBufferSoundObjectAction method actionPerformed.

@Override
public void actionPerformed(ActionEvent e) {
    ScoreController.ScoreObjectBuffer buffer = ScoreController.getInstance().getScoreObjectBuffer();
    List<Layer> layers = scorePath.getAllLayers();
    BlueData data = BlueProjectManager.getInstance().getCurrentBlueData();
    SoundObjectLibrary sObjLib = data.getSoundObjectLibrary();
    List<Instance> instances = new ArrayList<>();
    ReplaceScoreObjectEdit top = null;
    for (SoundObject sObj : soundObjects) {
        SoundObject replacement = getReplacementObject(buffer, instances);
        replacement.setStartTime(sObj.getStartTime());
        replacement.setSubjectiveDuration(sObj.getSubjectiveDuration());
        ScoreObjectLayer layer = (ScoreObjectLayer) findLayerForSoundObject(layers, sObj);
        layer.remove(sObj);
        layer.add(replacement);
        ReplaceScoreObjectEdit edit = new ReplaceScoreObjectEdit(layer, sObj, replacement);
        if (top == null) {
            top = edit;
        } else {
            top.addEdit(edit);
        }
    }
    // FIXME - this part is not undoable...
    sObjLib.checkAndAddInstanceSoundObjects(instances);
    BlueUndoManager.setUndoManager("score");
    BlueUndoManager.addEdit(top);
}
Also used : ScoreController(blue.ui.core.score.ScoreController) BlueData(blue.BlueData) ScoreObjectLayer(blue.score.layers.ScoreObjectLayer) SoundObject(blue.soundObject.SoundObject) Instance(blue.soundObject.Instance) ReplaceScoreObjectEdit(blue.ui.core.score.undo.ReplaceScoreObjectEdit) ArrayList(java.util.ArrayList) SoundObjectLibrary(blue.SoundObjectLibrary) SoundLayer(blue.SoundLayer) ScoreObjectLayer(blue.score.layers.ScoreObjectLayer) Layer(blue.score.layers.Layer)

Example 25 with BlueData

use of blue.BlueData in project blue by kunstmusik.

the class CSDUtilityTest method testParseCsScore_multiLine.

@Test
public void testParseCsScore_multiLine() {
    BlueData data = new BlueData();
    String score1 = "i1 0 2 3 4 5\n6 7 8 9\n8.8 8\n";
    score1 += "i1 2 3 4 5\n";
    score1 += "i1 2 3 4 5\n";
    score1 += "\"test\" 1 2 3 4 5\n";
    String score2 = "f1 0 3 4\n   5 6 7\n";
    String score = score1 + score2;
    int importMode = CSDUtility.IMPORT_GLOBAL;
    CSDUtility.parseCsScore(data, score, importMode);
    assertEquals(score1, data.getGlobalOrcSco().getGlobalSco());
    assertEquals(score2, data.getTableSet().getTables());
}
Also used : BlueData(blue.BlueData)

Aggregations

BlueData (blue.BlueData)46 BlueProject (blue.projects.BlueProject)18 PolyObject (blue.soundObject.PolyObject)9 File (java.io.File)9 SoundLayer (blue.SoundLayer)7 ScoreObject (blue.score.ScoreObject)7 Instance (blue.soundObject.Instance)6 CsdRenderResult (blue.services.render.CsdRenderResult)5 SoundObject (blue.soundObject.SoundObject)5 SoundObjectLibrary (blue.SoundObjectLibrary)4 Arrangement (blue.Arrangement)3 BlueSynthBuilder (blue.orchestra.BlueSynthBuilder)3 Layer (blue.score.layers.Layer)3 ScoreObjectLayer (blue.score.layers.ScoreObjectLayer)3 DiskRenderSettings (blue.settings.DiskRenderSettings)3 ScoreController (blue.ui.core.score.ScoreController)3 AddScoreObjectEdit (blue.ui.core.score.undo.AddScoreObjectEdit)3 Frame (java.awt.Frame)3 Point (java.awt.Point)3 IOException (java.io.IOException)3