Package heronarts.lx.midi
Class LXMidiInput
java.lang.Object
heronarts.lx.midi.LXMidiDevice
heronarts.lx.midi.LXMidiInput
- All Implemented Interfaces:
LXSerializable
-
Nested Class Summary
Nested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils
-
Field Summary
Modifier and TypeFieldDescriptionfinal BooleanParameter
final BooleanParameter
final BooleanParameter
Fields inherited from class heronarts.lx.midi.LXMidiDevice
connected, device, enabled, engine
-
Method Summary
Modifier and TypeMethodDescriptionaddListener
(LXMidiListener listener) Registers a listener to this MIDI inputprotected void
close()
void
load
(LX lx, JsonObject object) Restores this instance from a JSON objectprotected void
onEnabled
(boolean enabled) Subclasses have this method invoked when the enabled state changes.removeListener
(LXMidiListener listener) Removes a listener to this MIDI inputvoid
save
(LX lx, JsonObject object) Serializes this instance into the JSON objectMethods inherited from class heronarts.lx.midi.LXMidiDevice
getDescription, getName, open
-
Field Details
-
channelEnabled
-
controlEnabled
-
syncEnabled
-
-
Method Details
-
close
protected void close()- Specified by:
close
in classLXMidiDevice
-
onEnabled
protected void onEnabled(boolean enabled) Description copied from class:LXMidiDevice
Subclasses have this method invoked when the enabled state changes.- Specified by:
onEnabled
in 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:LXSerializable
Serializes this instance into the JSON object- Specified by:
save
in interfaceLXSerializable
- Parameters:
lx
- LX instanceobject
- Object to serialize into
-
load
Description copied from interface:LXSerializable
Restores this instance from a JSON object- Specified by:
load
in interfaceLXSerializable
- Parameters:
lx
- LX instanceobject
- Object to deserialize
-