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

Loris::Channelizer Class Reference

Class Channelizer represents an algorithm for automatic labeling of a sequence of Partials. More...

#include <Channelizer.h>

List of all members.

Public Member Functions

 Channelizer (const Envelope &refChanFreq, int refChanLabel)
 
Exceptions:
InvalidArgument if refChanLabel is not positive.


 Channelizer (const Channelizer &other)
 Construct a new Channelizer that is an exact copy of another.

Channelizeroperator= (const Channelizer &rhs)
 Assignment operator: make this Channelizer an exact copy of another.

 ~Channelizer (void)
 Destroy this Channelizer.

void channelize (Partial &partial) const
 Label a Partial with the number of the frequency channel containing the greatest portion of its (the Partial's) energy.

template<typename Iter> void channelize (Iter begin, Iter end) const
 Assign each Partial in the specified half-open (STL-style) range the label corresponding to the frequency channel containing the greatest portion of its (the Partial's) energy.

template<typename Iter> void operator() (Iter begin, Iter end) const
 Function call operator: same as channelize().


Static Public Member Functions

template<typename Iter> void channelize (Iter begin, Iter end, const Envelope &refChanFreq, int refChanLabel)
 Static member that constructs an instance and applies it to a sequence of Partials.


Detailed Description

Class Channelizer represents an algorithm for automatic labeling of a sequence of Partials.

Partials must be labeled in preparation for morphing (see Morpher) to establish correspondences between Partials in the morph source and target sounds.

Channelized partials are labeled according to their adherence to a harmonic frequency structure with a time-varying fundamental frequency. The frequency spectrum is partitioned into non-overlapping channels having time-varying center frequencies that are harmonic (integer) multiples of a specified reference frequency envelope, and each channel is identified by a unique label equal to its harmonic number. Each Partial is assigned the label corresponding to the channel containing the greatest portion of its (the Partial's) energy.

A reference frequency Envelope for channelization and the channel number to which it corresponds (1 for an Envelope that tracks the Partial at the fundamental frequency) must be specified. The reference Envelope can be constructed explcitly, point by point (using, for example, the BreakpointEnvelope class), or constructed automatically using the FrequencyReference class.

Channelizer is a leaf class, do not subclass.


Constructor & Destructor Documentation

Loris::Channelizer::Channelizer const Envelope refChanFreq,
int  refChanLabel
 

Exceptions:
InvalidArgument if refChanLabel is not positive.

Parameters:
refChanFreq is an Envelope representing the center frequency of a channel.
refChanLabel is the corresponding channel number (i.e. 1 if refChanFreq is the lowest-frequency channel, and all other channels are harmonics of refChanFreq, or 2 if refChanFreq tracks the second harmonic, etc.).

Loris::Channelizer::Channelizer const Channelizer other  ) 
 

Construct a new Channelizer that is an exact copy of another.

The copy represents the same set of frequency channels, constructed from the same reference Envelope and channel number.

Parameters:
other is the Channelizer to copy


Member Function Documentation

template<typename Iter>
void Loris::Channelizer::channelize Iter  begin,
Iter  end,
const Envelope refChanFreq,
int  refChanLabel
[static]
 

Static member that constructs an instance and applies it to a sequence of Partials.

Construct a Channelizer using the specified Envelope and reference label, and use it to channelize a sequence of Partials.

Parameters:
begin is the beginning of a sequence of Partials to channelize.
end is the end of a sequence of Partials to channelize.
refChanFreq is an Envelope representing the center frequency of a channel.
refChanLabel is the corresponding channel number (i.e. 1 if refChanFreq is the lowest-frequency channel, and all other channels are harmonics of refChanFreq, or 2 if refChanFreq tracks the second harmonic, etc.).
Exceptions:
InvalidArgument if refChanLabel is not positive.
If compiled with NO_TEMPLATE_MEMBERS defined, then begin and end must be PartialList::iterators, otherwise they can be any type of iterators over a sequence of Partials.

template<typename Iter>
void Loris::Channelizer::channelize Iter  begin,
Iter  end
const
 

Assign each Partial in the specified half-open (STL-style) range the label corresponding to the frequency channel containing the greatest portion of its (the Partial's) energy.

Parameters:
begin is the beginning of the range of Partials to channelize
end is (one-past) the end of the range of Partials to channelize
If compiled with NO_TEMPLATE_MEMBERS defined, then begin and end must be PartialList::iterators, otherwise they can be any type of iterators over a sequence of Partials.

void Loris::Channelizer::channelize Partial partial  )  const
 

Label a Partial with the number of the frequency channel containing the greatest portion of its (the Partial's) energy.

Parameters:
partial is the Partial to label.

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

Assignment operator: make this Channelizer an exact copy of another.

This Channelizer is made to represent the same set of frequency channels, constructed from the same reference Envelope and channel number as rhs.

Parameters:
rhs is the Channelizer to copy


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