public abstract class LXClip extends LXRunnableComponent implements LXOscComponent, LXComponent.Renamable, LXBus.Listener
Modifier and Type | Class and Description |
---|---|
static interface |
LXClip.Listener |
LXComponent.Placeholder, LXComponent.Renamable
LXSerializable.Utils
Modifier and Type | Field and Description |
---|---|
LXBus |
bus |
static String |
KEY_INDEX |
List<LXClipLane> |
lanes |
MutableParameter |
length |
BooleanParameter |
loop |
protected List<LXClipLane> |
mutableLanes |
protected LXParameterListener |
parameterRecorder |
runMs, running, trigger
controlSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor
Modifier | Constructor and Description |
---|---|
|
LXClip(LX lx,
LXBus bus,
int index) |
protected |
LXClip(LX lx,
LXBus bus,
int index,
boolean registerListener) |
Modifier and Type | Method and Description |
---|---|
LXClip |
addListener(LXClip.Listener listener) |
void |
dispose()
Invoked when a component is being removed from the system and will no longer be used at all.
|
void |
effectAdded(LXBus channel,
LXEffect effect) |
void |
effectMoved(LXBus channel,
LXEffect effect) |
void |
effectRemoved(LXBus channel,
LXEffect effect) |
double |
getBasis() |
double |
getCursor() |
int |
getIndex() |
double |
getLength() |
String |
getPath()
Accessor for the path of this object.
|
void |
load(LX lx,
JsonObject obj)
Loads the LX component.
|
protected void |
loadLane(LX lx,
String laneType,
JsonObject laneObj) |
void |
onParameterChanged(LXParameter p)
Subclasses are free to override this if desired.
|
protected void |
onStartRecording() |
protected void |
registerComponent(LXComponent component) |
LXClip |
removeListener(LXClip.Listener listener) |
LXClip |
removeParameterLane(ParameterClipLane lane) |
protected void |
run(double deltaMs) |
void |
save(LX lx,
JsonObject obj)
Serializes the LX component.
|
LXClip |
setIndex(int index) |
protected void |
unregisterComponent(LXComponent component) |
isRunning, loop, onReset, onStart, onStop, reset, start, stop, toggle, trigger
addArray, addChild, addInternalParameter, addParameter, addParameter, contains, copyParameters, getChild, getComponentName, getComponentName, getComponentName, getId, getLabel, getLX, getOscAddress, getOscLabel, getOscPath, getParameter, getParameters, getParent, handleOscMessage, loadParameters, removeParameter, removeParameter, saveParameters, setParent, toString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getOscAddress, handleOscMessage
get, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter
public final MutableParameter length
public final BooleanParameter loop
protected final List<LXClipLane> mutableLanes
public final List<LXClipLane> lanes
public final LXBus bus
protected final LXParameterListener parameterRecorder
public static final String KEY_INDEX
public String getPath()
LXComponent
getPath
in interface LXPath
getPath
in class LXComponent
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 LXComponent
public double getLength()
public LXClip removeParameterLane(ParameterClipLane lane)
public LXClip addListener(LXClip.Listener listener)
public LXClip removeListener(LXClip.Listener listener)
public double getCursor()
public double getBasis()
public void onParameterChanged(LXParameter p)
LXComponent
onParameterChanged
in interface LXParameterListener
onParameterChanged
in class LXRunnableComponent
p
- Parameter that has a value changeprotected void onStartRecording()
protected void registerComponent(LXComponent component)
protected void unregisterComponent(LXComponent component)
public int getIndex()
public LXClip setIndex(int index)
protected void run(double deltaMs)
run
in class LXRunnableComponent
public void effectAdded(LXBus channel, LXEffect effect)
effectAdded
in interface LXBus.Listener
public void effectRemoved(LXBus channel, LXEffect effect)
effectRemoved
in interface LXBus.Listener
public void effectMoved(LXBus channel, LXEffect effect)
effectMoved
in interface LXBus.Listener
public void load(LX lx, JsonObject obj)
LXComponent
load
in interface LXSerializable
load
in class LXComponent
lx
- LX instanceobj
- Object to deserializeprotected void loadLane(LX lx, String laneType, JsonObject laneObj)
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 intoLX library by Mark C. Slee. © 2012-2020