Class FrequencyAnalyzer
java.lang.Object
nl.genart.VJMotion.frequencyanalyzer.FrequencyAnalyzer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMinim
(ddf.minim.Minim minim) int
avgSize()
debug()
void
dispose()
void
draw()
float[]
float
getAvgRaw
(int index) float
getAvgRawLeft
(int index) float
getAvgRawRight
(int index) float
getBand
(int i) float
getBandLeft
(int i) float
getBandRight
(int i) ddf.minim.analysis.FFT
getFFT()
ddf.minim.analysis.FFT
ddf.minim.analysis.FFT
float[]
float[]
float
Returns the overall normalized volume (0 to 1) across all frequency bands.float
getVolume
(int band) Returns the normalized volume (0 to 1) of a logarithmic frequency band.void
keyEvent
(processing.event.KeyEvent event) void
void
post()
void
pre()
void
resetMaxValueDuration
(float duration) setAudioInputMode
(AudioInputMode newMode) setAudioInputMode
(AudioInputMode newMode, int size) setInfoPanelKey
(char keyboardKey) setInfoPanelY
(int y) int
specSize()
-
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()
-