Search in sources :

Example 1 with BSBCompilationUnit

use of blue.orchestra.blueSynthBuilder.BSBCompilationUnit in project blue by kunstmusik.

the class ObjectBuilder method generateForCSD.

@Override
public NoteList generateForCSD(CompileData compileData, double startTime, double endTime) throws SoundObjectException {
    BSBCompilationUnit bsbCompilationUnit = new BSBCompilationUnit();
    graphicInterface.setupForCompilation(bsbCompilationUnit);
    NoteList nl = generateNotes(bsbCompilationUnit, startTime, endTime);
    return nl;
}
Also used : BSBCompilationUnit(blue.orchestra.blueSynthBuilder.BSBCompilationUnit)

Example 2 with BSBCompilationUnit

use of blue.orchestra.blueSynthBuilder.BSBCompilationUnit in project blue by kunstmusik.

the class Effect method generateUDO.

public UserDefinedOpcode generateUDO(OpcodeList udoList) {
    HashMap udoReplacementValues = UDOUtilities.appendUserDefinedOpcodes(opcodeList, udoList);
    UserDefinedOpcode udo = new UserDefinedOpcode();
    BSBCompilationUnit bsbUnit = new BSBCompilationUnit();
    graphicInterface.setupForCompilation(bsbUnit);
    StrBuilder buffer = new StrBuilder();
    buffer.append(getXinText()).append("\n");
    buffer.append(bsbUnit.replaceBSBValues(code)).append("\n");
    buffer.append(getXoutText()).append("\n");
    String udoCode = buffer.toString();
    if (udoReplacementValues != null) {
        udoCode = TextUtilities.replaceOpcodeNames(udoReplacementValues, udoCode);
    }
    udo.codeBody = udoCode;
    udo.inTypes = getSigTypes(numIns);
    udo.outTypes = getSigTypes(numOuts);
    return udo;
}
Also used : HashMap(java.util.HashMap) UserDefinedOpcode(blue.udo.UserDefinedOpcode) BSBCompilationUnit(blue.orchestra.blueSynthBuilder.BSBCompilationUnit) StrBuilder(org.apache.commons.lang3.text.StrBuilder)

Aggregations

BSBCompilationUnit (blue.orchestra.blueSynthBuilder.BSBCompilationUnit)2 UserDefinedOpcode (blue.udo.UserDefinedOpcode)1 HashMap (java.util.HashMap)1 StrBuilder (org.apache.commons.lang3.text.StrBuilder)1