Package heronarts.lx.midi
Class LXMidiMapping
java.lang.Object
heronarts.lx.midi.LXMidiMapping
- All Implemented Interfaces:
LXSerializable
- Direct Known Subclasses:
LXMidiMapping.ControlChange
,LXMidiMapping.Note
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static enum
Nested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils
-
Field Summary
Modifier and TypeFieldDescriptionfinal BooleanParameter
final int
final DiscreteParameter
final boolean
final boolean
final LXNormalizedParameter
final LXMidiMapping.Type
-
Constructor Summary
ModifierConstructorDescriptionprotected
LXMidiMapping
(LX lx, int channel, LXMidiMapping.Type type, LXNormalizedParameter parameter) protected
LXMidiMapping
(LX lx, JsonObject object, LXMidiMapping.Type type) -
Method Summary
Modifier and TypeMethodDescriptionstatic LXMidiMapping
create
(LX lx, JsonObject object) static LXMidiMapping
create
(LX lx, LXShortMessage message, LXNormalizedParameter parameter) abstract String
void
load
(LX lx, JsonObject object) Restores this instance from a JSON objectprotected static BoundedParameter
makeBoundedRangeParameter
(LXNormalizedParameter parameter, boolean on, String label, String description) protected static DiscreteParameter
makeDiscreteRangeParameter
(DiscreteParameter parameter, boolean on, String label, String description) void
save
(LX lx, JsonObject object) Serializes this instance into the JSON objectprotected void
setValue
(boolean value)
-
Field Details
-
channel
public final int channel -
type
-
parameter
-
isDiscrete
public final boolean isDiscrete -
discreteParameter
-
isBoolean
public final boolean isBoolean -
booleanParameter
-
-
Constructor Details
-
LXMidiMapping
protected LXMidiMapping(LX lx, int channel, LXMidiMapping.Type type, LXNormalizedParameter parameter) -
LXMidiMapping
-
-
Method Details
-
create
-
create
-
getDescription
-
setValue
protected void setValue(boolean value) -
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
-
makeDiscreteRangeParameter
protected static DiscreteParameter makeDiscreteRangeParameter(DiscreteParameter parameter, boolean on, String label, String description) -
makeBoundedRangeParameter
protected static BoundedParameter makeBoundedRangeParameter(LXNormalizedParameter parameter, boolean on, String label, String description)
-