whistleDetector
Class WhistleShape

java.lang.Object
  extended by 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

Field Summary
private  int channel
           
private  double dBAmplitude
           
(package private)  int gap
           
(package private)  double gradient
           
private  WhistlePeak lastPeak
           
private  int maxFreq
           
private  int minFreq
           
(package private)  int nSoundClash
           
private  java.util.ArrayList<WhistlePeak> whistlePeaks
           
 
Constructor Summary
WhistleShape(int channel)
           
 
Method Summary
 void addPeak(WhistlePeak peak)
          Add a new peak to the contour
 int compareTo(WhistleShape w)
          Compare this whistle to that of another whistle
(package private)  double getAmplitude()
           
 double getDBAmplitude()
           
 WhistlePeak getLastPeak()
           
 int getMaxFreq()
           
 int getMinFreq()
           
 WhistlePeak GetPeak(int iP)
          Get the reference ot a peak at a specific reference
 int getSliceCount()
           
 void setDBAmplitude(double amplitude)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

WhistleShape

WhistleShape(int channel)
Method Detail

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.