public class LXSnapshotEngine extends LXComponent implements LXOscComponent, LXLoopTask
| Modifier and Type | Class and Description |
|---|---|
static class |
LXSnapshotEngine.AutoCycleMode |
static class |
LXSnapshotEngine.ChannelMode |
static interface |
LXSnapshotEngine.Listener |
static class |
LXSnapshotEngine.MissingChannelMode |
LXComponent.Placeholder, LXComponent.RenamableLXSerializable.Utils| Modifier and Type | Field and Description |
|---|---|
DiscreteParameter |
autoCycleCursor |
BooleanParameter |
autoCycleEnabled
Whether auto pattern transition is enabled on this channel
|
EnumParameter<LXSnapshotEngine.AutoCycleMode> |
autoCycleMode
Auto-cycle to a random snapshot, not the next one
|
BoundedParameter |
autoCycleTimeSecs
Time in seconds after which transition thru the pattern set is automatically initiated.
|
EnumParameter<LXSnapshotEngine.ChannelMode> |
channelMode |
EnumParameter<LXSnapshotEngine.MissingChannelMode> |
missingChannelMode |
static String |
PATH_SNAPSHOT |
BooleanParameter |
recallEffect |
BooleanParameter |
recallMixer |
BooleanParameter |
recallModulation |
BooleanParameter |
recallPattern |
List<LXSnapshot> |
snapshots
Public read-only view of all the snapshots.
|
BooleanParameter |
transitionEnabled |
BoundedParameter |
transitionTimeSecs
Amount of time taken in seconds to transition into a new snapshot view
|
BooleanParameter |
triggerSnapshotCycle |
controlSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor| Constructor and Description |
|---|
LXSnapshotEngine(LX lx) |
| Modifier and Type | Method and Description |
|---|---|
LXSnapshotEngine |
addListener(LXSnapshotEngine.Listener listener) |
LXSnapshot |
addSnapshot()
Adds a new snapshot that takes the current state of the program.
|
LXSnapshotEngine |
addSnapshot(LXSnapshot snapshot)
Adds a snapshot to the engine.
|
LXSnapshotEngine |
addSnapshot(LXSnapshot snapshot,
int index)
Adds a snapshot to the engine.
|
void |
clear()
Clears all snapshots from the engine.
|
List<LXSnapshot.View> |
findSnapshotViews(LXComponent component)
Find all snapshot views that involve the selected component.
|
double |
getAutoCycleProgress() |
double |
getTransitionProgress() |
boolean |
handleOscMessage(OscMessage message,
String[] parts,
int index)
Handles an OSC message sent to this component.
|
void |
load(LX lx,
JsonObject obj)
Loads the LX component.
|
void |
loop(double deltaMs) |
LXSnapshotEngine |
moveSnapshot(LXSnapshot snapshot,
int index)
Moves a snapshot to a new order in the engine snapshot list
|
void |
onParameterChanged(LXParameter parameter)
Subclasses are free to override this if desired.
|
void |
recall(LXSnapshot snapshot)
Recall this snapshot, apply all of its values
|
void |
recall(LXSnapshot snapshot,
List<LXCommand> commands)
Recall this snapshot, and populate an array of commands which
would need to be undone by this operation.
|
LXSnapshotEngine |
removeListener(LXSnapshotEngine.Listener listener) |
LXSnapshotEngine |
removeSnapshot(LXSnapshot snapshot)
Removes a snapshot from the engine
|
void |
removeSnapshotViews(LXComponent component)
Remove all snapshot views that reference the given component
|
void |
save(LX lx,
JsonObject obj)
Serializes the LX component.
|
addArray, addChild, addInternalParameter, addParameter, addParameter, contains, copyParameters, dispose, getChild, getComponentName, getComponentName, getComponentName, getId, getLabel, getLX, getOscAddress, getOscLabel, getOscPath, getParameter, getParameters, getParent, getPath, loadParameters, removeParameter, removeParameter, saveParameters, setParent, toString, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetOscAddressget, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameterpublic final List<LXSnapshot> snapshots
public final BooleanParameter recallMixer
public final BooleanParameter recallPattern
public final BooleanParameter recallEffect
public final BooleanParameter recallModulation
public final EnumParameter<LXSnapshotEngine.MissingChannelMode> missingChannelMode
public final EnumParameter<LXSnapshotEngine.ChannelMode> channelMode
public final BooleanParameter autoCycleEnabled
public final EnumParameter<LXSnapshotEngine.AutoCycleMode> autoCycleMode
public final BoundedParameter autoCycleTimeSecs
public final BoundedParameter transitionTimeSecs
public final BooleanParameter transitionEnabled
public final BooleanParameter triggerSnapshotCycle
public final DiscreteParameter autoCycleCursor
public static final String PATH_SNAPSHOT
public LXSnapshotEngine(LX lx)
public void onParameterChanged(LXParameter parameter)
LXComponentonParameterChanged in interface LXParameterListeneronParameterChanged in class LXComponentparameter - Parameter that has a value changepublic LXSnapshotEngine addListener(LXSnapshotEngine.Listener listener)
public LXSnapshotEngine removeListener(LXSnapshotEngine.Listener listener)
public LXSnapshot addSnapshot()
public LXSnapshotEngine addSnapshot(LXSnapshot snapshot)
snapshot - Snapshot to addpublic LXSnapshotEngine addSnapshot(LXSnapshot snapshot, int index)
snapshot - Snapshot to addindex - Index to add atpublic LXSnapshotEngine removeSnapshot(LXSnapshot snapshot)
snapshot - Snapshot to removepublic LXSnapshotEngine moveSnapshot(LXSnapshot snapshot, int index)
snapshot - Snapshotindex - New position to occupypublic void recall(LXSnapshot snapshot)
snapshot - The snapshot to recallpublic void recall(LXSnapshot snapshot, List<LXCommand> commands)
snapshot - Snapshot to recallcommands - Array to populate with all the commands processedpublic double getTransitionProgress()
public double getAutoCycleProgress()
public void loop(double deltaMs)
loop in interface LXLoopTaskpublic void clear()
public boolean handleOscMessage(OscMessage message, String[] parts, int index)
LXComponenthandleOscMessage in interface LXOscComponenthandleOscMessage in class LXComponentmessage - 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 List<LXSnapshot.View> findSnapshotViews(LXComponent component)
component - Componentpublic void removeSnapshotViews(LXComponent component)
component - Component that is referencedpublic void save(LX lx, JsonObject obj)
LXComponentsuper.save(lx, obj)
at the appropriate time.save in interface LXSerializablesave in class LXComponentlx - LX instanceobj - Object to serialize intopublic void load(LX lx, JsonObject obj)
LXComponentload in interface LXSerializableload in class LXComponentlx - LX instanceobj - Object to deserializeLX library by Mark C. Slee. © 2012-2020