Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

Loris::Analyzer Class Reference

Class Analyzer represents a configuration of parameters for performing Reassigned Bandwidth-Enhanced Additive Analysis of sampled sounds. More...

#include <Analyzer.h>

List of all members.

Public Member Functions

 Analyzer (double resolutionHz)
 Construct a new Analyzer configured with the given frequency resolution (minimum instantaneous frequency difference between Partials).

 Analyzer (double resolutionHz, double windowWidthHz)
 Construct a new Analyzer configured with the given frequency resolution (minimum instantaneous frequency difference between Partials) and analysis window width (main lobe, zero-to-zero).

 Analyzer (const Analyzer &other)
 Construct a new Analyzer having identical parameter configuration to another Analyzer.

 ~Analyzer (void)
 Destroy this Analyzer.

Analyzeroperator= (const Analyzer &rhs)
 Construct a new Analyzer having identical parameter configuration to another Analyzer.

void configure (double resolutionHz, double windowWidthHz)
 Configure this Analyzer with the given frequency resolution (minimum instantaneous frequency difference between Partials) and analysis window width (main lobe, zero-to-zero, in Hz).

void analyze (const std::vector< double > &vec, double srate)
 Analyze a vector of (mono) samples at the given sample rate (in Hz) and append the extracted Partials to Analyzer's PartialList (std::list of Partials).

void analyze (const double *bufBegin, const double *bufEnd, double srate)
 Analyze a range of (mono) samples at the given sample rate (in Hz) and collect the resulting Partials.

void analyze (const std::vector< double > &vec, double srate, const Envelope &reference)
 Analyze a vector of (mono) samples at the given sample rate (in Hz) and append the extracted Partials to Analyzer's PartialList (std::list of Partials).

void analyze (const double *bufBegin, const double *bufEnd, double srate, const Envelope &reference)
 Analyze a range of (mono) samples at the given sample rate (in Hz) and append the extracted Partials to Analyzer's PartialList (std::list of Partials).

double ampFloor (void) const
 Return the amplitude floor (lowest detected spectral amplitude), in (negative) dB, for this Analyzer.

bool associateBandwidth (void) const
 Return true if this Analyzer is configured to peform bandwidth association to distribute noise energy among extracted Partials, and false if noise energy will be collected in noise Partials, labeled -1 in this Analyzer's PartialList.

double bwRegionWidth (void) const
 Return the width (in Hz) of the Bandwidth Association regions used by this Analyzer.

double cropTime (void) const
 Return the crop time (maximum temporal displacement of a time- frequency data point from the time-domain center of the analysis window, beyond which data points are considered "unreliable") for this Analyzer.

double freqDrift (void) const
 Return the maximum allowable frequency difference between consecutive Breakpoints in a Partial envelope for this Analyzer.

double freqFloor (void) const
 Return the frequency floor (minimum instantaneous Partial frequency), in Hz, for this Analyzer.

double freqResolution (void) const
 Return the frequency resolution (minimum instantaneous frequency difference between Partials) for this Analyzer.

double hopTime (void) const
 Return the hop time (which corresponds approximately to the average density of Partial envelope Breakpoint data) for this Analyzer.

double sidelobeLevel (void) const
 Return the sidelobe attenutation level for the Kaiser analysis window in positive dB.

double windowWidth (void) const
 Return the frequency-domain main lobe width (measured between zero-crossings) of the analysis window used by this Analyzer.

void setAmpFloor (double x)
 Set the amplitude floor (lowest detected spectral amplitude), in (negative) dB, for this Analyzer.

void setBwRegionWidth (double x)
 Set the width (in Hz) of the Bandwidth Association regions used by this Analyzer.

void setCropTime (double x)
 Set the crop time (maximum temporal displacement of a time- frequency data point from the time-domain center of the analysis window, beyond which data points are considered "unreliable") for this Analyzer.

void setFreqDrift (double x)
 Set the maximum allowable frequency difference between consecutive Breakpoints in a Partial envelope for this Analyzer.

void setFreqFloor (double x)
 Set the frequency floor (minimum instantaneous Partial frequency), in Hz, for this Analyzer.

void setFreqResolution (double x)
 Set the frequency resolution (minimum instantaneous frequency difference between Partials) for this Analyzer.

void setHopTime (double x)
 Set the hop time (which corresponds approximately to the average density of Partial envelope Breakpoint data) for this Analyzer.

void setSidelobeLevel (double x)
 Set the sidelobe attenutation level for the Kaiser analysis window in positive dB.

void setWindowWidth (double x)
 Set the frequency-domain main lobe width (measured between zero-crossings) of the analysis window used by this Analyzer.

PartialList & partials (void)
 Return a mutable reference to this Analyzer's list of analyzed Partials.

const PartialList & partials (void) const
 Return an immutable (const) reference to this Analyzer's list of analyzed Partials.


Detailed Description

Class Analyzer represents a configuration of parameters for performing Reassigned Bandwidth-Enhanced Additive Analysis of sampled sounds.

The analysis process yields a collection of Partials, each having a trio of synchronous, non-uniformly- sampled breakpoint envelopes representing the time-varying frequency, amplitude, and noisiness of a single bandwidth- enhanced sinusoid. These Partials are accumulated in the Analyzer.

The core analysis parameter is the frequency resolution, the minimum instantaneous frequency spacing between partials. All other parameters are initially configured according to this parameter (and the analysis window width, if specified). Subsequent parameter mutations are independent.

For more information about Reassigned Bandwidth-Enhanced Analysis and the Reassigned Bandwidth-Enhanced Additive Sound Model, refer to the Loris website: www.cerlsoundgroup.org/Loris/.


Constructor & Destructor Documentation

Loris::Analyzer::Analyzer double  resolutionHz  )  [explicit]
 

Construct a new Analyzer configured with the given frequency resolution (minimum instantaneous frequency difference between Partials).

All other Analyzer parameters are computed from the specified frequency resolution.

Parameters:
resolutionHz is the frequency resolution in Hz.

Loris::Analyzer::Analyzer double  resolutionHz,
double  windowWidthHz
 

Construct a new Analyzer configured with the given frequency resolution (minimum instantaneous frequency difference between Partials) and analysis window width (main lobe, zero-to-zero).

All other Analyzer parameters are computed from the specified resolution and window width.

Parameters:
resolutionHz is the frequency resolution in Hz.
windowWidthHz is the main lobe width of the Kaiser analysis window in Hz.

Loris::Analyzer::Analyzer const Analyzer other  ) 
 

Construct a new Analyzer having identical parameter configuration to another Analyzer.

The list of collected Partials is not copied.

Parameters:
other is the Analyzer to copy.


Member Function Documentation

double Loris::Analyzer::ampFloor void   )  const
 

Return the amplitude floor (lowest detected spectral amplitude), in (negative) dB, for this Analyzer.

void Loris::Analyzer::analyze const double *  bufBegin,
const double *  bufEnd,
double  srate,
const Envelope reference
 

Analyze a range of (mono) samples at the given sample rate (in Hz) and append the extracted Partials to Analyzer's PartialList (std::list of Partials).

Use the specified envelope as a frequency reference for Partial tracking.

Parameters:
bufBegin is a pointer to a buffer of floating point samples
bufEnd is (one-past) the end of a buffer of floating point samples
srate is the sample rate of the samples in the buffer
reference is an Envelope having the approximate frequency contour expected of the resulting Partials.

void Loris::Analyzer::analyze const std::vector< double > &  vec,
double  srate,
const Envelope reference
 

Analyze a vector of (mono) samples at the given sample rate (in Hz) and append the extracted Partials to Analyzer's PartialList (std::list of Partials).

Use the specified envelope as a frequency reference for Partial tracking.

Parameters:
vec is a vector of floating point samples
srate is the sample rate of the samples in the vector
reference is an Envelope having the approximate frequency contour expected of the resulting Partials.

void Loris::Analyzer::analyze const double *  bufBegin,
const double *  bufEnd,
double  srate
 

Analyze a range of (mono) samples at the given sample rate (in Hz) and collect the resulting Partials.

Parameters:
bufBegin is a pointer to a buffer of floating point samples
bufEnd is (one-past) the end of a buffer of floating point samples
srate is the sample rate of the samples in the buffer

void Loris::Analyzer::analyze const std::vector< double > &  vec,
double  srate
 

Analyze a vector of (mono) samples at the given sample rate (in Hz) and append the extracted Partials to Analyzer's PartialList (std::list of Partials).

Parameters:
vec is a vector of floating point samples
srate is the sample rate of the samples in the vector

double Loris::Analyzer::bwRegionWidth void   )  const
 

Return the width (in Hz) of the Bandwidth Association regions used by this Analyzer.

If zero, bandwidth enhancement is disabled.

void Loris::Analyzer::configure double  resolutionHz,
double  windowWidthHz
 

Configure this Analyzer with the given frequency resolution (minimum instantaneous frequency difference between Partials) and analysis window width (main lobe, zero-to-zero, in Hz).

All other Analyzer parameters are (re-)computed from the frequency resolution and window width.

Parameters:
resolutionHz is the frequency resolution in Hz.
windowWidthHz is the main lobe width of the Kaiser analysis window in Hz.
There are three categories of analysis parameters:
  • the resolution, and params that are usually related to (or identical to) the resolution (frequency floor and drift)
  • the window width and params that are usually related to (or identical to) the window width (hop and crop times)
  • independent parameters (bw region width and amp floor)

double Loris::Analyzer::freqDrift void   )  const
 

Return the maximum allowable frequency difference between consecutive Breakpoints in a Partial envelope for this Analyzer.

double Loris::Analyzer::freqFloor void   )  const
 

Return the frequency floor (minimum instantaneous Partial frequency), in Hz, for this Analyzer.

double Loris::Analyzer::freqResolution void   )  const
 

Return the frequency resolution (minimum instantaneous frequency difference between Partials) for this Analyzer.

Analyzer& Loris::Analyzer::operator= const Analyzer rhs  ) 
 

Construct a new Analyzer having identical parameter configuration to another Analyzer.

The list of collected Partials is not copied.

Parameters:
rhs is the Analyzer to copy.

void Loris::Analyzer::setAmpFloor double  x  ) 
 

Set the amplitude floor (lowest detected spectral amplitude), in (negative) dB, for this Analyzer.

Parameters:
x is the new value of this parameter.

void Loris::Analyzer::setBwRegionWidth double  x  ) 
 

Set the width (in Hz) of the Bandwidth Association regions used by this Analyzer.

If zero, bandwidth enhancement is disabled.

Parameters:
x is the new value of this parameter.

void Loris::Analyzer::setCropTime double  x  ) 
 

Set the crop time (maximum temporal displacement of a time- frequency data point from the time-domain center of the analysis window, beyond which data points are considered "unreliable") for this Analyzer.

Parameters:
x is the new value of this parameter.

void Loris::Analyzer::setFreqDrift double  x  ) 
 

Set the maximum allowable frequency difference between consecutive Breakpoints in a Partial envelope for this Analyzer.

Parameters:
x is the new value of this parameter.

void Loris::Analyzer::setFreqFloor double  x  ) 
 

Set the frequency floor (minimum instantaneous Partial frequency), in Hz, for this Analyzer.

Parameters:
x is the new value of this parameter.

void Loris::Analyzer::setFreqResolution double  x  ) 
 

Set the frequency resolution (minimum instantaneous frequency difference between Partials) for this Analyzer.

(Does not cause other parameters to be recomputed.)

Parameters:
x is the new value of this parameter.

void Loris::Analyzer::setHopTime double  x  ) 
 

Set the hop time (which corresponds approximately to the average density of Partial envelope Breakpoint data) for this Analyzer.

Parameters:
x is the new value of this parameter.

void Loris::Analyzer::setSidelobeLevel double  x  ) 
 

Set the sidelobe attenutation level for the Kaiser analysis window in positive dB.

More negative numbers (e.g. -90) give very good sidelobe rejection but cause the window to be longer in time. Less negative numbers raise the level of the sidelobes, increasing the likelihood of frequency-domain interference, but allow the window to be shorter in time.

Parameters:
x is the new value of this parameter.

void Loris::Analyzer::setWindowWidth double  x  ) 
 

Set the frequency-domain main lobe width (measured between zero-crossings) of the analysis window used by this Analyzer.

Parameters:
x is the new value of this parameter.

double Loris::Analyzer::sidelobeLevel void   )  const
 

Return the sidelobe attenutation level for the Kaiser analysis window in positive dB.

Larger numbers (e.g. 90) give very good sidelobe rejection but cause the window to be longer in time. Smaller numbers (like 60) raise the level of the sidelobes, increasing the likelihood of frequency-domain interference, but allow the window to be shorter in time.

double Loris::Analyzer::windowWidth void   )  const
 

Return the frequency-domain main lobe width (measured between zero-crossings) of the analysis window used by this Analyzer.


Generated on Thu Apr 14 22:01:55 2005 for Loris by doxygen 1.3.4