octaveSpectrumEstimator
Description
The octaveSpectrumEstimator
System object™ measures the spectrum of streaming audio data using octave or fractional-octave
bands.
To estimate the octave-band spectrum:
Create the
octaveSpectrumEstimator
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Syntax
Description
creates an
octave spectrum estimator System object with default property values.o
= octaveSpectrumEstimator
sets the SampleRate
property to o
= octaveSpectrumEstimator(fs
)fs
.
sets Properties using one or more
name-value arguments.o
= octaveSpectrumEstimator(Name=Value
)
Properties
Usage
Description
Input Arguments
Output Arguments
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Examples
Algorithms
To compute the octave-band spectrum, the octaveSpectrumEstimator
object first
optionally applies frequency-weighted filtering on the input signal using weightingFilter
based on the FrequencyWeighting
property. The octaveSpectrumEstimator
object then passes
the signal through an octave filter bank constructed using octaveFilterBank
with the Bandwidth
, FrequencyRange
, ReferenceFrequency
, FilterOrder
, and OctaveRatioBase
properties. The octaveSpectrumEstimator
object takes the
square of the filter bank output to get the power in each band then applies an averaging,
time-weighted filter to perform time smoothing on the power values.
The time-weighted filter with attack time A and release time R is defined as:
The attack time coefficient αA with sample rate Fs is:
The release time coefficient αR is:
References
[1] Acoustical Society of America. American National Standard Specification for Octave-Band and Fractional-Octave-Band Analog and Digital Filters. ANSI S1.11-2004. Melville, NY: Acoustical Society of America, 2009.
Extended Capabilities
Version History
Introduced in R2024b