public class BandGate extends LXModulator implements LXNormalizedParameter, LXTriggerSource, LXOscComponent
LXComponent.Placeholder, LXComponent.Renamable
LXParameter.Formatter, LXParameter.Polarity, LXParameter.Units
LXSerializable.Utils
Modifier and Type | Field and Description |
---|---|
BoundedParameter |
attack
Meter attack time, in milliseconds
|
NormalizedParameter |
average
Level parameter is the average of the monitored band
|
BoundedParameter |
decay
The time the trigger takes to falloff from 1 to 0 after triggered, in
milliseconds
|
BoundedParameter |
floor
The floor at which the trigger releases.
|
BoundedParameter |
gain
Gain of the meter, in decibels
|
BooleanParameter |
gate
Gate parameter is set to true for one frame when the beat is triggered.
|
BoundedParameter |
maxFreq
Maximum frequency for the band
|
GraphicMeter |
meter |
BoundedParameter |
minFreq
Minimum frequency for the band
|
BoundedParameter |
range
Range of the meter, in decibels.
|
BoundedParameter |
release
Meter release time, in milliseconds
|
BoundedParameter |
slope
dB/octave slope applied to the equalizer
|
BooleanParameter |
teachTempo
Turn this parameter on to have this modulator tap the tempo system
|
BoundedParameter |
threshold
The gate level at which the trigger is engaged.
|
runMs, running, trigger
controlSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor
Constructor and Description |
---|
BandGate(GraphicMeter meter,
float minHz,
float maxHz)
Constructs a gate that monitors a specified frequency band
|
BandGate(LX lx) |
BandGate(String label,
GraphicMeter meter)
Constructs a gate that monitors a specified frequency band
|
BandGate(String label,
GraphicMeter meter,
int minHz,
int maxHz)
Constructs a gate that monitors a specified frequency band
|
BandGate(String label,
LX lx) |
Modifier and Type | Method and Description |
---|---|
protected double |
computeValue(double deltaMs)
Implementation method to advance the modulator's internal state.
|
double |
getBand(int i) |
double |
getExponent()
Gets the exponent used for scaling this parameter across its normalized range.
|
double |
getNormalized()
Gets the value of the parameter in a normalized space from 0 to 1
|
float |
getNormalizedf()
Gets the value of the parameter in a normalized space as a float
|
BooleanParameter |
getTriggerSource() |
void |
onParameterChanged(LXParameter p)
Subclasses are free to override this if desired.
|
BandGate |
setFrequencyRange(float minHz,
float maxHz)
Sets range of frequencies to look at
|
LXNormalizedParameter |
setNormalized(double value)
Sets the value or the parameter in normalized space from 0 to 1
|
getDescription, getFormatter, getIndex, getOscAddress, getOscPath, getPath, getPolarity, getUnits, getValue, getValuef, onSetValue, run, setComponent, setDescription, setFormatter, setIndex, setPolarity, setUnits, setValue, setValue, updateValue
isRunning, loop, onReset, onStart, onStop, reset, start, stop, toggle, trigger
addArray, addChild, addInternalParameter, addParameter, addParameter, contains, copyParameters, dispose, getChild, getComponentName, getComponentName, getComponentName, getId, getLabel, getLX, getOscLabel, getParameter, getParameters, getParent, handleOscMessage, load, loadParameters, removeParameter, removeParameter, save, saveParameters, setParent, toString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
dispose, getDescription, getFormatter, getLabel, getPolarity, getUnits, getValue, getValuef, isMappable, reset, setComponent, setMappable, setValue
get, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter, getParent, getPath
getOscAddress, handleOscMessage
public final BoundedParameter gain
public final BoundedParameter range
public final BoundedParameter attack
public final BoundedParameter release
public final BoundedParameter slope
public final BoundedParameter threshold
public final BoundedParameter floor
public final BoundedParameter decay
public final BoundedParameter minFreq
public final BoundedParameter maxFreq
public final GraphicMeter meter
public final BooleanParameter gate
public final BooleanParameter teachTempo
public final NormalizedParameter average
public BandGate(LX lx)
public BandGate(String label, GraphicMeter meter)
label
- Labelmeter
- GraphicEQ object to drive this gatepublic BandGate(GraphicMeter meter, float minHz, float maxHz)
meter
- Equalizer to monitorminHz
- Minimum frequency bandmaxHz
- Maximum frequency bandpublic BandGate(String label, GraphicMeter meter, int minHz, int maxHz)
label
- Labelmeter
- Equalizer to monitorminHz
- Minimum frequency bandmaxHz
- Maximum frequency bandpublic void onParameterChanged(LXParameter p)
LXComponent
onParameterChanged
in interface LXParameterListener
onParameterChanged
in class LXRunnableComponent
p
- Parameter that has a value changepublic double getExponent()
LXNormalizedParameter
getExponent
in interface LXNormalizedParameter
public BandGate setFrequencyRange(float minHz, float maxHz)
minHz
- Minimum frequencymaxHz
- Maximum frequencypublic double getBand(int i)
protected double computeValue(double deltaMs)
LXModulator
computeValue
in class LXModulator
deltaMs
- Number of milliseconds to advance bypublic LXNormalizedParameter setNormalized(double value)
LXNormalizedParameter
setNormalized
in interface LXNormalizedParameter
value
- The normalized value, from 0 to 1public double getNormalized()
LXNormalizedParameter
getNormalized
in interface LXNormalizedParameter
public float getNormalizedf()
LXNormalizedParameter
getNormalizedf
in interface LXNormalizedParameter
public BooleanParameter getTriggerSource()
getTriggerSource
in interface LXTriggerSource
LX library by Mark C. Slee. © 2012-2020