whistleDetector
Class WhistleShape
java.lang.Object
whistleDetector.WhistleShape
- All Implemented Interfaces:
- java.lang.Comparable<WhistleShape>
public class WhistleShape
- extends java.lang.Object
- implements java.lang.Comparable<WhistleShape>
- Author:
- Doug Gillespie
Structure for potential whistles created by the WhistleLinker
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
channel
private int channel
whistlePeaks
private java.util.ArrayList<WhistlePeak> whistlePeaks
nSoundClash
int nSoundClash
gradient
double gradient
gap
int gap
dBAmplitude
private double dBAmplitude
lastPeak
private WhistlePeak lastPeak
minFreq
private int minFreq
maxFreq
private int maxFreq
WhistleShape
WhistleShape(int channel)
addPeak
public void addPeak(WhistlePeak peak)
- Add a new peak to the contour
- Parameters:
peak - reference to a WhistlePeak- See Also:
WhistlePeak
getAmplitude
double getAmplitude()
getSliceCount
public int getSliceCount()
- Returns:
- The total number of FFT time partitions
included in the contour
GetPeak
public WhistlePeak GetPeak(int iP)
- Get the reference ot a peak at a specific reference
- Parameters:
iP - Peak index within the contour
- Returns:
- peak reference
- See Also:
WhistlePeak
compareTo
public int compareTo(WhistleShape w)
- Compare this whistle to that of another whistle
- Specified by:
compareTo in interface java.lang.Comparable<WhistleShape>
- Parameters:
w - Reference to a different Whistle
- Returns:
- 1 if this whistle is the longer of the two
-1 otherwise.
getLastPeak
public WhistlePeak getLastPeak()
getMaxFreq
public int getMaxFreq()
getMinFreq
public int getMinFreq()
getDBAmplitude
public double getDBAmplitude()
- Returns:
- Returns the dBAmplitude.
setDBAmplitude
public void setDBAmplitude(double amplitude)
- Parameters:
amplitude - The dBAmplitude to set.