Package heronarts.lx.audio
Class BandFilter
java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.LXRunnableComponent
heronarts.lx.modulator.LXModulator
heronarts.lx.audio.BandFilter
- All Implemented Interfaces:
LXComponent.Renamable
,LXLoopTask
,LXPath
,LXSerializable
,LXOscComponent
,LXNormalizedParameter
,LXParameter
,LXParameterListener
- Direct Known Subclasses:
BandGate
@LXCategory("Audio")
@Global("Band Filter")
@Device("Band Filter")
public class BandFilter
extends LXModulator
implements LXNormalizedParameter, LXOscComponent
-
Nested Class Summary
Nested classes/interfaces inherited from class heronarts.lx.modulator.LXModulator
LXModulator.Device, LXModulator.Global, LXModulator.Placeholder
Nested classes/interfaces inherited from class heronarts.lx.LXComponent
LXComponent.Description, LXComponent.Hidden, LXComponent.Name, LXComponent.PluginRequired, LXComponent.Renamable
Nested classes/interfaces inherited from interface heronarts.lx.parameter.LXNormalizedParameter
LXNormalizedParameter.OscMode
Nested classes/interfaces inherited from interface heronarts.lx.parameter.LXParameter
LXParameter.Collection, LXParameter.Formatter, LXParameter.Monitor, LXParameter.MultiMonitor, LXParameter.Polarity, LXParameter.Units
Nested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal BoundedParameter
Meter attack time, in millisecondsprotected double
final BoundedParameter
Gain of the meter, in decibelsfinal BoundedParameter
Maximum frequency for the bandfinal GraphicMeter
final BoundedParameter
Minimum frequency for the bandfinal BoundedParameter
Range of the meter, in decibels.final BoundedParameter
Meter release time, in millisecondsfinal BoundedParameter
dB/octave slope applied to the equalizerFields inherited from class heronarts.lx.modulator.LXModulator
crashed, midiFilter, midiSource
Fields inherited from class heronarts.lx.LXRunnableComponent
runMs, running, trigger
Fields inherited from class heronarts.lx.LXComponent
childArrays, children, internalParameters, KEY_CHILDREN, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_INTERNAL, KEY_PARAMETER_PATH, KEY_PARAMETERS, KEY_PATH, KEY_RESET, label, legacyInternalParameters, legacyParameters, lx, modulationColor, modulationControlsExpanded, modulationsExpanded, parameters, presetFile
Fields inherited from interface heronarts.lx.LXPath
DEFAULT_SEPARATOR, ROOT, ROOT_PREFIX, ROOT_SLASH
-
Constructor Summary
ConstructorsConstructorDescriptionBandFilter
(LX lx) BandFilter
(String label, GraphicMeter meter) Constructs a gate that monitors a specified frequency bandBandFilter
(String label, LX lx) -
Method Summary
Modifier and TypeMethodDescriptionprotected double
computeValue
(double deltaMs) Implementation method to advance the modulator's internal state.double
getBand
(int i) double
Gets the value of the parameter in a normalized space from 0 to 1void
Subclasses are free to override this if desired.setFrequencyRange
(float minHz, float maxHz) Sets range of frequencies to look atsetNormalized
(double value) Sets the value or the parameter in normalized space from 0 to 1Methods inherited from class heronarts.lx.modulator.LXModulator
autostart, disableAutoStart, getCrash, getCrashStackTrace, getFormatter, getIndex, getOscAddress, getOscPath, getPath, getPolarity, getUnits, getValue, isMappingSource, loop, onSetValue, run, setComponent, setFormatter, setIndex, setMappingSource, setPolarity, setUnits, setValue, setValue, updateValue
Methods inherited from class heronarts.lx.LXRunnableComponent
isRunning, onReset, onStart, onStop, onTrigger, postRun, reset, start, stop, toggle, trigger
Methods inherited from class heronarts.lx.LXComponent
addArray, addChild, addInternalParameter, addLegacyInternalParameter, addLegacyParameter, addParameter, addParameter, addParameters, assertDisposed, contains, copyParameters, dispose, getCategory, getChild, getComponentDescription, getComponentName, getComponentName, getComponentName, getDescription, getId, getLabel, getLX, getOscLabel, getParameter, getParameters, getParent, handleOscMessage, hasParameter, isValidOscParameter, load, loadParameters, loadPreset, removeParameter, removeParameter, removeParameter, removeParameter, save, savePreset, setDescription, setParent, toOscQuery, toOscQuery, toOscQuery, toString, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface heronarts.lx.parameter.LXNormalizedParameter
getBaseNormalized, getBaseNormalizedf, getExponent, getNormalizedf, getOscMode, getValueFromNormalized, isWrappable
Methods inherited from interface heronarts.lx.osc.LXOscComponent
getOscAddress, handleOscMessage
Methods inherited from interface heronarts.lx.parameter.LXParameter
dispose, getBaseValue, getBaseValuef, getFormatter, getLabel, getParentParameter, getPolarity, getUnits, getValue, getValuef, isMappable, reset, setComponent, setFormatter, setMappable, setValue
Methods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getDescription, getParent, getPath, isDescendant
-
Field Details
-
gain
Gain of the meter, in decibels -
range
Range of the meter, in decibels. -
attack
Meter attack time, in milliseconds -
release
Meter release time, in milliseconds -
slope
dB/octave slope applied to the equalizer -
minFreq
Minimum frequency for the band -
maxFreq
Maximum frequency for the band -
meter
-
averageNorm
protected double averageNorm
-
-
Constructor Details
-
BandFilter
-
BandFilter
-
BandFilter
Constructs a gate that monitors a specified frequency band- Parameters:
label
- Labelmeter
- GraphicEQ object to drive this gate
-
-
Method Details
-
onParameterChanged
Description copied from class:LXComponent
Subclasses are free to override this if desired. It will automatically fire for any listenable parameter that is registered with this component.- Specified by:
onParameterChanged
in interfaceLXParameterListener
- Overrides:
onParameterChanged
in classLXRunnableComponent
- Parameters:
p
- Parameter that has a value change
-
setFrequencyRange
Sets range of frequencies to look at- Parameters:
minHz
- Minimum frequencymaxHz
- Maximum frequency- Returns:
- this
-
getBand
public double getBand(int i) -
computeValue
protected double computeValue(double deltaMs) Description copied from class:LXModulator
Implementation method to advance the modulator's internal state. Subclasses must provide and update value appropriately.- Specified by:
computeValue
in classLXModulator
- Parameters:
deltaMs
- Number of milliseconds to advance by- Returns:
- Computed value
-
setNormalized
Description copied from interface:LXNormalizedParameter
Sets the value or the parameter in normalized space from 0 to 1- Specified by:
setNormalized
in interfaceLXNormalizedParameter
- Parameters:
value
- The normalized value, from 0 to 1- Returns:
- this, for method chaining
-
getNormalized
public double getNormalized()Description copied from interface:LXNormalizedParameter
Gets the value of the parameter in a normalized space from 0 to 1- Specified by:
getNormalized
in interfaceLXNormalizedParameter
- Returns:
- Value of parameter, normalized to range from 0 to 1
-