public class GraphicMeter extends DecibelMeter
LXComponent.Placeholder, LXComponent.RenamableLXParameter.Formatter, LXParameter.Polarity, LXParameter.UnitsLXSerializable.Utils| Modifier and Type | Field and Description |
|---|---|
NormalizedParameter[] |
bands |
FourierTransform |
fft |
int |
numBands
Number of bands in the equalizer
|
CompoundParameter |
slope
dB/octave slope applied to the equalizer
|
attack, attackGain, buffer, gain, LOG_10, range, release, releaseGainrunMs, running, triggercontrolSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor| Constructor and Description |
|---|
GraphicMeter(LXAudioBuffer buffer)
Default graphic equalizer with 2 bands per octave
|
GraphicMeter(LXAudioBuffer buffer,
int numBands)
Makes a graphic equalizer with a default slope of 4.5 dB/octave
|
GraphicMeter(LXAudioComponent component) |
GraphicMeter(String label,
LXAudioBuffer buffer)
Default graphic equalizer with 2 bands per octave
|
GraphicMeter(String label,
LXAudioBuffer buffer,
int numBands)
Makes a graphic equalizer with a default slope of 4.5 dB/octave
|
| Modifier and Type | Method and Description |
|---|---|
protected double |
computeValue(double deltaMs)
Implementation method to advance the modulator's internal state.
|
double |
getAverage(int minBand,
int avgBands)
Averages the value of a set of bands
|
float |
getAveragef(int minBand,
int avgBands)
Averages the value of a set of bands
|
double |
getBand(int i) |
float |
getBandf(int i) |
double |
getDecibels(int i) |
float |
getDecibelsf(int i) |
int |
getNumBands()
Number of bands on the meter
|
float |
getRaw(int i)
Get most recent raw unsmoothed RMS amplitude of band i
|
float[] |
getSamples()
Returns a snapshot of the last raw audio sample buffer frame that was used to compute
this meter.
|
double |
getSquare(int i)
Gets the squared value of the i-th band
|
float |
getSquaref(int i)
Gets the squared value of the i-th band
|
getDecibels, getDecibelsf, getExponent, getNormalized, getNormalizedf, getPeak, getPeakf, getRaw, getSquare, getSquaref, setBuffer, setNormalizedgetDescription, 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, handleOscMessagepublic final CompoundParameter slope
public final int numBands
public final FourierTransform fft
public final NormalizedParameter[] bands
public GraphicMeter(LXAudioComponent component)
public GraphicMeter(LXAudioBuffer buffer)
buffer - Audio bufferpublic GraphicMeter(String label, LXAudioBuffer buffer)
label - Labelbuffer - Audio bufferpublic GraphicMeter(LXAudioBuffer buffer, int numBands)
buffer - Audio buffer to monitornumBands - Number of bandspublic GraphicMeter(String label, LXAudioBuffer buffer, int numBands)
label - Labelbuffer - Audio buffer to monitornumBands - Number of bandsprotected double computeValue(double deltaMs)
LXModulatorcomputeValue in class DecibelMeterdeltaMs - Number of milliseconds to advance bypublic float[] getSamples()
public float getRaw(int i)
i - Raw band indexpublic double getDecibels(int i)
i - Which frequency band to accesspublic float getDecibelsf(int i)
i - Which frequency band to accesspublic int getNumBands()
public double getBand(int i)
i - Which frequency band to retrievepublic float getBandf(int i)
i - Which frequency band to retrievepublic double getSquare(int i)
i - Frequency bandpublic float getSquaref(int i)
i - Frequency bandpublic double getAverage(int minBand,
int avgBands)
minBand - The first band to start atavgBands - How many bands to averagepublic float getAveragef(int minBand,
int avgBands)
minBand - The first band to start atavgBands - How many bands to averageLX library by Mark C. Slee. © 2012-2020