Class SpectralPeakTracks
Finds and stores info about spectral peak tracks ie whistles and chirps in the passed spectrogram.
Inheritance
SpectralPeakTracks
Assembly: AudioAnalysisTools.dll
public class SpectralPeakTracks
Constructors
|
Improve this Doc
View Source
Initializes a new instance of the SpectralPeakTracks class.
CONSTRUCTOR NOTE: Orientation of passed spectrogram is: row = spectral frames, columns = frequency bins.
Declaration
public SpectralPeakTracks(double[, ] dBSpectrogram, double peakThreshold)
Parameters
Type |
Name |
Description |
Double[,] |
dBSpectrogram |
|
Double |
peakThreshold |
|
Properties
|
Improve this Doc
View Source
Declaration
public double[, ] Peaks { get; }
Property Value
|
Improve this Doc
View Source
Gets spectrum of horizontal ridges.
Declaration
public double[] RhzSpectrum { get; }
Property Value
|
Improve this Doc
View Source
gets spectrum of negative slope ridges.
Declaration
public double[] RngSpectrum { get; }
Property Value
|
Improve this Doc
View Source
Gets spectrum of positive slope ridges.
Declaration
public double[] RpsSpectrum { get; }
Property Value
|
Improve this Doc
View Source
Gets spectrum of vertical ridges.
Declaration
public double[] RvtSpectrum { get; }
Property Value
|
Improve this Doc
View Source
Gets the fractional peak cover; i.e. fraction of frames in freq bin that are a spectral peak.
Declaration
public double[] SptSpectrum { get; }
Property Value
|
Improve this Doc
View Source
Gets average number of tracks per frame.
Declaration
public double TrackDensity { get; }
Property Value
Methods
|
Improve this Doc
View Source
CALCULATEs SPECTRAL PEAK TRACKS: spectralIndices.SPT, RHZ, RVT, RPS, RNG
This method is only called from IndexCalulate.analysis() when the IndexCalculation Duration is less than 10 seconds,
because need to recalculate background noise etc.
Otherwise the constructor of this class is called: sptInfo = new SpectralPeakTracks(decibelSpectrogram, peakThreshold);
NOTE: We require a noise reduced decibel spectrogram
FreqBinWidth can be accessed, if required, through dspOutput1.FreqBinWidth.
Declaration
public static SpectralPeakTracks CalculateSpectralPeakTracks(AudioRecording recording, int sampleStart, int sampleEnd, int frameSize, bool octaveScale, double peakThreshold)
Parameters
Returns
|
Improve this Doc
View Source
This method only called from Indexcalculate when returning image of the sonogram for the passed recording segment.
Declaration
public static double[] ConvertSpectralPeaksToNormalisedArray(double[, ] spectrogram)
Parameters
Type |
Name |
Description |
Double[,] |
spectrogram |
|
Returns
|
Improve this Doc
View Source
Declaration
public static string[] GetDefaultRidgeKeys()
Returns
|
Improve this Doc
View Source
Calculates spectral peak tracks.
Declaration
public void GetPeakTracksSpectrum(double[, ] dBSpectrogram, double dBThreshold)
Parameters
Type |
Name |
Description |
Double[,] |
dBSpectrogram |
typically a decibel noise-reduced spectrogram.
|
Double |
dBThreshold |
threshold for spectral peak to be a valid peak.
|
|
Improve this Doc
View Source
Declaration
public void GetRidgeSpectraVersion1(double[, ] dbSpectrogramData, double ridgeThreshold)
Parameters
Type |
Name |
Description |
Double[,] |
dbSpectrogramData |
|
Double |
ridgeThreshold |
|
|
Improve this Doc
View Source
Declaration
public void GetRidgeSpectraVersion2(double[, ] dbSpectrogramData)
Parameters
Type |
Name |
Description |
Double[,] |
dbSpectrogramData |
|
|
Improve this Doc
View Source
Finds local spectral peaks in a spectrogram, one frame at a time.
IMPORTANT: Assume that the spectrogram matrix is oriented 90 degrees to visual orientation.
i.e the rows = spectra; columns = freq bins.
Declaration
public static double[, ] LocalSpectralPeaks(double[, ] dBSpectrogram, double dBThreshold)
Parameters
Type |
Name |
Description |
Double[,] |
dBSpectrogram |
|
Double |
dBThreshold |
|
Returns
Extension Methods