Search in sources :

Example 6 with InstrumentAssignment

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);
    }
}
Also used : BlueData(blue.BlueData) InstrumentAssignment(blue.InstrumentAssignment)

Aggregations

InstrumentAssignment (blue.InstrumentAssignment)6 ChannelList (blue.mixer.ChannelList)4 ArrayList (java.util.ArrayList)4 Automatable (blue.automation.Automatable)3 Channel (blue.mixer.Channel)3 Instrument (blue.orchestra.Instrument)3 Parameter (blue.automation.Parameter)2 ParameterList (blue.automation.ParameterList)2 LinePoint (blue.components.lines.LinePoint)2 Arrangement (blue.Arrangement)1 BlueData (blue.BlueData)1 Mixer (blue.mixer.Mixer)1 GenericInstrument (blue.orchestra.GenericInstrument)1 StringChannel (blue.orchestra.blueSynthBuilder.StringChannel)1 PolyObject (blue.soundObject.PolyObject)1 ActionEvent (java.awt.event.ActionEvent)1 JMenu (javax.swing.JMenu)1 JMenuItem (javax.swing.JMenuItem)1 JPopupMenu (javax.swing.JPopupMenu)1 NotifyDescriptor (org.openide.NotifyDescriptor)1