public class Accelerator extends LXModulator
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| Constructor and Description |
|---|
Accelerator(double initValue,
double initVelocity,
double acceleration) |
Accelerator(double initValue,
double initVelocity,
LXParameter acceleration) |
Accelerator(double initValue,
LXParameter initVelocity,
LXParameter acceleration) |
Accelerator(String label,
double initValue,
double initVelocity,
double acceleration) |
Accelerator(String label,
double initValue,
double initVelocity,
LXParameter acceleration) |
Accelerator(String label,
double initValue,
LXParameter initVelocity,
LXParameter acceleration) |
| Modifier and Type | Method and Description |
|---|---|
protected double |
computeValue(double deltaMs)
Implementation method to advance the modulator's internal state.
|
double |
getAcceleration() |
float |
getAccelerationf() |
double |
getVelocity() |
float |
getVelocityf() |
protected void |
onReset()
Optional subclass method when reset happens.
|
Accelerator |
setAcceleration(double acceleration) |
Accelerator |
setAcceleration(LXParameter acceleration)
Updates the acceleration.
|
Accelerator |
setInitVelocity(double initVelocity)
Sets the initial velocity to a fixed value
|
Accelerator |
setInitVelocity(LXParameter initVelocity)
Sets initial velocity of the Accelerator
|
Accelerator |
setSpeed(double initVelocity,
double acceleration) |
Accelerator |
setSpeed(LXParameter initVelocity,
LXParameter acceleration)
Sets both the velocity and acceleration of the modulator.
|
Accelerator |
setVelocity(double velocity)
Updates the current velocity.
|
getDescription, getFormatter, getIndex, getOscAddress, getOscPath, getPath, getPolarity, getUnits, getValue, getValuef, onSetValue, run, setComponent, setDescription, setFormatter, setIndex, setPolarity, setUnits, setValue, setValue, updateValueisRunning, loop, onParameterChanged, 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, getParentpublic Accelerator(double initValue,
double initVelocity,
double acceleration)
public Accelerator(double initValue,
double initVelocity,
LXParameter acceleration)
public Accelerator(double initValue,
LXParameter initVelocity,
LXParameter acceleration)
public Accelerator(String label, double initValue, double initVelocity, double acceleration)
public Accelerator(String label, double initValue, double initVelocity, LXParameter acceleration)
public Accelerator(String label, double initValue, LXParameter initVelocity, LXParameter acceleration)
protected void onReset()
LXRunnableComponentonReset in class LXRunnableComponentpublic double getVelocity()
public float getVelocityf()
public double getAcceleration()
public float getAccelerationf()
public Accelerator setSpeed(double initVelocity, double acceleration)
public Accelerator setSpeed(LXParameter initVelocity, LXParameter acceleration)
initVelocity - New velocityacceleration - Accelerationpublic Accelerator setVelocity(double velocity)
velocity - New velocitypublic Accelerator setInitVelocity(double initVelocity)
initVelocity - Fixed initial velocity valuepublic Accelerator setInitVelocity(LXParameter initVelocity)
initVelocity - Initial velocity parameterpublic Accelerator setAcceleration(double acceleration)
public Accelerator setAcceleration(LXParameter acceleration)
acceleration - New accelerationprotected double computeValue(double deltaMs)
LXModulatorcomputeValue in class LXModulatordeltaMs - Number of milliseconds to advance byLX library by Mark C. Slee. © 2012-2020