Package heronarts.lx.modulator
Class StepModulator
java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.LXRunnableComponent
heronarts.lx.modulator.LXModulator
heronarts.lx.modulator.LXPeriodicModulator
heronarts.lx.modulator.StepModulator
- All Implemented Interfaces:
LXComponent.Renamable,LXLoopTask,LXPath,LXSerializable,LXModulator.TriggerButton,LXParameter,LXParameterListener
- Direct Known Subclasses:
Stepper,StepSequencer
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class heronarts.lx.modulator.LXModulator
LXModulator.Device, LXModulator.Global, LXModulator.Placeholder, LXModulator.ResetButton, LXModulator.TriggerButtonNested classes/interfaces inherited from class heronarts.lx.LXComponent
LXComponent.Author, LXComponent.Description, LXComponent.Hidden, LXComponent.Name, LXComponent.PluginRequired, LXComponent.Renamable, LXComponent.TagsNested classes/interfaces inherited from interface heronarts.lx.parameter.LXParameter
LXParameter.Collection, LXParameter.Formatter, LXParameter.Monitor, LXParameter.MultiMonitor, LXParameter.Polarity, LXParameter.UnitsNested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal BooleanParameter[]static final intfinal DiscreteParameterprotected intfinal CompoundParameterfinal TriggerParameterfinal TriggerParameterFields inherited from class heronarts.lx.modulator.LXPeriodicModulator
basisIn, looping, manualBasis, tempoDivision, tempoLock, tempoSyncFields inherited from class heronarts.lx.modulator.LXModulator
crashed, midiFilter, midiSourceFields inherited from class heronarts.lx.LXRunnableComponent
runMs, running, triggerFields inherited from class heronarts.lx.LXComponent
childArrays, 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, presetFileFields inherited from interface heronarts.lx.LXPath
DEFAULT_SEPARATOR, ROOT, ROOT_PREFIX, ROOT_SLASH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected doublecomputeBasis(double basis, double value) Implementation method to compute the appropriate basis for a modulator given its current basis and value.protected final doublecomputeValue(double deltaMs, double basis) Implementation method to compute the value of a modulator given its basis.protected doublegetStepValue(double deltaMs, double basis) voidSubclasses are free to override this if desired.protected voidonStep(boolean trigger) Methods inherited from class heronarts.lx.modulator.LXPeriodicModulator
computeValue, disableAutoReset, finished, getBasis, getBasisf, getPeriod, getPeriodf, load, loop, loop, numLoops, onReset, onSetValue, randomBasis, save, setBasis, setLooping, setPeriod, setPeriod, updateBasisMethods inherited from class heronarts.lx.modulator.LXModulator
autostart, disableAutoStart, getCrash, getCrashStackTrace, getFormatter, getIndex, getOscAddress, getOscPath, getPath, getPolarity, getUnits, getValue, isMappingSource, run, setComponent, setFormatter, setIndex, setMappingSource, setPolarity, setUnits, setValue, setValue, updateValueMethods inherited from class heronarts.lx.LXRunnableComponent
isRunning, onStart, onStop, onTrigger, postRun, reset, start, stop, toggle, triggerMethods inherited from class heronarts.lx.LXComponent
addArray, addChild, addInternalParameter, addInternalParameters, addLegacyInternalParameter, addLegacyParameter, addParameter, addParameter, addParameters, assertDisposed, contains, copyParameters, dispose, getCategory, getChild, getComponentDescription, getComponentName, getComponentName, getComponentName, getDescription, getId, getLabel, getLX, getOscLabel, getParameter, getParameters, getParent, handleOscMessage, hasParameter, isSnapshotControl, isValidOscParameter, loadParameters, loadPreset, removeParameter, removeParameter, removeParameter, removeParameter, savePreset, setDescription, setParent, toOscQuery, toOscQuery, toOscQuery, toString, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface heronarts.lx.parameter.LXParameter
dispose, getBaseValue, getBaseValuef, getLabel, getParentParameter, getValuef, isMappable, reset, setMappableMethods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getDescription, getParent, isDescendant
-
Field Details
-
MAX_STEPS
public static final int MAX_STEPS- See Also:
-
numSteps
-
triggerMode
-
stepTimeMs
-
triggerIn
-
triggerOut
-
activeStep
-
step
protected int step
-
-
Constructor Details
-
StepModulator
-
-
Method Details
-
onParameterChanged
Description copied from class:LXComponentSubclasses are free to override this if desired. It will automatically fire for any listenable parameter that is registered with this component.- Specified by:
onParameterChangedin interfaceLXParameterListener- Overrides:
onParameterChangedin classLXPeriodicModulator- Parameters:
p- Parameter that has a value change
-
computeValue
protected final double computeValue(double deltaMs, double basis) Description copied from class:LXPeriodicModulatorImplementation method to compute the value of a modulator given its basis.- Specified by:
computeValuein classLXPeriodicModulator- Parameters:
deltaMs- Milliseconds elapsedbasis- Basis of the modulator- Returns:
- Value of modulator
-
getStepValue
protected double getStepValue(double deltaMs, double basis) -
computeBasis
protected double computeBasis(double basis, double value) Description copied from class:LXPeriodicModulatorImplementation method to compute the appropriate basis for a modulator given its current basis and value.- Specified by:
computeBasisin classLXPeriodicModulator- Parameters:
basis- Last basis of modulatorvalue- Current value of modulator- Returns:
- Basis of modulator
-
onStep
protected void onStep(boolean trigger)
-