public abstract class LXBus extends LXModelComponent implements LXOscComponent
Modifier and Type | Class and Description |
---|---|
static interface |
LXBus.ClipListener |
static interface |
LXBus.Listener
Listener interface for objects which want to be notified when the internal
channel state is modified.
|
class |
LXBus.Profiler |
LXComponent.Placeholder, LXComponent.Renamable
LXSerializable.Utils
Modifier and Type | Field and Description |
---|---|
BooleanParameter |
arm
Arms the channel for clip recording.
|
List<LXClip> |
clips |
List<LXEffect> |
effects |
protected List<LXEffect> |
mutableEffects |
static String |
PATH_EFFECT |
BooleanParameter |
selected
Whether channel is selected in the UI
|
model
modulators, profiler
controlSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor
Modifier and Type | Method and Description |
---|---|
LXClip |
addClip() |
LXClip |
addClip(int index) |
LXBus |
addClipListener(LXBus.ClipListener listener) |
LXBus |
addEffect(LXEffect effect) |
LXBus |
addEffect(LXEffect effect,
int index) |
void |
addListener(LXBus.Listener listener) |
protected abstract LXClip |
constructClip(int index) |
protected LXModulatorComponent.Profiler |
constructProfiler() |
void |
dispose()
Invoked when a component is being removed from the system and will no longer be used at all.
|
protected void |
disposeClips() |
LXClip |
getClip(int index) |
LXClip |
getClip(int index,
boolean create) |
LXEffect |
getEffect(int i) |
LXEffect |
getEffect(String label) |
List<LXEffect> |
getEffects() |
LXGroup |
getGroup()
Returns the group that this channel belongs to
|
abstract int |
getIndex() |
boolean |
handleOscMessage(OscMessage message,
String[] parts,
int index)
Handles an OSC message sent to this component.
|
boolean |
isChannel()
Returns true if this is a basic channel
|
boolean |
isEmptyGroup()
Returns true if this is an empty group with no channels
|
boolean |
isGroup()
Returns true if this is a group channel
|
boolean |
isInGroup()
Returns true if this channel belongs to a group
|
void |
load(LX lx,
JsonObject obj)
Loads the LX component.
|
void |
loop(double deltaMs) |
protected void |
loop(double deltaMs,
boolean runComponents) |
LXBus |
moveEffect(LXEffect effect,
int index) |
protected void |
onModelChanged(LXModel model)
Subclasses should override to handle changes to which model
they are addressing.
|
LXBus |
reloadEffect(LXEffect effect) |
void |
removeClip(int index) |
void |
removeClip(LXClip clip) |
LXBus |
removeClipListener(LXBus.ClipListener listener) |
LXBus |
removeEffect(LXEffect effect) |
void |
removeListener(LXBus.Listener listener) |
void |
save(LX lx,
JsonObject obj)
Serializes the LX component.
|
protected void |
setMixer(LXMixerEngine mixer) |
LXBus |
stopClips() |
getModel, setModel
addModulator, addModulator, addModulator, getModulator, getModulators, moveModulator, removeModulator, startModulator
addArray, addChild, addInternalParameter, addParameter, addParameter, contains, copyParameters, getChild, getComponentName, getComponentName, getComponentName, getId, getLabel, 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 BooleanParameter arm
public final BooleanParameter selected
public static final String PATH_EFFECT
protected LXModulatorComponent.Profiler constructProfiler()
constructProfiler
in class LXModulatorComponent
public abstract int getIndex()
protected void setMixer(LXMixerEngine mixer)
protected void onModelChanged(LXModel model)
LXModelComponent
onModelChanged
in class LXModelComponent
model
- New modelpublic final void addListener(LXBus.Listener listener)
public final void removeListener(LXBus.Listener listener)
public LXBus addClipListener(LXBus.ClipListener listener)
public LXBus removeClipListener(LXBus.ClipListener listener)
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 LXGroup getGroup()
public boolean isGroup()
public boolean isEmptyGroup()
public boolean isChannel()
public boolean isInGroup()
public LXEffect getEffect(int i)
public LXClip getClip(int index)
public LXClip getClip(int index, boolean create)
public LXClip addClip()
public LXClip addClip(int index)
public LXBus stopClips()
protected abstract LXClip constructClip(int index)
public void removeClip(LXClip clip)
public void removeClip(int index)
public void loop(double deltaMs)
loop
in interface LXLoopTask
loop
in class LXModelComponent
protected void loop(double deltaMs, boolean runComponents)
protected void disposeClips()
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 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 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