public class DecibelMeter extends LXModulator implements LXNormalizedParameter, LXOscComponent
LXComponent.Placeholder, LXComponent.RenamableLXParameter.Formatter, LXParameter.Polarity, LXParameter.UnitsLXSerializable.Utils| Modifier and Type | Field and Description |
|---|---|
CompoundParameter |
attack
Meter attack time, in milliseconds
|
protected float |
attackGain |
protected LXAudioBuffer |
buffer |
CompoundParameter |
gain
Gain of the meter, in decibels
|
protected static double |
LOG_10 |
CompoundParameter |
range
Range of the meter, in decibels.
|
CompoundParameter |
release
Meter release time, in milliseconds
|
protected float |
releaseGain |
runMs, running, triggercontrolSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor| Constructor and Description |
|---|
DecibelMeter(LXAudioBuffer buffer)
Default constructor, creates a meter with unity gain and 72dB dynamic range
|
DecibelMeter(String label,
LXAudioBuffer buffer)
Default constructor, creates a meter with unity gain and 72dB dynamic range
|
| Modifier and Type | Method and Description |
|---|---|
protected double |
computeValue(double deltaMs)
Implementation method to advance the modulator's internal state.
|
double |
getDecibels() |
float |
getDecibelsf() |
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
|
double |
getPeak() |
float |
getPeakf() |
float |
getRaw()
Return raw underlying levels, no attack/gain smoothing
|
double |
getSquare() |
float |
getSquaref() |
DecibelMeter |
setBuffer(LXAudioBuffer buffer) |
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, updateValueisRunning, loop, onParameterChanged, onReset, onStart, onStop, reset, start, stop, toggle, triggeraddArray, 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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdispose, getDescription, getFormatter, getLabel, getPolarity, getUnits, getValue, getValuef, isMappable, reset, setComponent, setMappable, setValueget, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter, getParent, getPathgetOscAddress, handleOscMessageprotected static final double LOG_10
protected LXAudioBuffer buffer
public final CompoundParameter gain
public final CompoundParameter range
public final CompoundParameter attack
public final CompoundParameter release
protected float attackGain
protected float releaseGain
public DecibelMeter(LXAudioBuffer buffer)
buffer - Audio buffer to meterpublic DecibelMeter(String label, LXAudioBuffer buffer)
label - Labelbuffer - Audio buffer to meterpublic DecibelMeter setBuffer(LXAudioBuffer buffer)
public double getExponent()
LXNormalizedParametergetExponent in interface LXNormalizedParameterpublic float getRaw()
public double getDecibels()
public float getDecibelsf()
public double getSquare()
public float getSquaref()
protected double computeValue(double deltaMs)
LXModulatorcomputeValue in class LXModulatordeltaMs - Number of milliseconds to advance bypublic LXNormalizedParameter setNormalized(double value)
LXNormalizedParametersetNormalized in interface LXNormalizedParametervalue - The normalized value, from 0 to 1public double getPeak()
public float getPeakf()
public double getNormalized()
LXNormalizedParametergetNormalized in interface LXNormalizedParameterpublic float getNormalizedf()
LXNormalizedParametergetNormalizedf in interface LXNormalizedParameterLX library by Mark C. Slee. © 2012-2020