public class Click extends LXPeriodicModulator
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 |
---|
Click(double periodMs) |
Click(LXParameter periodMs) |
Click(String label,
double periodMs) |
Click(String label,
LXParameter periodMs) |
Modifier and Type | Method and Description |
---|---|
boolean |
click()
Helper to conditionalize logic based on the click.
|
protected double |
computeBasis(double basis,
double value)
Implementation method to compute the appropriate basis for a modulator
given its current basis and value.
|
protected double |
computeValue(double deltaMs,
double basis)
Implementation method to compute the value of a modulator given its basis.
|
LXModulator |
fire()
Sets the value of the click to 1, so that code querying it in this frame of
execution sees it as active.
|
void |
loop(double deltaMs) |
computeValue, finished, getBasis, getBasisf, getPeriod, getPeriodf, load, loop, onParameterChanged, onReset, onSetValue, 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, getLabel, isMappable, reset, setMappable
get, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter, getParent
public Click(double periodMs)
public Click(LXParameter periodMs)
public Click(String label, double periodMs)
public Click(String label, LXParameter periodMs)
public void loop(double deltaMs)
loop
in interface LXLoopTask
loop
in class LXPeriodicModulator
public LXModulator fire()
public boolean click()
if (clickInstance.click()) { // perform periodic operation }
protected double computeValue(double deltaMs, double basis)
LXPeriodicModulator
computeValue
in class LXPeriodicModulator
deltaMs
- Milliseconds elapsedbasis
- Basis of the modulatorprotected double computeBasis(double basis, double value)
LXPeriodicModulator
computeBasis
in class LXPeriodicModulator
basis
- Last basis of modulatorvalue
- Current value of modulatorLX library by Mark C. Slee. © 2012-2020