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 BooleanParameter
final BooleanParameter
final BooleanParameter
Fields inherited from class heronarts.lx.midi.LXMidiDevice
connected, device, enabled, engine
Fields 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 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, 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.LXMidiSource
matches
Methods inherited from interface heronarts.lx.midi.LXMidiTerminal
getMidiDevice, getName
-
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
-