Class HarmonicAnalysis
Inherited Members
Namespace: AudioAnalysisTools
Assembly: AudioAnalysisTools.dll
Syntax
public static class HarmonicAnalysis
Methods
| Improve this Doc View SourceCountHarmonicTracks(Double[], Int32)
Counts the number of spectral tracks or harmonics in the passed ferquency band. Also calculates the average amplitude of the peaks to each succeeding trough.
Declaration
public static Tuple<double, int, bool[]> CountHarmonicTracks(double[] values, int expectedHarmonicCount)
Parameters
Type | Name | Description |
---|---|---|
Double[] | values | Spectral values in the frequency band. |
Int32 | expectedHarmonicCount |
Returns
Type | Description |
---|---|
Tuple<Double, Int32, Boolean[]> |
CountHarmonicTracks(Double[,], Int32, Int32, Int32, Int32, Double)
Declaration
public static Tuple<double[], double[, ]> CountHarmonicTracks(double[, ] matrix, int minBin, int maxBin, int hzWidth, int expectedHarmonicCount, double amplitudeThreshold)
Parameters
Type | Name | Description |
---|---|---|
Double[,] | matrix | |
Int32 | minBin | |
Int32 | maxBin | |
Int32 | hzWidth | |
Int32 | expectedHarmonicCount | |
Double | amplitudeThreshold |
Returns
Type | Description |
---|---|
Tuple<Double[], Double[,]> |
DetectHarmonicsUsingDCT(Double[,], Int32, Int32, Int32, Boolean, Int32, Int32, Double)
THIS METHOD NO LONGER IN USE. NOT USEFUL FOR ANIMAL CALLS. Tried this but it is suitable only when there is guarantee of numerous spectral tracks as in the vowels of human speech. It yields SPURIOUS RESULTS where there is only one whistle track.
Declaration
public static double[, ] DetectHarmonicsUsingDCT(double[, ] matrix, int minBin, int maxBin, int hzWidth, bool normaliseDCT, int minPeriod, int maxPeriod, double dctThreshold)
Parameters
Type | Name | Description |
---|---|---|
Double[,] | matrix | |
Int32 | minBin | |
Int32 | maxBin | |
Int32 | hzWidth | |
Boolean | normaliseDCT | |
Int32 | minPeriod | |
Int32 | maxPeriod | |
Double | dctThreshold |
Returns
Type | Description |
---|---|
Double[,] |
DetectHarmonicsUsingFormantGap(Double[,], Int32, Int32, Int32, Int32, Int32, Int32, Double)
This method did not work much better than the DCT method - see below. Looks for a series of harmonic tracks at fixed freq intervals. Problem is that the harmonic tracks are not necessarily at fixed intervals.
Declaration
public static Tuple<double[], double[, ]> DetectHarmonicsUsingFormantGap(double[, ] matrix, int minBin, int maxBin, int hzWidth, int minPeriod, int maxPeriod, int minHarmonicPeriod, double amplitudeThreshold)
Parameters
Type | Name | Description |
---|---|---|
Double[,] | matrix | |
Int32 | minBin | |
Int32 | maxBin | |
Int32 | hzWidth | |
Int32 | minPeriod | |
Int32 | maxPeriod | |
Int32 | minHarmonicPeriod | |
Double | amplitudeThreshold |
Returns
Type | Description |
---|---|
Tuple<Double[], Double[,]> |
Execute(SpectrogramStandard, Int32, Int32, Int32, Double)
Returns a tuple consisting of:
- an array of scores over the entire recording
- a list of acoustic events
- a matrix of hits corresonding to the spectrogram.
Declaration
public static Tuple<double[], double[, ]> Execute(SpectrogramStandard sonogram, int minHz, int maxHz, int harmonicCount, double amplitudeThreshold)
Parameters
Type | Name | Description |
---|---|---|
SpectrogramStandard | sonogram | sonogram derived from the recording. |
Int32 | minHz | min bound freq band to search. |
Int32 | maxHz | max bound freq band to search. |
Int32 | harmonicCount | expected number of harmonics in the frequency band. |
Double | amplitudeThreshold | ignore harmonics with an amplitude less than this minimum dB. |
Returns
Type | Description |
---|---|
Tuple<Double[], Double[,]> |