Package com.tagtraum.audiokern.math
Class Peaks
- java.lang.Object
-
- com.tagtraum.audiokern.math.Peaks
-
public final class Peaks extends Object
Peaks.- Author:
- Hendrik Schreiber
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Peaks.ContrastPeak
static class
Peaks.Peak
static interface
Peaks.PeakPicker<T extends Peaks.Peak>
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Peaks.PeakPicker<Peaks.ContrastPeak>
createAbsoluteContrastPeakPicker(float absoluteThreshold)
A given local maximum will be considered as a peak if its distance to the previous and successive local minima (if any) is higher than this absolute threshold.static Peaks.PeakPicker<Peaks.ContrastPeak>
createRelativeContrastPeakPicker(float relativeThreshold)
A given local maximum will be considered as a peak if its distance to the previous and successive local minima (if any) is higher than this threshold.
-
-
-
Method Detail
-
createRelativeContrastPeakPicker
public static Peaks.PeakPicker<Peaks.ContrastPeak> createRelativeContrastPeakPicker(float relativeThreshold)
A given local maximum will be considered as a peak if its distance to the previous and successive local minima (if any) is higher than this threshold. This distance is expressed with respect to the total amplitude of x: a distance of 1, for instance, is equivalent to the distance between the maximum and the minimum of x. A reasonable default is 0.1.- Parameters:
relativeThreshold
- e.g. 0.1- Returns:
- a suitable
Peaks.PeakPicker
-
createAbsoluteContrastPeakPicker
public static Peaks.PeakPicker<Peaks.ContrastPeak> createAbsoluteContrastPeakPicker(float absoluteThreshold)
A given local maximum will be considered as a peak if its distance to the previous and successive local minima (if any) is higher than this absolute threshold.- Parameters:
absoluteThreshold
- absolute threshold- Returns:
- a suitable
Peaks.PeakPicker
-
-