Class SpectrogramMelScale
Inheritance
SpectrogramMelScale
Assembly: AudioAnalysisTools.dll
public class SpectrogramMelScale : BaseSonogram
Constructors
|
Improve this Doc
View Source
Declaration
public SpectrogramMelScale(AmplitudeSonogram sg)
Parameters
|
Improve this Doc
View Source
Declaration
public SpectrogramMelScale(AmplitudeSonogram sg, int minHz, int maxHz)
Parameters
|
Improve this Doc
View Source
Declaration
public SpectrogramMelScale(SonogramConfig config, WavReader wav)
Parameters
|
Improve this Doc
View Source
Declaration
public SpectrogramMelScale(string configFile, WavReader wav)
Parameters
Methods
|
Improve this Doc
View Source
THIS METHOD NEEDS TO BE DEBUGGED. HAS NOT BEEN USED IN YEARS!
Use this method to generate grid lines for mel scale image
Currently this method is only called from BaseSonogram.GetImage() when bool doMelScale = true;
Frequencyscale.Draw1kHzLines(Image{Rgb24} bmp, bool doMelScale, int nyquist, double freqBinWidth).
Declaration
public static int[, ] GetMelGridLineLocations(int gridIntervalInHertz, int nyquistFreq, int melBinCount)
Parameters
Type |
Name |
Description |
Int32 |
gridIntervalInHertz |
|
Int32 |
nyquistFreq |
|
Int32 |
melBinCount |
|
Returns
Type |
Description |
Int32[,] |
|
|
Improve this Doc
View Source
WARNING: This method assigns DEFAULT parameters for MEL FREQUENCY SCALE.
It works only for "standard" recordings, i.e. sr = 22050 and frame = 512.
The default MelScale has 64 frequency bins.
The Linear500-octave scale is almost similar and has 66 frequency bands.
Currently, the MEL scale is implemented directly in MakeMelScaleSpectrogram() method.
Declaration
public static FrequencyScale GetStandardMelScale(FrequencyScale scale)
Parameters
Returns
|
Improve this Doc
View Source
Converts amplitude matrix to mel-frequency scale spectrogram.
IMPORTANT NOTE: The conversion to Mel-scale is done BEFORE noise reduction.
And conversion to decibels is done after noise reduction.
Declaration
public override void Make(double[, ] amplitudeM)
Parameters
Type |
Name |
Description |
Double[,] |
amplitudeM |
Matrix of amplitude values.
|
Overrides
|
Improve this Doc
View Source
Converts an amplitude spectrogram to mel-scale spectrogram.
NOTE 1: This method assumes that the entire spectrum ispassed to filter bank.
NOTE 2: The decibel array has been normalised in 0 - 1.
Declaration
public static double[, ] MakeMelScaleSpectrogram(SonogramConfig config, double[, ] amplitudeM, int sampleRate)
Parameters
Returns
Extension Methods