Package heronarts.lx.pattern.image
Class SlideshowPattern
java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.LXModulatorComponent
heronarts.lx.LXModelComponent
heronarts.lx.LXLayeredComponent
heronarts.lx.LXDeviceComponent
heronarts.lx.pattern.LXPattern
heronarts.lx.pattern.image.SlideshowPattern
- All Implemented Interfaces:
LXComponent.Renamable
,LXLoopTask
,LXPath
,LXPresetComponent
,LXSerializable
,LXMidiListener
,LXModulationContainer
,LXOscComponent
,LXParameterListener
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
class
static enum
static interface
Nested classes/interfaces inherited from class heronarts.lx.pattern.LXPattern
LXPattern.Placeholder, LXPattern.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
Modifier and TypeFieldDescriptionfinal BooleanParameter
Whether auto pattern transition is enabled on this channelAuto-cycle to a random pattern, not the next onefinal BoundedParameter
Time in seconds after which transition thru the image set is automatically initiated.final DiscreteParameter
final List<SlideshowPattern.Image>
final ObjectParameter<LXBlend>
final BooleanParameter
final BoundedParameter
Fields inherited from class heronarts.lx.pattern.LXPattern
compositeLevel, compositeMode, customCycleTimeSecs, effects, enabled, hasCustomCycleTime, mutableEffects, PATH_EFFECT, profiler, recall, runMs
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 TypeMethodDescriptionaddImage()
addImage
(int index) addImage
(int index, JsonObject imageObj) void
addListener
(SlideshowPattern.Listener listener) void
dispose()
Invoked when a component is being removed from the system and will no longer be used at all.double
Return progress towards making a cycledouble
Return progress through a transitiongoImage
(int index) final SlideshowPattern
void
load
(LX lx, JsonObject obj) Loads the LX component.void
moveImage
(SlideshowPattern.Image image, int index) void
void
removeListener
(SlideshowPattern.Listener listener) protected void
run
(double deltaMs) Main pattern loop function.void
save
(LX lx, JsonObject obj) Serializes the LX component.Methods inherited from class heronarts.lx.pattern.LXPattern
activate, addEffect, addEffect, addListener, clearInterval, deactivate, getChannel, getCompositeDampingLevel, getEffect, getEffect, getEffects, getIndex, getPath, handleOscMessage, hasInterval, initCompositeDamping, isAutoCycleEligible, isHiddenControl, isInInterval, isSnapshotControl, midiDispatch, moveEffect, onActive, onInactive, onLoop, onTransitionEnd, onTransitionStart, reloadEffect, removeEffect, removeListener, setAutoCycleEligible, setChannel, setIndex, setInterval, toggleAutoCycleEligible, updateCompositeBlendOptions, updateCompositeDamping
Methods inherited from class heronarts.lx.LXDeviceComponent
addControlSurface, clearCustomRemoteControls, getControlSurfaces, getCrash, getCrashStackTrace, getCustomRemoteControls, getDeviceVersion, getModelView, getModulationEngine, getRemoteControls, loop, removeControlSurface, removeCustomRemoteControl, resetRemoteControls, 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, onModelChanged, 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, hasParameter, isValidOscParameter, loadParameters, loadPreset, onParameterChanged, 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.midi.LXMidiListener
aftertouchReceived, controlChangeReceived, noteOffReceived, noteOnReceived, pitchBendReceived, programChangeReceived
Methods inherited from interface heronarts.lx.osc.LXOscComponent
getOscAddress
Methods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, isDescendant
Methods inherited from interface heronarts.lx.LXPresetComponent
getPresetClass, postProcessPreset
-
Field Details
-
images
-
autoCycleEnabled
Whether auto pattern transition is enabled on this channel -
autoCycleMode
Auto-cycle to a random pattern, not the next one -
autoCycleTimeSecs
Time in seconds after which transition thru the image set is automatically initiated. -
transitionTimeSecs
-
transitionEnabled
-
transitionBlendMode
-
focusedImage
-
-
Constructor Details
-
SlideshowPattern
-
-
Method Details
-
getActiveImage
-
getNextImage
-
getTargetImage
-
goImage
-
goNextImage
-
goRandomImage
-
getFocusedImage
-
addImage
-
addImage
-
addImage
-
removeImage
-
moveImage
-
addListener
-
removeListener
-
getAutoCycleProgress
public double getAutoCycleProgress()Return progress towards making a cycle- Returns:
- amount of progress towards the next cycle
-
getTransitionProgress
public double getTransitionProgress()Return progress through a transition- Returns:
- amount of progress thru current transition
-
run
protected void run(double deltaMs) Description copied from class:LXPattern
Main pattern loop function. Invoked in a render loop. Subclasses must implement this function. -
save
Description copied from class:LXComponent
Serializes the LX component. By default, all internal and user-facing parameters are serialized, as well as any explicitly registered child components. Note that child arrays are not serialized, or any other dynamic components. Subclasses may override to perform more saving, and are expected to callsuper.save(lx, obj)
at the appropriate time.- Specified by:
save
in interfaceLXSerializable
- Overrides:
save
in classLXPattern
- Parameters:
lx
- LX instanceobj
- Object to serialize into
-
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 classLXPattern
- 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.
-