public abstract class LXMidiSurface extends Object implements LXMidiListener, LXSerializable
| Modifier and Type | Class and Description |
|---|---|
static interface |
LXMidiSurface.Bidirectional
Marker interface for Midi Surface implementations which require an output
to be functional.
|
LXSerializable.Utils| Modifier and Type | Field and Description |
|---|---|
BooleanParameter |
enabled |
LXMidiInput |
input
The midi input device for this control surface.
|
static String |
KEY_NAME |
protected LX |
lx |
LXMidiOutput |
output
The midi output device for this control surface.
|
| Modifier | Constructor and Description |
|---|---|
protected |
LXMidiSurface(LX lx,
LXMidiInput input,
LXMidiOutput output) |
| Modifier and Type | Method and Description |
|---|---|
void |
aftertouchReceived(MidiAftertouch aftertouch) |
void |
controlChangeReceived(MidiControlChange cc) |
LXMidiInput |
getInput() |
String |
getName() |
LXMidiOutput |
getOutput() |
void |
load(LX lx,
JsonObject object)
Restores this instance from a JSON object
|
void |
noteOffReceived(MidiNote note) |
void |
noteOnReceived(MidiNoteOn note) |
protected void |
onEnable(boolean isOn)
Subclasses may override, invoked automatically when surface is enabled/disabled
|
protected void |
onReconnect()
Subclasses may override, invoked when the control surface was disconnected but
has now reconnected.
|
void |
pitchBendReceived(MidiPitchBend pitchBend) |
void |
programChangeReceived(MidiProgramChange pc) |
void |
save(LX lx,
JsonObject object)
Serializes this instance into the JSON object
|
protected void |
sendControlChange(int channel,
int cc,
int value) |
protected void |
sendNoteOn(int channel,
int note,
int velocity) |
protected final LX lx
public final LXMidiInput input
public final LXMidiOutput output
public final BooleanParameter enabled
public static final String KEY_NAME
protected LXMidiSurface(LX lx, LXMidiInput input, LXMidiOutput output)
public String getName()
public LXMidiInput getInput()
public LXMidiOutput getOutput()
protected void onEnable(boolean isOn)
isOn - Whether surface is enabledprotected void onReconnect()
protected void sendNoteOn(int channel,
int note,
int velocity)
protected void sendControlChange(int channel,
int cc,
int value)
public void load(LX lx, JsonObject object)
LXSerializableload in interface LXSerializablelx - LX instanceobject - Object to deserializepublic void save(LX lx, JsonObject object)
LXSerializablesave in interface LXSerializablelx - LX instanceobject - Object to serialize intopublic void noteOnReceived(MidiNoteOn note)
noteOnReceived in interface LXMidiListenerpublic void noteOffReceived(MidiNote note)
noteOffReceived in interface LXMidiListenerpublic void controlChangeReceived(MidiControlChange cc)
controlChangeReceived in interface LXMidiListenerpublic void programChangeReceived(MidiProgramChange pc)
programChangeReceived in interface LXMidiListenerpublic void pitchBendReceived(MidiPitchBend pitchBend)
pitchBendReceived in interface LXMidiListenerpublic void aftertouchReceived(MidiAftertouch aftertouch)
aftertouchReceived in interface LXMidiListenerLX library by Mark C. Slee. © 2012-2020