com.badlogic.gdx.audio.analysis
Class ThresholdFunction
java.lang.Object
com.badlogic.gdx.audio.analysis.ThresholdFunction
public class ThresholdFunction
- extends java.lang.Object
Calculates a threshold function based on the spectral flux.
- Author:
- badlogicgames@gmail.com
Constructor Summary |
ThresholdFunction(int historySize,
float multiplier)
Consturctor, sets the history size in number of spectra to take into account to calculate the average spectral flux at a
specific position. |
Method Summary |
java.util.List<java.lang.Float> |
calculate(java.util.List<java.lang.Float> spectralFlux)
Returns the threshold function for a given spectral flux function. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThresholdFunction
public ThresholdFunction(int historySize,
float multiplier)
- Consturctor, sets the history size in number of spectra to take into account to calculate the average spectral flux at a
specific position. Also sets the multiplier to multiply the average with.
- Parameters:
historySize
- The history size.multiplier
- The average multiplier.
calculate
public java.util.List<java.lang.Float> calculate(java.util.List<java.lang.Float> spectralFlux)
- Returns the threshold function for a given spectral flux function.
- Returns:
- The threshold function.
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)