public abstract class FunctionalModulator extends LXRangeModulator
LXComponent.Placeholder, LXComponent.Renamable
LXParameter.Formatter, LXParameter.Polarity, LXParameter.Units
LXSerializable.Utils
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 |
---|
FunctionalModulator(double startValue,
double endValue,
double periodMs) |
FunctionalModulator(double startValue,
double endValue,
LXParameter periodMs) |
FunctionalModulator(double startValue,
LXParameter endValue,
double periodMs) |
FunctionalModulator(double startValue,
LXParameter endValue,
LXParameter periodMs) |
FunctionalModulator(LXParameter startValue,
double endValue,
double periodMs) |
FunctionalModulator(LXParameter startValue,
double endValue,
LXParameter periodMs) |
FunctionalModulator(LXParameter startValue,
LXParameter endValue,
double periodMs) |
FunctionalModulator(LXParameter startValue,
LXParameter endValue,
LXParameter periodMs) |
FunctionalModulator(String label,
double startValue,
double endValue,
double periodMs) |
FunctionalModulator(String label,
double startValue,
double endValue,
LXParameter periodMs) |
FunctionalModulator(String label,
double startValue,
LXParameter endValue,
double periodMs) |
FunctionalModulator(String label,
double startValue,
LXParameter endValue,
LXParameter periodMs) |
FunctionalModulator(String label,
LXParameter startValue,
double endValue,
double periodMs) |
FunctionalModulator(String label,
LXParameter startValue,
double endValue,
LXParameter periodMs) |
FunctionalModulator(String label,
LXParameter startValue,
LXParameter endValue,
double periodMs) |
FunctionalModulator(String label,
LXParameter startValue,
LXParameter endValue,
LXParameter periodMs) |
Modifier and Type | Method and Description |
---|---|
abstract double |
compute(double basis)
Subclasses override this method to compute the value of the function.
|
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 basis,
double value)
Subclasses optionally override this method to support inversion of the
value to a basis.
|
computeBasis, computeValue, getExponent, getNormalized, getNormalizedf, onSetValue, setEndValue, setEndValue, setExponent, setNormalized, setRange, setRange, setRangeFromHereTo, setRangeFromHereTo, setStartValue, setStartValue
computeValue, finished, getBasis, getBasisf, getPeriod, getPeriodf, load, loop, loop, onParameterChanged, onReset, randomBasis, save, 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
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 FunctionalModulator(double startValue, double endValue, double periodMs)
public FunctionalModulator(LXParameter startValue, double endValue, double periodMs)
public FunctionalModulator(double startValue, LXParameter endValue, double periodMs)
public FunctionalModulator(double startValue, double endValue, LXParameter periodMs)
public FunctionalModulator(LXParameter startValue, LXParameter endValue, double periodMs)
public FunctionalModulator(LXParameter startValue, double endValue, LXParameter periodMs)
public FunctionalModulator(double startValue, LXParameter endValue, LXParameter periodMs)
public FunctionalModulator(LXParameter startValue, LXParameter endValue, LXParameter periodMs)
public FunctionalModulator(String label, double startValue, double endValue, double periodMs)
public FunctionalModulator(String label, LXParameter startValue, double endValue, double periodMs)
public FunctionalModulator(String label, double startValue, LXParameter endValue, double periodMs)
public FunctionalModulator(String label, double startValue, double endValue, LXParameter periodMs)
public FunctionalModulator(String label, LXParameter startValue, LXParameter endValue, double periodMs)
public FunctionalModulator(String label, LXParameter startValue, double endValue, LXParameter periodMs)
public FunctionalModulator(String label, double startValue, LXParameter endValue, LXParameter periodMs)
public FunctionalModulator(String label, LXParameter startValue, LXParameter endValue, LXParameter periodMs)
protected double computeNormalizedValue(double deltaMs, double basis)
LXRangeModulator
computeNormalizedValue
in class LXRangeModulator
deltaMs
- Milliseconds elapsedbasis
- Basis of modulatorprotected double computeNormalizedBasis(double basis, double normalizedValue)
computeNormalizedBasis
in class LXRangeModulator
normalizedValue
- A normalize value from 0 to 1basis
- Modulator basispublic abstract double compute(double basis)
basis
- Basis of modulatorpublic double invert(double basis, double value)
basis
- Previous basis, from 0-1value
- New value from 0-1LX library by Mark C. Slee. © 2012-2020