public class LXModulationEngine extends LXModulatorComponent implements LXOscComponent
Modifier and Type | Class and Description |
---|---|
static interface |
LXModulationEngine.Listener |
LXModulatorComponent.Profiler
LXComponent.Placeholder, LXComponent.Renamable
LXSerializable.Utils
Modifier and Type | Field and Description |
---|---|
List<LXCompoundModulation> |
modulations |
List<LXTriggerModulation> |
triggers |
modulators, profiler
controlSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor
Constructor and Description |
---|
LXModulationEngine(LX lx) |
Modifier and Type | Method and Description |
---|---|
LXModulationEngine |
addListener(LXModulationEngine.Listener listener) |
LXModulationEngine |
addModulation(LXCompoundModulation modulation) |
<T extends LXModulator> |
addModulator(T modulator,
int index) |
LXModulationEngine |
addTrigger(LXTriggerModulation trigger) |
void |
clear() |
void |
dispose()
Invoked when a component is being removed from the system and will no longer be used at all.
|
<T extends LXParameterModulation> |
findModulations(LXComponent component,
List<T> modulations)
Compiles all modulations that act upon any parameter or subcomponent of the given
component, whether as source or target.
|
String |
getLabel()
Accessor for the user-facing label of this component.
|
int |
getModulatorCount(Class<? extends LXModulator> cls) |
boolean |
handleOscMessage(OscMessage message,
String[] parts,
int index)
Handles an OSC message sent to this component.
|
boolean |
isValidTarget(CompoundParameter target) |
void |
load(LX lx,
JsonObject obj)
Loads the LX component.
|
<T extends LXModulator> |
moveModulator(T modulator,
int index) |
LXModulationEngine |
removeListener(LXModulationEngine.Listener listener) |
LXModulationEngine |
removeModulation(LXCompoundModulation modulation) |
LXModulationEngine |
removeModulations(LXComponent component) |
<T extends LXModulator> |
removeModulator(T modulator) |
LXModulationEngine |
removeTrigger(LXTriggerModulation trigger) |
void |
save(LX lx,
JsonObject obj)
Serializes the LX component.
|
addModulator, addModulator, constructProfiler, getModulator, getModulators, loop, startModulator
addArray, addChild, addInternalParameter, addParameter, addParameter, contains, copyParameters, getChild, getComponentName, getComponentName, getComponentName, getId, getLX, getOscAddress, getOscLabel, getOscPath, getParameter, getParameters, getParent, getPath, loadParameters, onParameterChanged, removeParameter, removeParameter, saveParameters, setParent, toString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getOscAddress
get, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter
public final List<LXCompoundModulation> modulations
public final List<LXTriggerModulation> triggers
public LXModulationEngine(LX lx)
public boolean isValidTarget(CompoundParameter target)
public boolean handleOscMessage(OscMessage message, String[] parts, int index)
LXComponent
handleOscMessage
in interface LXOscComponent
handleOscMessage
in class LXComponent
message
- Full OSC message objectparts
- The OSC address pattern, broken into an array of partsindex
- Which index into the parts array corresponds to this component's childrentrue
if the OSC message was handled and should be considered consumed, false
otherwisepublic LXModulationEngine addListener(LXModulationEngine.Listener listener)
public LXModulationEngine removeListener(LXModulationEngine.Listener listener)
public LXModulationEngine addModulation(LXCompoundModulation modulation)
public LXModulationEngine removeModulation(LXCompoundModulation modulation)
public LXModulationEngine addTrigger(LXTriggerModulation trigger)
public LXModulationEngine removeTrigger(LXTriggerModulation trigger)
public <T extends LXParameterModulation> List<T> findModulations(LXComponent component, List<T> modulations)
T
- type of parameter modulation, could be compound or triggercomponent
- Componentmodulations
- List of modulations that we're checking withinpublic LXModulationEngine removeModulations(LXComponent component)
public <T extends LXModulator> T addModulator(T modulator, int index)
addModulator
in class LXModulatorComponent
public <T extends LXModulator> T removeModulator(T modulator)
removeModulator
in class LXModulatorComponent
public <T extends LXModulator> T moveModulator(T modulator, int index)
moveModulator
in class LXModulatorComponent
public int getModulatorCount(Class<? extends LXModulator> cls)
public void dispose()
LXComponent
super.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 LXModulatorComponent
public String getLabel()
LXComponent
LXComponent.Renamable
interface may allow the user to change this value.getLabel
in interface LXPath
getLabel
in class LXComponent
public void save(LX lx, JsonObject obj)
LXComponent
super.save(lx, obj)
at the appropriate time.save
in interface LXSerializable
save
in class LXComponent
lx
- LX instanceobj
- Object to serialize intopublic void clear()
public void load(LX lx, JsonObject obj)
LXComponent
load
in interface LXSerializable
load
in class LXComponent
lx
- LX instanceobj
- Object to deserializeLX library by Mark C. Slee. © 2012-2020