Search in sources :

Example 1 with RealtimeRenderSettings

use of blue.settings.RealtimeRenderSettings in project blue by kunstmusik.

the class BlueProjectManager method createNewProject.

public static BlueProject createNewProject() {
    final BlueData blueData = new BlueData();
    BlueProject project = new BlueProject(blueData, null);
    for (LayerGroup<?> layerGroup : blueData.getScore()) {
        if (layerGroup instanceof PolyObject) {
            PolyObject pObj = (PolyObject) layerGroup;
            pObj.setDefaultHeightIndex(ProjectDefaultsSettings.getInstance().layerHeightDefault);
            if (pObj.size() == 0) {
                pObj.newLayerAt(-1);
            }
        }
    }
    blueData.getMixer().setEnabled(ProjectDefaultsSettings.getInstance().mixerEnabled);
    ProjectProperties proj = blueData.getProjectProperties();
    proj.author = ProjectDefaultsSettings.getInstance().defaultAuthor;
    RealtimeRenderSettings rtSettings = RealtimeRenderSettings.getInstance();
    proj.sampleRate = rtSettings.defaultSr;
    proj.ksmps = rtSettings.defaultKsmps;
    proj.channels = rtSettings.defaultNchnls;
    proj.useZeroDbFS = rtSettings.useZeroDbFS;
    proj.zeroDbFS = rtSettings.zeroDbFS;
    proj.useAudioOut = rtSettings.audioOutEnabled;
    proj.useAudioIn = rtSettings.audioInEnabled;
    proj.useMidiIn = rtSettings.midiInEnabled;
    proj.useMidiOut = rtSettings.midiOutEnabled;
    proj.noteAmpsEnabled = rtSettings.noteAmpsEnabled;
    proj.outOfRangeEnabled = rtSettings.outOfRangeEnabled;
    proj.warningsEnabled = rtSettings.warningsEnabled;
    proj.benchmarkEnabled = rtSettings.benchmarkEnabled;
    proj.advancedSettings = rtSettings.advancedSettings;
    // proj.commandLine = ProgramOptions.getDefaultCommandline();
    DiskRenderSettings diskSettings = DiskRenderSettings.getInstance();
    proj.diskSampleRate = diskSettings.defaultSr;
    proj.diskKsmps = diskSettings.defaultKsmps;
    proj.diskChannels = diskSettings.defaultNchnls;
    proj.diskUseZeroDbFS = diskSettings.useZeroDbFS;
    proj.diskZeroDbFS = diskSettings.zeroDbFS;
    proj.diskNoteAmpsEnabled = diskSettings.noteAmpsEnabled;
    proj.diskOutOfRangeEnabled = diskSettings.outOfRangeEnabled;
    proj.diskWarningsEnabled = diskSettings.warningsEnabled;
    proj.diskBenchmarkEnabled = diskSettings.benchmarkEnabled;
    proj.diskAdvancedSettings = diskSettings.advancedSettings;
    return project;
}
Also used : BlueData(blue.BlueData) RealtimeRenderSettings(blue.settings.RealtimeRenderSettings) DiskRenderSettings(blue.settings.DiskRenderSettings) ProjectProperties(blue.ProjectProperties) PolyObject(blue.soundObject.PolyObject)

Aggregations

BlueData (blue.BlueData)1 ProjectProperties (blue.ProjectProperties)1 DiskRenderSettings (blue.settings.DiskRenderSettings)1 RealtimeRenderSettings (blue.settings.RealtimeRenderSettings)1 PolyObject (blue.soundObject.PolyObject)1