Package heronarts.lx.modulator
Class DampedParameter
java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.LXRunnableComponent
heronarts.lx.modulator.LXModulator
heronarts.lx.modulator.DampedParameter
- All Implemented Interfaces:
LXComponent.Renamable
,LXLoopTask
,LXPath
,LXSerializable
,LXParameter
,LXParameterListener
A modulator that tracks the value of a parameter but damps motion over time according
to rules.
-
Nested Class Summary
Nested classes/interfaces inherited from class heronarts.lx.modulator.LXModulator
LXModulator.Device, LXModulator.Global, LXModulator.Placeholder
Nested classes/interfaces inherited from class heronarts.lx.LXComponent
LXComponent.Hidden, LXComponent.Renamable
Nested classes/interfaces inherited from interface heronarts.lx.parameter.LXParameter
LXParameter.Collection, LXParameter.Formatter, LXParameter.Monitor, LXParameter.MultiMonitor, LXParameter.Polarity, LXParameter.Units
Nested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils
-
Field Summary
Fields inherited from class heronarts.lx.modulator.LXModulator
crashed, midiFilter
Fields inherited from class heronarts.lx.LXRunnableComponent
runMs, running, trigger
Fields inherited from class heronarts.lx.LXComponent
children, internalParameters, KEY_CHILDREN, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_INTERNAL, KEY_PARAMETER_PATH, KEY_PARAMETERS, KEY_PATH, KEY_RESET, label, legacyInternalParameters, legacyParameters, lx, modulationColor, modulationControlsExpanded, modulationsExpanded, parameters, presetFile
Fields inherited from interface heronarts.lx.LXPath
ROOT, ROOT_PREFIX, ROOT_SLASH
-
Constructor Summary
ConstructorDescriptionDampedParameter
(LXParameter parameter, double velocity) DampedParameter
(LXParameter parameter, double velocity, double acceleration) DampedParameter
(LXParameter parameter, double velocity, double acceleration, double deceleration) DampedParameter
(LXParameter parameter, LXParameter velocity) DampedParameter
(LXParameter parameter, LXParameter velocity, LXParameter acceleration) DampedParameter
(LXParameter parameter, LXParameter velocity, LXParameter acceleration, LXParameter deceleration) DampedParameter
(String label, double velocity) DampedParameter
(String label, LXParameter parameter, double velocity, double acceleration) DampedParameter
(String label, LXParameter parameter, double velocity, double acceleration, double deceleration) DampedParameter
(String label, LXParameter parameter, LXParameter velocity) DampedParameter
(String label, LXParameter parameter, LXParameter velocity, double acceleration) DampedParameter
(String label, LXParameter parameter, LXParameter velocity, double acceleration, double deceleration) DampedParameter
(String label, LXParameter parameter, LXParameter velocity, LXParameter acceleration) DampedParameter
(String label, LXParameter parameter, LXParameter velocity, LXParameter acceleration, LXParameter deceleration) -
Method Summary
Modifier and TypeMethodDescriptionprotected double
computeValue
(double deltaMs) Implementation method to advance the modulator's internal state.setModulus
(boolean hasModulus) Sets whether a modulus value is used.setModulus
(double modulus) Sets a modulus at which values wrap aroundMethods inherited from class heronarts.lx.modulator.LXModulator
autostart, disableAutoStart, getCrash, getCrashStackTrace, getFormatter, getIndex, getOscAddress, getOscPath, getPath, getPolarity, getUnits, getValue, isMappingSource, loop, onSetValue, run, setComponent, setFormatter, setIndex, setMappingSource, setPolarity, setUnits, setValue, setValue, updateValue
Methods inherited from class heronarts.lx.LXRunnableComponent
isRunning, onParameterChanged, onReset, onStart, onStop, onTrigger, postRun, reset, start, stop, toggle, trigger
Methods inherited from class heronarts.lx.LXComponent
addArray, addChild, addInternalParameter, addLegacyInternalParameter, addLegacyParameter, addParameter, addParameter, addParameters, contains, copyParameters, dispose, getCategory, getChild, getComponentName, getComponentName, getComponentName, getDescription, getId, getLabel, getLX, getOscLabel, getParameter, getParameters, getParent, handleOscMessage, hasParameter, isValidOscParameter, load, loadParameters, loadPreset, removeParameter, removeParameter, removeParameter, removeParameter, save, savePreset, setDescription, setParent, toOscQuery, toOscQuery, toOscQuery, toString, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface heronarts.lx.parameter.LXParameter
dispose, getBaseValue, getBaseValuef, getLabel, getParentParameter, getValuef, isMappable, reset, setMappable
Methods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getDescription, getParent, isDescendant
-
Constructor Details
-
DampedParameter
-
DampedParameter
-
DampedParameter
-
DampedParameter
public DampedParameter(LXParameter parameter, double velocity, double acceleration, double deceleration) -
DampedParameter
-
DampedParameter
-
DampedParameter
public DampedParameter(LXParameter parameter, LXParameter velocity, LXParameter acceleration, LXParameter deceleration) -
DampedParameter
-
DampedParameter
-
DampedParameter
public DampedParameter(String label, LXParameter parameter, double velocity, double acceleration, double deceleration) -
DampedParameter
public DampedParameter(String label, LXParameter parameter, LXParameter velocity, double acceleration) -
DampedParameter
public DampedParameter(String label, LXParameter parameter, LXParameter velocity, double acceleration, double deceleration) -
DampedParameter
public DampedParameter(String label, LXParameter parameter, LXParameter velocity, LXParameter acceleration) -
DampedParameter
public DampedParameter(String label, LXParameter parameter, LXParameter velocity, LXParameter acceleration, LXParameter deceleration)
-
-
Method Details
-
setModulus
Sets a modulus at which values wrap around- Parameters:
modulus
- Modulus value- Returns:
- this
-
setModulus
Sets whether a modulus value is used.- Parameters:
hasModulus
- Whether to use modulus- Returns:
- this
-
computeValue
protected double computeValue(double deltaMs) Description copied from class:LXModulator
Implementation method to advance the modulator's internal state. Subclasses must provide and update value appropriately.- Specified by:
computeValue
in classLXModulator
- Parameters:
deltaMs
- Number of milliseconds to advance by- Returns:
- Computed value
-
getParameter
-