public class MultiStageEnvelope extends LXRangeModulator implements LXWaveshape, LXOscComponent
Modifier and Type | Class and Description |
---|---|
class |
MultiStageEnvelope.Stage |
LXComponent.Placeholder, LXComponent.Renamable
LXParameter.Formatter, LXParameter.Polarity, LXParameter.Units
LXSerializable.Utils
Modifier and Type | Field and Description |
---|---|
MutableParameter |
monitor |
CompoundParameter |
period |
List<MultiStageEnvelope.Stage> |
stages |
looping, tempoDivision, tempoLock, tempoSync
runMs, running, trigger
controlSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor
Constructor and Description |
---|
MultiStageEnvelope() |
MultiStageEnvelope(String label) |
MultiStageEnvelope(String label,
float initialValue,
float endValue) |
Modifier and Type | Method and Description |
---|---|
MultiStageEnvelope.Stage |
addStage(double basis,
double value) |
MultiStageEnvelope.Stage |
addStage(MultiStageEnvelope.Stage stage) |
double |
compute(double basis) |
protected double |
computeNormalizedBasis(double basis,
double normalizedValue)
Subclasses determine the basis based on a normalized value from 0 to 1.
|
protected double |
computeNormalizedValue(double deltaMs,
double basis)
Subclasses implement this which returns their value from a 0-1 scale.
|
double |
invert(double value,
double basisHint) |
void |
load(LX lx,
JsonObject obj)
Loads the LX component.
|
MultiStageEnvelope |
removeStage(MultiStageEnvelope.Stage stage) |
void |
save(LX lx,
JsonObject obj)
Serializes the LX component.
|
computeBasis, computeValue, getExponent, getNormalized, getNormalizedf, onSetValue, setEndValue, setEndValue, setExponent, setNormalized, setRange, setRange, setRangeFromHereTo, setRangeFromHereTo, setStartValue, setStartValue
computeValue, finished, getBasis, getBasisf, getPeriod, getPeriodf, loop, loop, onParameterChanged, onReset, randomBasis, setBasis, setLooping, setPeriod, setPeriod, updateBasis
getDescription, getFormatter, getIndex, getOscAddress, getOscPath, getPath, getPolarity, getUnits, getValue, getValuef, run, setComponent, setDescription, setFormatter, setIndex, setPolarity, setUnits, setValue, setValue, updateValue
isRunning, onStart, onStop, reset, start, stop, toggle, trigger
addArray, addChild, addInternalParameter, addParameter, addParameter, contains, copyParameters, dispose, getChild, getComponentName, getComponentName, getComponentName, getId, getLabel, getLX, getOscLabel, getParameter, getParameters, getParent, handleOscMessage, loadParameters, removeParameter, removeParameter, saveParameters, setParent, toString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getOscAddress, handleOscMessage
dispose, getDescription, getFormatter, getLabel, getPolarity, getUnits, getValue, getValuef, isMappable, reset, setComponent, setMappable, setValue
get, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter, getParent, getPath
public final CompoundParameter period
public final List<MultiStageEnvelope.Stage> stages
public final MutableParameter monitor
public MultiStageEnvelope()
public MultiStageEnvelope(String label)
public MultiStageEnvelope(String label, float initialValue, float endValue)
public MultiStageEnvelope removeStage(MultiStageEnvelope.Stage stage)
public MultiStageEnvelope.Stage addStage(MultiStageEnvelope.Stage stage)
public MultiStageEnvelope.Stage addStage(double basis, double value)
protected double computeNormalizedValue(double deltaMs, double basis)
LXRangeModulator
computeNormalizedValue
in class LXRangeModulator
deltaMs
- Milliseconds elapsedbasis
- Basis of modulatorprotected double computeNormalizedBasis(double basis, double normalizedValue)
LXRangeModulator
computeNormalizedBasis
in class LXRangeModulator
basis
- Modulator basisnormalizedValue
- A normalize value from 0 to 1public double compute(double basis)
compute
in interface LXWaveshape
public double invert(double value, double basisHint)
invert
in interface LXWaveshape
public void save(LX lx, JsonObject obj)
LXComponent
super.save(lx, obj)
at the appropriate time.save
in interface LXSerializable
save
in class LXPeriodicModulator
lx
- LX instanceobj
- Object to serialize intopublic void load(LX lx, JsonObject obj)
LXComponent
load
in interface LXSerializable
load
in class LXPeriodicModulator
lx
- LX instanceobj
- Object to deserializeLX library by Mark C. Slee. © 2012-2020