public abstract class LXModulator extends LXRunnableComponent implements LXComponent.Renamable, LXParameter
LXComponent.Placeholder, LXComponent.RenamableLXParameter.Formatter, LXParameter.Polarity, LXParameter.UnitsLXSerializable.UtilsrunMs, running, triggercontrolSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor| Modifier | Constructor and Description |
|---|---|
protected |
LXModulator(String label)
Utility default constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract double |
computeValue(double deltaMs)
Implementation method to advance the modulator's internal state.
|
String |
getDescription()
Returns a contextual help message explaining the purpose of this parameter to the user, or null if
none is available.
|
LXParameter.Formatter |
getFormatter()
Gets the formatter to be used for printing this parameter's value
|
int |
getIndex()
Returns the ordering index of this modulator in its parent
|
String |
getOscAddress()
Gets the OSC address for this object
|
String |
getOscPath()
Accessor for this component's OSC path relative to its parent.
|
String |
getPath()
Accessor for the path of this object.
|
LXParameter.Polarity |
getPolarity()
Gets the polarity of this parameter.
|
LXParameter.Units |
getUnits()
Gets the unit format that this parameter's value stores.
|
double |
getValue()
Retrieves the current value of the modulator in full precision
|
float |
getValuef()
Retrieves the current value of the modulator in floating point precision.
|
protected void |
onSetValue(double value)
Subclasses may override when actions are necessary on value change.
|
protected void |
run(double deltaMs)
Applies updates to the modulator for the specified number of milliseconds.
|
LXParameter |
setComponent(LXComponent component,
String path)
Sets the component that owns this parameter
|
LXParameter |
setDescription(String description) |
LXModulator |
setFormatter(LXParameter.Formatter formatter) |
LXModulator |
setIndex(int index)
Sets the index of this modulator in its parent list
|
LXModulator |
setPolarity(LXParameter.Polarity polarity) |
LXModulator |
setUnits(LXParameter.Units units) |
LXModulator |
setValue(double value)
Set the modulator to a certain value in its cycle.
|
protected LXModulator |
setValue(double value,
boolean notify) |
protected LXModulator |
updateValue(double value)
Helper for subclasses to update value in situations where it needs to be
recomputed.
|
isRunning, loop, onParameterChanged, onReset, onStart, onStop, reset, start, stop, toggle, triggeraddArray, addChild, addInternalParameter, addParameter, addParameter, contains, copyParameters, dispose, getChild, getComponentName, getComponentName, getComponentName, getId, getLabel, getLX, getOscLabel, getParameter, getParameters, getParent, handleOscMessage, load, loadParameters, removeParameter, removeParameter, save, saveParameters, setParent, toString, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdispose, getLabel, isMappable, reset, setMappableget, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter, getParentprotected LXModulator(String label)
label - Labelpublic LXModulator setIndex(int index)
index - Modulator indexpublic int getIndex()
public String getOscPath()
LXComponentLXComponent.getPath(), but certain subclasses may modify this
to support different types of OSC paths that aren't required to match the LX
hierarchy.getOscPath in class LXComponentpublic String getOscAddress()
LXComponentgetOscAddress in class LXComponentpublic LXParameter setDescription(String description)
public String getDescription()
LXParametergetDescription in interface LXParameterpublic LXParameter setComponent(LXComponent component, String path)
LXParametersetComponent in interface LXParametercomponent - Componentpath - Path name for parameterpublic String getPath()
LXComponentgetPath in interface LXPathgetPath in class LXComponentpublic LXModulator setFormatter(LXParameter.Formatter formatter)
public LXParameter.Formatter getFormatter()
LXParametergetFormatter in interface LXParameterpublic LXModulator setUnits(LXParameter.Units units)
public LXParameter.Units getUnits()
LXParametergetUnits in interface LXParameterpublic LXModulator setPolarity(LXParameter.Polarity polarity)
public LXParameter.Polarity getPolarity()
LXParametergetPolarity in interface LXParameterpublic final double getValue()
getValue in interface LXParameterpublic final float getValuef()
getValuef in interface LXParameterpublic final LXModulator setValue(double value)
setValue in interface LXParametervalue - The value to applyprotected final LXModulator setValue(double value, boolean notify)
protected void onSetValue(double value)
value - New valueprotected final LXModulator updateValue(double value)
value - Value for modulatorprotected final void run(double deltaMs)
run in class LXRunnableComponentdeltaMs - Milliseconds to advance byprotected abstract double computeValue(double deltaMs)
deltaMs - Number of milliseconds to advance byLX library by Mark C. Slee. © 2012-2020