Package heronarts.lx.clip
Class LXClipEngine
java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.clip.LXClipEngine
- All Implemented Interfaces:
LXPath
,LXSerializable
,LXOscComponent
,LXParameterListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
static class
static enum
Nested classes/interfaces inherited from class heronarts.lx.LXComponent
LXComponent.Description, LXComponent.Hidden, LXComponent.Name, LXComponent.Placeholder, LXComponent.PluginRequired, LXComponent.Renamable
Nested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal BooleanParameter
final BooleanParameter
final MutableParameter
A semaphore used to keep count of how many remote control surfaces may be controlling this component.final LXClipEngine.Grid
final DiscreteParameter
final BooleanParameter
final DiscreteParameter
static final int
static final int
final DiscreteParameter
final DiscreteParameter
final BooleanParameter
final BoundedParameter
Amount of time taken in seconds to transition into a new snapshot viewfinal EnumParameter
<Cursor.TimeBase> Fields inherited from class heronarts.lx.LXComponent
childArrays, 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
DEFAULT_SEPARATOR, ROOT, ROOT_PREFIX, ROOT_SLASH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddControlSurface
(MixerSurface surface) void
dispose()
Invoked when a component is being removed from the system and will no longer be used at all.int
int
getPatternScene
(int index) Get the boolean parameter that launches a pattern scenegetScene
(int index) Get the boolean parameter that launches a scenelaunchPatternScene
(int index) Launches the pattern scene at given index, subject to launch quantizationlaunchScene
(int index) Launches the scene at given index, subject to launch quantizationvoid
load
(LX lx, JsonObject obj) Loads the LX component.void
Subclasses are free to override this if desired.removeControlSurface
(MixerSurface surface) setFocusedClip
(LXClip clip) Stops all running clipsCycle the patterns on every eligible channeltriggerPatternScene
(int index) Triggers all patterns at the given indextriggerScene
(int index) Triggers the scene at given index immediatelyvoid
Methods inherited from class heronarts.lx.LXComponent
addArray, addChild, addInternalParameter, addLegacyInternalParameter, addLegacyParameter, addParameter, addParameter, addParameters, assertDisposed, contains, copyParameters, getCategory, getChild, getComponentDescription, getComponentName, getComponentName, getComponentName, getDescription, getId, getLabel, getLX, getOscAddress, getOscLabel, getOscPath, getParameter, getParameters, getParent, getPath, handleOscMessage, hasParameter, isValidOscParameter, loadParameters, loadPreset, removeParameter, removeParameter, removeParameter, removeParameter, save, 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, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, isDescendant
-
Field Details
-
MIN_SCENES
public static final int MIN_SCENES- See Also:
-
MAX_SCENES
public static final int MAX_SCENES- See Also:
-
focusedClip
-
grid
-
gridViewExpanded
-
gridViewOffset
-
gridMode
-
gridPatternOffset
-
clipInspectorExpanded
-
numScenes
-
numPatterns
-
stopClips
-
triggerPatternCycle
-
launchPatternCycle
-
snapshotTransitionTimeSecs
Amount of time taken in seconds to transition into a new snapshot view -
snapshotTransitionEnabled
-
timeBaseDefault
-
clipSnapshotDefault
-
controlSurfaceSemaphore
A semaphore used to keep count of how many remote control surfaces may be controlling this component. This may be used by UI implementations to indicate to the user that this component is under remote control.
-
-
Constructor Details
-
LXClipEngine
-
-
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
-
getGridOffsetParameter
-
getGridSizeParameter
-
getGridOffset
public int getGridOffset() -
getGridSize
public int getGridSize() -
updatePatternGridSize
public void updatePatternGridSize() -
addControlSurface
-
removeControlSurface
-
getControlSurfaces
-
getFocusedClip
-
setFocusedClip
-
getScene
Get the boolean parameter that launches a scene- Parameters:
index
- Index of scene- Returns:
- Scene at index
-
getPatternScene
Get the boolean parameter that launches a pattern scene- Parameters:
index
- Index of pattern scene- Returns:
- Pattern scene at index
-
launchScene
Launches the scene at given index, subject to launch quantization- Parameters:
index
- Scene index- Returns:
- this
-
triggerScene
Triggers the scene at given index immediately- Parameters:
index
- Scene index- Returns:
- this
-
launchPatternScene
Launches the pattern scene at given index, subject to launch quantization- Parameters:
index
- Pattern scene index- Returns:
- this
-
triggerPatternScene
Triggers all patterns at the given index- Parameters:
index
- Pattern index- Returns:
- this
-
triggerPatternCycle
Cycle the patterns on every eligible channel- Returns:
- this
-
stopClips
Stops all running clips- Returns:
- this
-
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 classLXComponent
- Parameters:
lx
- LX instanceobj
- Object to deserialize
-
dispose
public void dispose()Description copied from class:LXComponent
Invoked when a component is being removed from the system and will no longer be used at all. This unregisters the component and should free up any resources and parameter listeners. Ideally after this method is called the object should be eligible for garbage collection. Subclasses are generally expected to override this method to handle their particular cleanup work. They should also generally callsuper.dispose()
at the appropriate time to perform the basic cleanup, which may need to happen either before or after cleaning up other objects.- Overrides:
dispose
in classLXComponent
-