public class VariableLFO extends LXRangeModulator implements LXWaveshape, LXOscComponent
Modifier and Type | Class and Description |
---|---|
static class |
VariableLFO.ClockMode |
LXComponent.Placeholder, LXComponent.Renamable
LXParameter.Formatter, LXParameter.Polarity, LXParameter.Units
LXSerializable.Utils
Modifier and Type | Field and Description |
---|---|
CompoundParameter |
bias |
EnumParameter<VariableLFO.ClockMode> |
clockMode |
CompoundParameter |
exp |
CompoundParameter |
periodCustom
Period of the waveform, in ms
|
CompoundParameter |
periodFast |
CompoundParameter |
periodSlow |
CompoundParameter |
phase |
CompoundParameter |
shape |
CompoundParameter |
skew |
ObjectParameter<LXWaveshape> |
waveshape
Parameter of
LXWaveshape objects that select the wave shape used by this LFO. |
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 |
---|
VariableLFO() |
VariableLFO(String label) |
VariableLFO(String label,
LXWaveshape[] waveshapes) |
VariableLFO(String label,
LXWaveshape[] waveshapes,
CompoundParameter period)
Constructs a VariableLFO with a custom list of waveshapes
|
Modifier and Type | Method and Description |
---|---|
double |
compute(double basis) |
double |
computeBase(double basis) |
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.
|
LXWaveshape |
getWaveshape() |
double |
invert(double value,
double basisHint) |
void |
onParameterChanged(LXParameter p)
Subclasses are free to override this if desired.
|
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, 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
getOscAddress, handleOscMessage
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 final ObjectParameter<LXWaveshape> waveshape
LXWaveshape
objects that select the wave shape used by this LFO.
Default options are the waveshapes predefined in LXWaveshape
, but you can pass your own.public final CompoundParameter periodCustom
public final EnumParameter<VariableLFO.ClockMode> clockMode
public final CompoundParameter periodFast
public final CompoundParameter periodSlow
public final CompoundParameter skew
public final CompoundParameter shape
public final CompoundParameter exp
public final CompoundParameter bias
public final CompoundParameter phase
public VariableLFO()
public VariableLFO(String label)
public VariableLFO(String label, LXWaveshape[] waveshapes)
public VariableLFO(String label, LXWaveshape[] waveshapes, CompoundParameter period)
label
- LFO labelwaveshapes
- Optional list of custom LXWaveshape
. If null, will use predefined ones
in LXWaveshape
period
- Optional. Parameter that supplies custom waveform period, in ms. Default goes 100-60000ms.public void onParameterChanged(LXParameter p)
LXComponent
onParameterChanged
in interface LXParameterListener
onParameterChanged
in class LXPeriodicModulator
p
- Parameter that has a value changepublic LXWaveshape getWaveshape()
protected final double computeNormalizedValue(double deltaMs, double basis)
LXRangeModulator
computeNormalizedValue
in class LXRangeModulator
deltaMs
- Milliseconds elapsedbasis
- Basis of modulatorprotected final double computeNormalizedBasis(double basis, double normalizedValue)
LXRangeModulator
computeNormalizedBasis
in class LXRangeModulator
basis
- Modulator basisnormalizedValue
- A normalize value from 0 to 1public double compute(double basis)
compute
in interface LXWaveshape
public double computeBase(double basis)
public double invert(double value, double basisHint)
invert
in interface LXWaveshape
LX library by Mark C. Slee. © 2012-2020