Class Spectrogram

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.QuickInfoSupporter, adams.core.ShallowCopySupporter<AbstractAudioFeatureGenerator>, adams.core.SizeOfHandler, Serializable, Comparable

    public class Spectrogram
    extends AbstractWaveFeatureGenerator
    implements adams.core.QuickInfoSupporter
    Generates a spectrogram from the audio data.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_FFTSampleSize

        protected int m_FFTSampleSize
        the FFT sample size (power of 2).
      • m_OverlapFactor

        protected int m_OverlapFactor
        the overlap factor (1/factor).
      • m_Normalized

        protected boolean m_Normalized
        whether to return the normalized spectrogram.
    • Constructor Detail

      • Spectrogram

        public Spectrogram()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • setFFTSampleSize

        public void setFFTSampleSize​(int value)
        Sets the FFT sample size (power of 2).
        Parameters:
        value - the sample size
      • getFFTSampleSize

        public int getFFTSampleSize()
        Returns the FFT samepl size (power of 2).
        Returns:
        the sample size
      • FFTSampleSizeTipText

        public String FFTSampleSizeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setOverlapFactor

        public void setOverlapFactor​(int value)
        Sets the overlap factor (1/factor).
        Parameters:
        value - the factor
      • getOverlapFactor

        public int getOverlapFactor()
        Returns the overlap factor (1/factor).
        Returns:
        the factor
      • overlapFactorTipText

        public String overlapFactorTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setNormalized

        public void setNormalized​(boolean value)
        Sets whether to use normalized or absolute spectrogram.
        Parameters:
        value - true if to use normalized spectrogram
      • getNormalized

        public boolean getNormalized()
        Returns whether to use normalized or absolute spectrogram.
        Returns:
        true if to use normalized spectrogram
      • normalizedTipText

        public String normalizedTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the actor, which will be displayed in the GUI.
        Specified by:
        getQuickInfo in interface adams.core.QuickInfoSupporter
        Returns:
        null if no info available, otherwise short string