Package heronarts.lx.midi
Class LXMidiInput
java.lang.Object
heronarts.lx.midi.LXMidiDevice
heronarts.lx.midi.LXMidiInput
- All Implemented Interfaces:
LXSerializable,LXMidiSource,LXMidiTerminal
-
Nested Class Summary
Nested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal BooleanParameterfinal BooleanParameterfinal BooleanParameterFields inherited from class heronarts.lx.midi.LXMidiDevice
connected, device, enabled, engineFields inherited from interface heronarts.lx.midi.LXMidiSource
ALL_INS, COMPUTER_KEYBOARD, NONE, OSC, UNKNOWN -
Method Summary
Modifier and TypeMethodDescriptionaddListener(LXMidiListener listener) Registers a listener to this MIDI inputprotected voidclose()voidload(LX lx, JsonObject object) Restores this instance from a JSON objectprotected voidonEnabled(boolean enabled) Subclasses have this method invoked when the enabled state changes.removeListener(LXMidiListener listener) Removes a listener to this MIDI inputvoidsave(LX lx, JsonObject object) Serializes this instance into the JSON objectMethods inherited from class heronarts.lx.midi.LXMidiDevice
getDescription, getName, open, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface heronarts.lx.midi.LXMidiSource
matchesMethods inherited from interface heronarts.lx.midi.LXMidiTerminal
getMidiDevice, getName
-
Field Details
-
channelEnabled
-
controlEnabled
-
syncEnabled
-
-
Method Details
-
close
protected void close()- Specified by:
closein classLXMidiDevice
-
onEnabled
protected void onEnabled(boolean enabled) Description copied from class:LXMidiDeviceSubclasses have this method invoked when the enabled state changes.- Specified by:
onEnabledin classLXMidiDevice- Parameters:
enabled- Enabled state, if newly set to true, attempt to open
-
addListener
Registers a listener to this MIDI input- Parameters:
listener- Listener to receive callbacks- Returns:
- this
-
removeListener
Removes a listener to this MIDI input- Parameters:
listener- Listener to stop receiving callbacks- Returns:
- this
-
save
Description copied from interface:LXSerializableSerializes this instance into the JSON object- Specified by:
savein interfaceLXSerializable- Parameters:
lx- LX instanceobject- Object to serialize into
-
load
Description copied from interface:LXSerializableRestores this instance from a JSON object- Specified by:
loadin interfaceLXSerializable- Parameters:
lx- LX instanceobject- Object to deserialize
-