public abstract class LXPattern extends LXDeviceComponent implements LXComponent.Renamable, LXLayeredComponent.Buffered, LXOscComponent
Modifier and Type | Class and Description |
---|---|
static class |
LXPattern.Placeholder
Placeholder pattern for when a class is missing
|
class |
LXPattern.Profiler |
LXLayeredComponent.Buffered
LXComponent.Renamable
LXSerializable.Utils
Modifier and Type | Field and Description |
---|---|
BooleanParameter |
autoCycleEligible |
LXPattern.Profiler |
profiler |
protected double |
runMs |
controlsExpanded, crashed, DEVICE_CATEGORY_NAME_SORT, DEVICE_VERSION_UNSPECIFIED, KEY_DEVICE_VERSION, modulation, modulationExpanded
colors, layers, palette
model
modulators
controlSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor
Modifier and Type | Method and Description |
---|---|
LXPattern |
clearInterval()
Clears a timer interval set to this pattern.
|
LXChannel |
getChannel()
Gets the channel that this pattern is loaded in.
|
int |
getIndex() |
String |
getPath()
Accessor for the path of this object.
|
boolean |
hasInterval()
Tests whether there is an interval for this pattern.
|
boolean |
isAutoCycleEligible()
Determines whether this pattern is eligible to be run at the moment.
|
boolean |
isInInterval()
Tests whether this pattern is in an eligible interval.
|
void |
onActive()
Subclasses may override this method.
|
void |
onInactive()
Subclasses may override this method.
|
protected void |
onLoop(double deltaMs) |
void |
onTransitionEnd()
Subclasses may override this method.
|
void |
onTransitionStart()
Subclasses may override this method.
|
protected abstract void |
run(double deltaMs)
Main pattern loop function.
|
LXPattern |
setAutoCycleEligible(boolean eligible)
Sets whether this pattern is eligible for automatic selection.
|
LXPattern |
setChannel(LXChannel channel)
Called by the engine when pattern is loaded onto a channel.
|
void |
setIndex(int index) |
LXPattern |
setInterval(int begin,
int end)
Set an interval during which this pattern is allowed to run.
|
LXPattern |
toggleAutoCycleEligible()
Toggles the eligibility state of this pattern.
|
getCategory, getCrash, getCrashStackTrace, getDeviceVersion, getModulationEngine, getRemoteControls, isRemoteControl, loop, save, setRemoteControls
addColor, addColor, addLayer, afterLayers, blendColor, blendColor, clearColors, dispose, getBuffer, getColor, getColor, getColors, getLayers, removeLayer, setBuffer, setBuffer, setColor, setColor, setColor, setColors, subtractColor
getModel, onModelChanged, setModel
addModulator, addModulator, addModulator, constructProfiler, getModulator, getModulators, moveModulator, removeModulator, startModulator
addArray, addChild, addInternalParameter, addParameter, addParameter, contains, copyParameters, getChild, getComponentName, getComponentName, getComponentName, getId, getLabel, getLX, getOscAddress, getOscLabel, getOscPath, getParameter, getParameters, getParent, handleOscMessage, load, loadParameters, onParameterChanged, removeParameter, removeParameter, saveParameters, setParent, toString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getOscAddress, handleOscMessage
aftertouchReceived, controlChangeReceived, noteOffReceived, noteOnReceived, pitchBendReceived, programChangeReceived
get, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter
public final BooleanParameter autoCycleEligible
protected double runMs
public final LXPattern.Profiler profiler
protected LXPattern(LX lx)
public String getPath()
LXComponent
getPath
in interface LXPath
getPath
in class LXComponent
public void setIndex(int index)
public int getIndex()
public final LXChannel getChannel()
public final LXPattern setChannel(LXChannel channel)
channel
- Channel pattern is loaded ontopublic LXPattern setInterval(int begin, int end)
begin
- Interval start timeend
- Interval end timepublic LXPattern clearInterval()
public final boolean hasInterval()
public final boolean isInInterval()
public final LXPattern setAutoCycleEligible(boolean eligible)
eligible
- Whether eligible for auto-rotationpublic final LXPattern toggleAutoCycleEligible()
public final boolean isAutoCycleEligible()
protected final void onLoop(double deltaMs)
onLoop
in class LXLayeredComponent
protected abstract void run(double deltaMs)
deltaMs
- Number of milliseconds elapsed since last invocationpublic void onActive()
public void onInactive()
public void onTransitionStart()
public void onTransitionEnd()
LX library by Mark C. Slee. © 2012-2020