Search in sources :

Example 1 with LiveData

use of blue.LiveData in project blue by kunstmusik.

the class CommandlineRunner method renderForBlueLive.

@Override
public void renderForBlueLive() throws SoundObjectException {
    CsdRenderResult result = CSDRenderService.getDefault().generateCSDForBlueLive(this.data, false);
    String tempCSD = result.getCsdText();
    File temp = FileUtilities.createTempTextFile("tempCsd", ".csd", BlueSystem.getCurrentProjectDirectory(), tempCSD);
    String osName = System.getProperty("os.name");
    String command;
    LiveData liveData = data.getLiveData();
    if (liveData.isCommandLineEnabled()) {
        if (liveData.isCommandLineOverride()) {
            command = liveData.getCommandLine();
        } else {
            command = ProjectPropertiesUtil.getRealtimeCommandLine(data.getProjectProperties());
            command += " -Lstdin ";
            command += liveData.getCommandLine();
        }
    } else {
        command = ProjectPropertiesUtil.getRealtimeCommandLine(data.getProjectProperties());
        command += " -Lstdin ";
    }
    command += " --omacro:BLUE_LIVE=1 --smacro:BLUE_LIVE=1 ";
    if (osName.contains("Windows")) {
        command += " \"" + temp.getAbsolutePath() + "\"";
    } else {
        command += " " + temp.getAbsolutePath();
    }
    play(command, BlueSystem.getCurrentProjectDirectory(), -1);
}
Also used : LiveData(blue.LiveData) File(java.io.File) CsdRenderResult(blue.services.render.CsdRenderResult)

Example 2 with LiveData

use of blue.LiveData in project blue by kunstmusik.

the class CS6RealtimeRenderService method renderForBlueLive.

@Override
public void renderForBlueLive() throws SoundObjectException {
    // csnd6.csoundInitialize(csnd6.CSOUNDINIT_NO_SIGNAL_HANDLER);
    CsdRenderResult result = CSDRenderService.getDefault().generateCSDForBlueLive(this.data, true);
    String tempCSD = result.getCsdText();
    File temp = FileUtilities.createTempTextFile("tempCsd", ".csd", BlueSystem.getCurrentProjectDirectory(), tempCSD);
    String osName = System.getProperty("os.name");
    String command;
    LiveData liveData = data.getLiveData();
    if (liveData.isCommandLineEnabled()) {
        if (liveData.isCommandLineOverride()) {
            command = liveData.getCommandLine();
        } else {
            command = ProjectPropertiesUtil.getRealtimeCommandLine(data.getProjectProperties());
            command += liveData.getCommandLine();
        }
    } else {
        command = ProjectPropertiesUtil.getRealtimeCommandLine(data.getProjectProperties());
    }
    command += " --omacro:BLUE_LIVE=1  --smacro:BLUE_LIVE=1 ";
    String[] args = command.split("\\s+");
    String[] args2 = new String[args.length + 1];
    System.arraycopy(args, 0, args2, 0, args.length);
    args2[args.length] = temp.getAbsolutePath();
    play(this.data, result, args2, BlueSystem.getCurrentProjectDirectory(), -1.0f);
}
Also used : LiveData(blue.LiveData) File(java.io.File) CsdRenderResult(blue.services.render.CsdRenderResult)

Aggregations

LiveData (blue.LiveData)2 CsdRenderResult (blue.services.render.CsdRenderResult)2 File (java.io.File)2