Skip to main content

SpectralAnalyzer

Kindclass
Packagefunkin.vis.dsp
Full namefunkin.vis.dsp.SpectralAnalyzer
Sourcesource/source-haxelib-patches/funkin/vis/dsp/SpectralAnalyzer.hx

Public fields​

NameTypeStaticDefaultNotes
minDbFloatno-70property (default, set)
maxDbFloatno-20property (default, set)
fftNIntno4096property (default, set)
minFreqFloatno20—
maxFreqFloatno22000—

Public methods​

changeSnd​

function changeSnd(audioSource:AudioSource)
ParameterTypeDefault
audioSourceAudioSource—

View source

new (constructor)​

function new(audioSource:AudioSource, barCount:Int, smoothingTimeConstant:Float = 0.8, peakHold:Int = 30)
ParameterTypeDefault
audioSourceAudioSource—
barCountInt—
smoothingTimeConstant (optional)Float0.8
peakHold (optional)Int30

View source

getLevels​

function getLevels(?levels:Array<Bar>):Array<Bar>
ParameterTypeDefault
levels (optional)Array<Bar>—

View source

min​

static inline function min<T:Float>(x:T, y:T):T
ParameterTypeDefault
xT—
yT—

View source

Internals​

Private / internal members
FieldTypeStatic
audioSourceAudioSourceno
audioClipAudioClipno
barCountIntno
smoothingTimeConstantFloatno
peakHoldIntno
fftN2Intno
htmlAnalyzerAnalyzerNodeno
barsArray<BarObject>no
fftFFTno
vis—no
barHistories—no
LN10Floatyes
_bufferArray<Float>no
Method
function normalizedB(value:Float)
function calcBars(barCount:Int, peakHold:Int)
function freqToBin(freq:Float, mathType:MathType = Round):Int
function getSignal(data:lime.utils.UInt8Array, bitsPerSample:Int):Array<Float>
static inline function clamp<T:Float>(val:T, min:T, max:T):T
function set_minDb(value:Float):Float
function set_maxDb(value:Float):Float
function set_fftN(value:Int):Int