Search in sources :

Example 1 with EnvelopePoint

use of blue.orchestra.blueX7.EnvelopePoint in project blue by kunstmusik.

the class BlueX7 method loadFromXML.

public static Instrument loadFromXML(Element data) throws Exception {
    BlueX7 instr = new BlueX7();
    InstrumentUtilities.initBasicFromXML(data, instr);
    instr.algorithmCommon = AlgorithmCommonData.loadFromXML(data.getElement("algorithmCommonData"));
    instr.lfo = LFOData.loadFromXML(data.getElement("lfoData"));
    Elements ops = data.getElements("operator");
    int counter = 0;
    while (ops.hasMoreElements()) {
        instr.operators[counter] = Operator.loadFromXML(ops.next());
        counter++;
    }
    Elements pegPoints = data.getElements("envelopePoint");
    counter = 0;
    while (pegPoints.hasMoreElements()) {
        instr.peg[counter] = EnvelopePoint.loadFromXML(pegPoints.next());
        counter++;
    }
    try {
        instr.csoundPostCode = data.getTextString("csoundPostCode");
    } catch (Exception e) {
    }
    return instr;
}
Also used : Elements(electric.xml.Elements) EnvelopePoint(blue.orchestra.blueX7.EnvelopePoint) IOException(java.io.IOException)

Example 2 with EnvelopePoint

use of blue.orchestra.blueX7.EnvelopePoint in project blue by kunstmusik.

the class EnvelopeMouseListener method main.

public static void main(String[] args) {
    EnvelopeEditor envelopeEditor1 = new EnvelopeEditor();
    envelopeEditor1.points = new EnvelopePoint[4];
    for (int i = 0; i < envelopeEditor1.points.length; i++) {
        envelopeEditor1.points[i] = new EnvelopePoint();
        envelopeEditor1.points[i].x = 77;
        envelopeEditor1.points[i].y = ((i + 1) * 99) / 4;
    }
    blue.utility.GUI.showComponentAsStandalone(envelopeEditor1, "EnvelopEditor Test", true);
}
Also used : EnvelopePoint(blue.orchestra.blueX7.EnvelopePoint) EnvelopePoint(blue.orchestra.blueX7.EnvelopePoint)

Example 3 with EnvelopePoint

use of blue.orchestra.blueX7.EnvelopePoint in project blue by kunstmusik.

the class EnvelopeGeneratorPanel method updateLabels.

@Override
public void updateLabels() {
    EnvelopePoint[] points = env.getPoints();
    for (int i = 0; i < 4; i++) {
        labels[i * 2].setText(Integer.toString(points[i].x));
        labels[(i * 2) + 1].setText(Integer.toString(points[i].y));
    }
}
Also used : EnvelopePoint(blue.orchestra.blueX7.EnvelopePoint) EnvelopePoint(blue.orchestra.blueX7.EnvelopePoint)

Aggregations

EnvelopePoint (blue.orchestra.blueX7.EnvelopePoint)3 Elements (electric.xml.Elements)1 IOException (java.io.IOException)1