Package heronarts.lx.script
Class ScriptEffect
- All Implemented Interfaces:
LXComponent.Renamable
,LXDeviceComponent.Midi
,LXLoopTask
,LXPath
,LXPresetComponent
,LXSerializable
,LXMidiListener
,LXModulationContainer
,LXOscComponent
,LXParameterListener
-
Nested Class Summary
Nested classes/interfaces inherited from class heronarts.lx.effect.LXEffect
LXEffect.Placeholder, LXEffect.Profiler
Nested classes/interfaces inherited from class heronarts.lx.LXDeviceComponent
LXDeviceComponent.Midi
Nested classes/interfaces inherited from class heronarts.lx.LXComponent
LXComponent.Hidden, LXComponent.Renamable
Nested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils
-
Field Summary
Fields inherited from class heronarts.lx.effect.LXEffect
enabled, enabledDamped, enabledDampingAttack, enabledDampingRelease, hasDamping, profiler
Fields inherited from class heronarts.lx.LXDeviceComponent
controlsExpanded, controlsExpandedAux, controlsExpandedCue, controlSurfaceSemaphore, crashed, DEVICE_CATEGORY_NAME_SORT, DEVICE_VERSION_UNSPECIFIED, KEY_DEVICE_VERSION, midiFilter, modulation, modulationExpanded, remoteControlsChanged, view, viewPriority
Fields inherited from class heronarts.lx.LXLayeredComponent
colors, layers, palette
Fields inherited from class heronarts.lx.LXModelComponent
model
Fields inherited from class heronarts.lx.LXModulatorComponent
modulators
Fields inherited from class heronarts.lx.LXComponent
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, presetFile
Fields inherited from interface heronarts.lx.LXPath
ROOT, ROOT_PREFIX, ROOT_SLASH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
aftertouchReceived
(MidiAftertouch aftertouch) void
boolean
isHiddenControl
(LXParameter parameter) Returns whether this parameter is visible in default remote control or device control UIsvoid
load
(LX lx, JsonObject obj) Loads the LX component.void
noteOffReceived
(MidiNote note) void
noteOnReceived
(MidiNoteOn note) void
onModelChanged
(LXModel model) Subclasses should override to handle changes to which model they are addressing.void
Subclasses are free to override this if desired.void
pitchBendReceived
(MidiPitchBend pitchBend) void
protected void
run
(double deltaMs, double enabledAmount) Implementation of the effect.Methods inherited from class heronarts.lx.effect.LXEffect
disable, dispose, enable, getBus, getIndex, getModelView, getPath, getPattern, isBusEffect, isEnabled, isPatternEffect, onDisable, onEnable, onLoop, setBus, setDamping, setDampingTime, setDampingTime, setIndex, setPattern, toggle
Methods inherited from class heronarts.lx.LXDeviceComponent
addControlSurface, clearCustomRemoteControls, getControlSurfaces, getCrash, getCrashStackTrace, getCustomRemoteControls, getDeviceVersion, getModulationEngine, getRemoteControls, isSnapshotControl, loop, midiDispatch, removeControlSurface, removeCustomRemoteControl, resetRemoteControls, save, setCustomRemoteControls, setRemoteControls
Methods inherited from class heronarts.lx.LXLayeredComponent
addColor, addColor, addLayer, afterLayers, blendColor, blendColor, clearColors, getBuffer, getColor, getColor, getColors, getLayers, removeLayer, setBuffer, setBuffer, setColor, setColor, setColor, setColors, subtractColor
Methods inherited from class heronarts.lx.LXModelComponent
getModel, setModel
Methods inherited from class heronarts.lx.LXModulatorComponent
addModulator, addModulator, addModulator, addModulator, addModulator, constructProfiler, getModulator, getModulators, moveModulator, removeModulator, startModulator
Methods inherited from class heronarts.lx.LXComponent
addArray, addChild, addInternalParameter, addLegacyInternalParameter, addLegacyParameter, addParameter, addParameter, addParameters, contains, copyParameters, getCategory, getChild, getComponentName, getComponentName, getComponentName, getDescription, getId, getLabel, getLX, getOscAddress, getOscLabel, getOscPath, getParameter, getParameters, getParent, handleOscMessage, hasParameter, isValidOscParameter, loadParameters, loadPreset, removeParameter, removeParameter, removeParameter, removeParameter, savePreset, setDescription, setParent, toOscQuery, toOscQuery, toOscQuery, toString, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface heronarts.lx.osc.LXOscComponent
getOscAddress, handleOscMessage
Methods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, isDescendant
Methods inherited from interface heronarts.lx.LXPresetComponent
getPresetClass, postProcessPreset
-
Field Details
-
engine
-
-
Constructor Details
-
ScriptEffect
-
-
Method Details
-
onParameterChanged
Description copied from class:LXComponent
Subclasses are free to override this if desired. It will automatically fire for any listenable parameter that is registered with this component.- Specified by:
onParameterChanged
in interfaceLXParameterListener
- Overrides:
onParameterChanged
in classLXComponent
- Parameters:
p
- Parameter that has a value change
-
onModelChanged
Description copied from class:LXModelComponent
Subclasses should override to handle changes to which model they are addressing. This method will be invoked at the start of the next core loop invocation, after the buffer has been updated.- Overrides:
onModelChanged
in classLXModelComponent
- Parameters:
model
- New model
-
isHiddenControl
Description copied from class:LXDeviceComponent
Returns whether this parameter is visible in default remote control or device control UIs- Overrides:
isHiddenControl
in classLXEffect
- Parameters:
parameter
- Parameter to check- Returns:
- true if this should be hidden by default
-
run
protected void run(double deltaMs, double enabledAmount) Description copied from class:LXEffect
Implementation of the effect. Subclasses need to override this to implement their functionality. -
load
Description copied from class:LXComponent
Loads the LX component. Restores the ID of the component, as well as its internal and user-facing parameters. Any explicitly registered children will be automatically loaded, so long as they are direct descendants. Dynamic arrays will not be automatically loaded, this is left to subclasses to implement.- Specified by:
load
in interfaceLXSerializable
- Overrides:
load
in classLXDeviceComponent
- Parameters:
lx
- LX instanceobj
- Object to deserialize
-
noteOnReceived
- Specified by:
noteOnReceived
in interfaceLXMidiListener
-
noteOffReceived
- Specified by:
noteOffReceived
in interfaceLXMidiListener
-
controlChangeReceived
- Specified by:
controlChangeReceived
in interfaceLXMidiListener
-
programChangeReceived
- Specified by:
programChangeReceived
in interfaceLXMidiListener
-
pitchBendReceived
- Specified by:
pitchBendReceived
in interfaceLXMidiListener
-
aftertouchReceived
- Specified by:
aftertouchReceived
in interfaceLXMidiListener
-