@Override @Deprecated public void handleVectorLocally(int paramId, float[] values) { IEditState eb = getEditBuffer(); eb.allowVectorParam(paramId); eb.getVector(paramId).x = values; }
@Override @Deprecated public void handleScalarLocally(int paramId, float value) { IEditState eb = getEditBuffer(); eb.allowScalarParam(paramId); eb.getScalar(paramId).x = value; }
@Override public VectorParam examineVectorParameter00(int paramId) { IEditState eb = getEditBuffer(); int np = eb.getNumVectorParams(); if (np > paramId) { return eb.getVector(paramId); } else { return null; } }
/** Retrieve a preset. */ @Override public void doRetrievePreset(int presetSlot, int version) { IEditState temp = retrievePresetObject(presetSlot, version); // Extend with scalars: int buffSize = temp.getNumScalarParams(); temp.allowScalarParam(itsTransientPresetTemplate.getNumScalarParams() - 1); for (int i = buffSize; i < itsTransientPresetTemplate.getNumScalarParams(); i++) { temp.putScalar(i, itsTransientPresetTemplate.scalars[i]); } // Extend with vectors: note: we need to clone the template. // (Edit buffers are seriously mutable.) buffSize = temp.getNumVectorParams(); temp.allowVectorParam(itsTransientPresetTemplate.getNumVectorParams() - 1); for (int i = buffSize; i < itsTransientPresetTemplate.getNumVectorParams(); i++) { VectorParam source = itsTransientPresetTemplate.vectors[i]; float[] f = new float[source.x.length]; System.arraycopy(source.x, 0, f, 0, source.x.length); VectorParam vp = new VectorParam(); vp.x = f; temp.putVector(i, vp); } temp.setOriginalPresetHint(presetSlot, version); getEditBuffer().refreshFrom(temp); pushEditState(); }