Class FrequencyAnalyzer
java.lang.Object
nl.genart.VJMotion.frequencyanalyzer.FrequencyAnalyzer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMinim(ddf.minim.Minim minim) intavgSize()debug()voiddispose()voiddraw()float[]floatgetAvgRaw(int index) floatgetAvgRawLeft(int index) floatgetAvgRawRight(int index) floatgetBand(int i) floatgetBandLeft(int i) floatgetBandRight(int i) ddf.minim.analysis.FFTgetFFT()ddf.minim.analysis.FFTddf.minim.analysis.FFTfloat[]float[]floatReturns the overall normalized volume (0 to 1) across all frequency bands.floatgetVolume(int band) Returns the normalized volume (0 to 1) of a logarithmic frequency band.voidkeyEvent(processing.event.KeyEvent event) voidvoidpost()voidpre()voidresetMaxValueDuration(float duration) setAudioInputMode(AudioInputMode newMode) setAudioInputMode(AudioInputMode newMode, int size) setInfoPanelKey(char keyboardKey) setInfoPanelY(int y) intspecSize()
-
Constructor Details
-
FrequencyAnalyzer
public FrequencyAnalyzer(processing.core.PApplet parent)
-
-
Method Details
-
addMinim
-
setFile
-
resetMaxValueDuration
-
debug
-
setAudioOutputMode
-
setAudioInputMode
-
setAudioInputMode
-
getAudioBuffer
public float[] getAudioBuffer() -
getLeftChannelBuffer
public float[] getLeftChannelBuffer() -
getRightChannelBuffer
public float[] getRightChannelBuffer() -
performFFT
public void performFFT() -
getFFT
public ddf.minim.analysis.FFT getFFT() -
getFFTLeft
public ddf.minim.analysis.FFT getFFTLeft() -
getFFTRight
public ddf.minim.analysis.FFT getFFTRight() -
getBand
public float getBand(int i) -
getBandLeft
public float getBandLeft(int i) -
getBandRight
public float getBandRight(int i) -
specSize
public int specSize() -
avgSize
public int avgSize() -
getAvgRaw
public float getAvgRaw(int index) -
getAvgRawLeft
public float getAvgRawLeft(int index) -
getAvgRawRight
public float getAvgRawRight(int index) -
getVolume
public float getVolume(int band) Returns the normalized volume (0 to 1) of a logarithmic frequency band. This only works after calling fft.logAverages(22, 3), which splits the audible range into ~30 musically spaced bands.- Parameters:
band- the log band index (0 = low bass, up to ~29 = high treble)- Returns:
- normalized volume between 0 and 1 for that band
-
getVolume
public float getVolume()Returns the overall normalized volume (0 to 1) across all frequency bands. This gives you a single value representing the "energy" of the current sound.- Returns:
- average normalized volume across all log frequency bands
-
resetMaxValue
public void resetMaxValue() -
disableKeyPress
-
keyEvent
public void keyEvent(processing.event.KeyEvent event) -
showInfoPanel
-
setInfoPanelY
-
setInfoPanelKey
-
draw
public void draw() -
post
public void post() -
pre
public void pre() -
dispose
public void dispose()
-