Package heronarts.lx.parameter
Interface LXParameter
- All Superinterfaces:
LXPath
- All Known Subinterfaces:
LXCompoundModulation.Target
,LXNormalizedParameter
- All Known Implementing Classes:
AbstractDmxModulator
,Accelerator
,Accumulator
,AggregateParameter
,AHDSREnvelope
,BandGate
,BooleanLogic
,BooleanParameter
,BoundedFunctionalParameter
,BoundedParameter
,Click
,ColorParameter
,ComparatorModulator
,CompoundDiscreteParameter
,CompoundEnumParameter
,CompoundObjectParameter
,CompoundParameter
,DampedParameter
,Damper
,DecibelMeter
,DiscreteColorParameter
,DiscreteParameter
,DmxColorModulator
,DmxModulator
,EnumParameter
,FixedParameter
,FocusedPatternControls
,FunctionalModulator
,FunctionalParameter
,GraphicMeter
,HistoryBuffer
,Interval
,LinearEnvelope
,LinkedColorParameter
,LXAudioEngine.Meter
,LXClipEngine.FocusedClipParameter
,LXListenableNormalizedParameter
,LXListenableParameter
,LXModulator
,LXModulator.Placeholder
,LXPalette.IndexSelector
,LXPeriodicModulator
,LXRangeModulator
,LXVariablePeriodModulator
,LXViewEngine.Selector
,LXViewEngine.SelectorNormal
,LXViewEngine.SelectorPriority
,LXVirtualParameter
,MacroKnobs
,MacroSwitches
,MacroTriggers
,MidiFilterParameter
,MidiNoteTrigger
,MultiModeEnvelope
,MultiStageEnvelope
,MultiTrig
,MutableParameter
,NoiseModulator
,NormalizedParameter
,ObjectParameter
,OperatorModulator
,QuadraticEnvelope
,Randomizer
,SawLFO
,Scaler
,SinLFO
,Smoother
,SoundObject
,SoundObject.Selector
,Spring
,SquareLFO
,StepSequencer
,StringParameter
,TimeParameter
,Timer
,TriangleLFO
,TriggerParameter
,VariableLFO
This class provides a common interface for system components to have
parameters that can modify their operation. Any LXComponent can have
parameters, such as a pattern, effect, or transition.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
static interface
static class
static class
static enum
static enum
-
Field Summary
Fields inherited from interface heronarts.lx.LXPath
ROOT, ROOT_PREFIX, ROOT_SLASH
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Invoked when the parameter is done being used and none of its resources are needed anymore.default double
Get the base parameter value, for modulated parameters this may differ from getValue()default float
Get the base parameter value, for modulated parameters this may differ from getValue()Gets the formatter to be used for printing this parameter's valuegetLabel()
Gets the label for this parameterdefault AggregateParameter
Returns the parent aggregate parameter that this parameter belongs toGets the polarity of this parameter.getUnits()
Gets the unit format that this parameter's value stores.double
getValue()
Retrieves the value of the parameterdefault float
Utility helper function to get the value of the parameter as a float.default boolean
Whether this parameter should be eligible for mapping via MIDI or modulation control.reset()
A method to reset the value of the parameter, if a default is available.setComponent
(LXComponent component, String path) Sets the component that owns this parametersetFormatter
(LXParameter.Formatter formatter) Sets the formatter used for printing this parameter's valuedefault LXParameter
setMappable
(boolean mappable) Sets whether this parameter should be eligible for MIDI/modulation mapping or not.setValue
(double value) Sets the value of the parameter.Methods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getDescription, getParent, getPath, isDescendant
-
Method Details
-
getParentParameter
Returns the parent aggregate parameter that this parameter belongs to- Returns:
- Parent aggregate parameter, or null
-
setComponent
Sets the component that owns this parameter- Parameters:
component
- Componentpath
- Path name for parameter- Returns:
- this
-
getUnits
LXParameter.Units getUnits()Gets the unit format that this parameter's value stores.- Returns:
- Units
-
getFormatter
LXParameter.Formatter getFormatter()Gets the formatter to be used for printing this parameter's value- Returns:
- Formatter
-
setFormatter
Sets the formatter used for printing this parameter's value- Parameters:
formatter
- Formatter- Returns:
- The parameter
-
getPolarity
LXParameter.Polarity getPolarity()Gets the polarity of this parameter.- Returns:
- polarity of this parameter
-
dispose
void dispose()Invoked when the parameter is done being used and none of its resources are needed anymore. -
reset
Object reset()A method to reset the value of the parameter, if a default is available. Not necessarily defined for all parameters, may be ignored.- Returns:
- this
-
setValue
Sets the value of the parameter.- Parameters:
value
- The value- Returns:
- this
-
getValue
double getValue()Retrieves the value of the parameter- Returns:
- Parameter value
-
getValuef
default float getValuef()Utility helper function to get the value of the parameter as a float.- Returns:
- Parameter value as float
-
getBaseValue
default double getBaseValue()Get the base parameter value, for modulated parameters this may differ from getValue()- Returns:
- Base parameter value
-
getBaseValuef
default float getBaseValuef()Get the base parameter value, for modulated parameters this may differ from getValue()- Returns:
- Base parameter value
-
getLabel
String getLabel()Gets the label for this parameter -
setMappable
Sets whether this parameter should be eligible for MIDI/modulation mapping or not.- Parameters:
mappable
- Whether parameter should be available for mapping- Returns:
- this
-
isMappable
default boolean isMappable()Whether this parameter should be eligible for mapping via MIDI or modulation control.- Returns:
true
if mappable, false if otherwise
-