public abstract class LXEffect extends LXDeviceComponent implements LXComponent.Renamable, LXOscComponent
| Modifier and Type | Class and Description |
|---|---|
static class |
LXEffect.Placeholder
Placeholder pattern for when a class is missing
|
class |
LXEffect.Profiler |
LXLayeredComponent.BufferedLXComponent.RenamableLXSerializable.Utils| Modifier and Type | Field and Description |
|---|---|
BooleanParameter |
enabled |
protected LinearEnvelope |
enabledDamped |
protected MutableParameter |
enabledDampingAttack |
protected MutableParameter |
enabledDampingRelease |
protected boolean |
hasDamping |
LXEffect.Profiler |
profiler |
controlsExpanded, crashed, DEVICE_CATEGORY_NAME_SORT, DEVICE_VERSION_UNSPECIFIED, KEY_DEVICE_VERSION, modulation, modulationExpandedcolors, layers, palettemodelmodulatorscontrolSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor| Modifier and Type | Method and Description |
|---|---|
LXEffect |
disable()
Disables the effect.
|
void |
dispose()
Invoked when a component is being removed from the system and will no longer be used at all.
|
LXEffect |
enable()
Enables the effect.
|
LXBus |
getBus() |
int |
getIndex()
Gets the index of this effect in the channel FX bus.
|
String |
getPath()
Accessor for the path of this object.
|
boolean |
isEnabled() |
protected boolean |
isRemoteControl(LXListenableNormalizedParameter parameter)
Subclasses may override this to filter out parameters that should not
be controlled by a remote surface
|
protected void |
onDisable() |
protected void |
onEnable() |
void |
onLoop(double deltaMs)
Applies this effect to the current frame
|
protected abstract void |
run(double deltaMs,
double enabledAmount)
Implementation of the effect.
|
LXEffect |
setBus(LXBus bus) |
LXEffect |
setDamping(boolean hasDamping)
Sets whether this effect uses damping or not
|
LXEffect |
setDampingTime(double dampingTimeMs)
Set the amount of damping time used when this effect
is enabled and disabled.
|
protected LXEffect |
setDampingTime(double dampingTimeEnabledMs,
double dampingTimeDisabledMs)
Set the amount of damping time used when this effect
is enabled and disabled.
|
LXEffect |
setIndex(int index)
Called by the engine to assign index on this effect.
|
LXEffect |
toggle()
Toggles the effect.
|
getCategory, getCrash, getCrashStackTrace, getDeviceVersion, getModulationEngine, getRemoteControls, loop, save, setRemoteControlsaddColor, addColor, addLayer, afterLayers, blendColor, blendColor, clearColors, getBuffer, getColor, getColor, getColors, getLayers, removeLayer, setBuffer, setBuffer, setColor, setColor, setColor, setColors, subtractColorgetModel, onModelChanged, setModeladdModulator, addModulator, addModulator, constructProfiler, getModulator, getModulators, moveModulator, removeModulator, startModulatoraddArray, 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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetOscAddress, handleOscMessageaftertouchReceived, controlChangeReceived, noteOffReceived, noteOnReceived, pitchBendReceived, programChangeReceivedget, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameterpublic final BooleanParameter enabled
protected boolean hasDamping
protected final MutableParameter enabledDampingAttack
protected final MutableParameter enabledDampingRelease
protected final LinearEnvelope enabledDamped
public final LXEffect.Profiler profiler
protected LXEffect(LX lx)
public LXEffect setDamping(boolean hasDamping)
hasDamping - If true, damping employed when effect is turned on/offpublic LXEffect setDampingTime(double dampingTimeMs)
dampingTimeMs - Damping time in millisecondsprotected LXEffect setDampingTime(double dampingTimeEnabledMs, double dampingTimeDisabledMs)
dampingTimeEnabledMs - Damping time in milliseconds when effect enableddampingTimeDisabledMs - Damping time in milliseconds when effect disabledprotected boolean isRemoteControl(LXListenableNormalizedParameter parameter)
LXDeviceComponentisRemoteControl in class LXDeviceComponentparameter - Parameter to checkpublic String getPath()
LXComponentgetPath in interface LXPathgetPath in class LXComponentpublic final LXEffect setIndex(int index)
index - Effect indexpublic final int getIndex()
public LXBus getBus()
public final boolean isEnabled()
public final LXEffect toggle()
public final LXEffect enable()
public final LXEffect disable()
protected void onEnable()
protected void onDisable()
public final void onLoop(double deltaMs)
onLoop in class LXLayeredComponentdeltaMs - Milliseconds since last frameprotected abstract void run(double deltaMs,
double enabledAmount)
deltaMs - Number of milliseconds elapsed since last invocationenabledAmount - The amount of the effect to apply, scaled from 0-1public void dispose()
LXComponentsuper.dispose() at the appropriate
time to perform the basic cleanup, which may need to happen either before or after cleaning
up other objects.dispose in class LXLayeredComponentLX library by Mark C. Slee. © 2012-2020