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

Loris::Resampler Class Reference

Class Resampler represents an algorithm for resampling Partial envelopes at regular time intervals. More...

#include <Resampler.h>

List of all members.

Public Member Functions

 Resampler (double sampleInterval)
 Construct a new Resampler using the specified sampling interval.

void resample (Partial &p) const
 is performed in-place.

void operator() (Partial &p) const
 Function call operator: same as resample( p ).

template<typename Iter> void resample (Iter begin, Iter end) const
 Resample all Partials in the specified (half-open) range using this Resampler's stored sampling interval, so that the Breakpoints in the Partial envelopes will all lie on a common temporal grid.

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


Static Public Member Functions

template<typename Iter> void resample (Iter begin, Iter end, double sampleInterval)
 Static member that constructs an instance and applies it to a sequence of Partials.


Detailed Description

Class Resampler represents an algorithm for resampling Partial envelopes at regular time intervals.

Resampling makes the envelope data more suitable for exchange (as SDIF data, for example) with other applications that cannot process raw (continuously-distributed) reassigned data. Resampling will often greatly reduce the size of the data (by greatly reducing the number of Breakpoints in the Partials) without adversely affecting the quality of the reconstruction.


Constructor & Destructor Documentation

Loris::Resampler::Resampler double  sampleInterval  )  [explicit]
 

Construct a new Resampler using the specified sampling interval.

Parameters:
sampleInterval is the resampling interval in seconds, Breakpoint data is computed at integer multiples of sampleInterval seconds.
Exceptions:
InvalidArgument if sampleInterval is not positive.


Member Function Documentation

template<typename Iter>
void Loris::Resampler::resample Iter  begin,
Iter  end,
double  sampleInterval
[static]
 

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

Construct a Resampler using the specified resampling interval, and use it to channelize a sequence of Partials.

Parameters:
begin is the beginning of a sequence of Partials to resample.
end is the end of a sequence of Partials to resample.
sampleInterval is the resampling interval in seconds, Breakpoint data is computed at integer multiples of sampleInterval seconds.
Exceptions:
InvalidArgument if sampleInterval 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::Resampler::resample Iter  begin,
Iter  end
const
 

Resample all Partials in the specified (half-open) range using this Resampler's stored sampling interval, so that the Breakpoints in the Partial envelopes will all lie on a common temporal grid.

The Breakpoint times in the resampled Partial will comprise a contiguous sequence of integer multiples of the sampling interval, beginning with the multiple nearest to the Partial's start time and ending with the multiple nearest to the Partial's end time. Resampling is performed in-place.

Parameters:
begin is the beginning of the range of Partials to resample
end is (one-past) the end of the range of Partials to resample
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::Resampler::resample Partial p  )  const
 

is performed in-place.

Parameters:
p is the Partial to resample


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