use of blue.InstrumentAssignment in project blue by kunstmusik.
the class ExportStemsRenderer method exportStemsByInstrument.
public void exportStemsByInstrument(BlueData data) {
BlueData tempData = new BlueData(data);
ArrayList<InstrumentAssignment> instrumentAssignments = tempData.getArrangement().getArrangement();
for (Iterator<InstrumentAssignment> it = instrumentAssignments.iterator(); it.hasNext(); ) {
InstrumentAssignment instrumentAssignment = it.next();
if (!instrumentAssignment.enabled) {
it.remove();
}
}
for (int i = 0; i < instrumentAssignments.size(); i++) {
InstrumentAssignment ia = instrumentAssignments.get(i);
for (int j = 0; j < instrumentAssignments.size(); j++) {
InstrumentAssignment temp = instrumentAssignments.get(j);
temp.enabled = (temp == ia);
}
RenderToDiskUtility.getInstance().renderToDisk(data, null);
}
}
Aggregations