This program plots spectrograms (vertical slices of intensities versus frequencies, with slices plotted against time). PlotSpectrogram is designed for ease of use.
• Intensities are in log units, with the dynamic range limited (80 dB by default). This strategy avoids the problem of low level portions of the spectrogram expanding the dynamic range and thereby obscuring the detail of the energetic portions.
• The intensities are calculated as absolute units of dBov (decibels relative to overload).
• The time-frequency resolution of the spectrogram can be controlled. The bandwidth resolution of the spectrogram can be directly specified. The default is a narrowband spectrogram. Optionally, the analysis window can be specified in terms of coefficients, bandwidth, or length.
• The frequency transform properly takes into account the time-aliasing when analyzing long windows (corresponding to small bandwidths).
• The number of spectrogram slices can be specified (default 500).
• The number of frequency points can be specified (default is to automatically choose either 513 or 1025 values, depending on the window length).
• An optional pre-emphasis can be applied to better show the high frequency intensities.
• All windows are centered at their respective time points. This means that the windows at the end points of the time interval will include samples on both sides of the end points.
• A subset of frequencies can be plotted to give an expanded view.
• The default plot uses a gray-scale (dark is more intense). The spectrogram can optionally be colorized using the SpecColorMap (included). This mapping adds color (pale yellow through red going to black) but also reproduces properly in gray-level when photocopied.
Update to BSD License - no files changed
Create scripts with code, output, and formatted text in a single executable document.