Loris::Harmonifier Class Reference

#include <Harmonifier.h>

List of all members.

Public Member Functions

 Harmonifier (const Partial &ref, double threshold_dB=0)
 Harmonifier (const Partial &ref, const Envelope &env, double threshold_dB=0)
template<typename Iter >
 Harmonifier (Iter b, Iter e, Partial::label_type refLabel, double threshold_dB=0)
template<typename Iter >
 Harmonifier (Iter b, Iter e, Partial::label_type refLabel, const Envelope &env, double threshold_dB=0)
 ~Harmonifier (void)
 Destructor.
void harmonify (Partial &p) const
 Apply the reference envelope to a Partial.
template<typename Iter >
void harmonify (Iter b, Iter e)
 Apply the reference envelope to all Partials in a range.

Static Public Member Functions

template<typename Iter >
static void harmonify (Iter b, Iter e, Partial::label_type refLabel, double threshold_dB=0)
template<typename Iter >
static void harmonify (Iter b, Iter e, Partial::label_type refLabel, const Envelope &env, double threshold_dB=0)

Detailed Description

A Harmonifier uses a reference frequency envelope to make the frequencies of labeled Partials harmonic. The amount of frequency adjustment can be controlled by a time-varying envelope, and a threshold can be supplied so that only quiet Partials are affected.


Constructor & Destructor Documentation

Loris::Harmonifier::Harmonifier ( const Partial ref,
double  threshold_dB = 0 
)

weighting function, when 1 harmonic frequencies are used, when 0 breakpoint frequencies are unmodified. Construct a new Harmonifier that applies the specified reference Partial to fix the frequencies of Breakpoints whose amplitude is below threshold_dB (0 by default, to apply only to quiet Partials, specify a threshold, like -90).

Loris::Harmonifier::Harmonifier ( const Partial ref,
const Envelope env,
double  threshold_dB = 0 
)

Construct a new Harmonifier that applies the specified reference Partial to fix the frequencies of Breakpoints whose amplitude is below threshold_dB (0 by default, to apply only to quiet Partials, specify a threshold, like -90). The Envelope is a time-varying weighting on the harmonifing process. When 1, harmonic frequencies are used, when 0, breakpoint frequencies are unmodified.

template<typename Iter >
Loris::Harmonifier::Harmonifier ( Iter  b,
Iter  e,
Partial::label_type  refLabel,
double  threshold_dB = 0 
) [inline]

Construct a new Harmonifier that applies the specified reference Partial to fix the frequencies of Breakpoints whose amplitude is below threshold_dB (0 by default, to apply only to quiet Partials, specify a threshold, like -90). The reference Partial is the first Partial in the range [b,e) having the specified label.

Exceptions:
InvalidArgument if no Partial in the range [b,e) has the specified label.

Construct a new Harmonifier that applies the specified reference Partial to fix the frequencies of Breakpoints whose amplitude is below threshold_dB (0 by default, to apply only to quiet Partials, specify a threshold, like -90). The reference Partial is the first Partial in the range [b,e) having the specified label.

Exceptions:
InvalidArgument if no Partial in the range [b,e) has the specified label.
InvalidArgument if refLabel is non-positive.
template<typename Iter >
Loris::Harmonifier::Harmonifier ( Iter  b,
Iter  e,
Partial::label_type  refLabel,
const Envelope env,
double  threshold_dB = 0 
) [inline]

Construct a new Harmonifier that applies the specified reference Partial to fix the frequencies of Breakpoints whose amplitude is below threshold_dB (0 by default, to apply only to quiet Partials, specify a threshold, like -90). The reference Partial is the first Partial in the range [b,e) having the specified label.

The Envelope is a time-varying weighting on the harmonifing process. When 1, harmonic frequencies are used, when 0, breakpoint frequencies are unmodified.

Exceptions:
InvalidArgument if no Partial in the range [b,e) has the specified label.

Construct a new Harmonifier that applies the specified reference Partial to fix the frequencies of Breakpoints whose amplitude is below threshold_dB (0 by default, to apply only to quiet Partials, specify a threshold, like -90). The reference Partial is the first Partial in the range [b,e) having the specified label.

The Envelope is a time-varying weighting on the harmonifing process. When 1, harmonic frequencies are used, when 0, breakpoint frequencies are unmodified.

Exceptions:
InvalidArgument if no Partial in the range [b,e) has the specified label.
InvalidArgument if refLabel is non-positive.

Member Function Documentation

template<typename Iter >
void Loris::Harmonifier::harmonify ( Iter  b,
Iter  e,
Partial::label_type  refLabel,
const Envelope env,
double  threshold_dB = 0 
) [inline, static]

Static member that constructs an instance and applies it to a sequence of Partials. Construct a Harmonifier using as reference the Partial in the specified range labeled refLabel, then apply the instance to all Partials in the range.

Parameters:
b is the beginning of the range of Partials to harmonify
e is (one-past) the end of the range of Partials to harmonify
refLabel is the label of the Partial in [b,e) to use as reference Partial. The reference Partial is the first Partial in the range [b,e) having the specified label.
env is a weighting envelope to apply to the harmonification process: when env is 1, use harmonic frequencies, when env is 0, breakpoint frequencies are unmodified.
threshold_dB is the amplitude below which breakpoint frequencies are harmonified (0 by default, to apply only to quiet Partials, specify a threshold, like -90).
Exceptions:
InvalidArgument if no Partial in the range [b,e) has the specified label.
InvalidArgument if refLabel is non-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::Harmonifier::harmonify ( Iter  b,
Iter  e,
Partial::label_type  refLabel,
double  threshold_dB = 0 
) [inline, static]

Static member that constructs an instance and applies it to a sequence of Partials. Construct a Harmonifier using as reference the Partial in the specified range labeled refLabel, then apply the instance to all Partials in the range.

Parameters:
b is the beginning of the range of Partials to harmonify
e is (one-past) the end of the range of Partials to harmonify
refLabel is the label of the Partial in [b,e) to use as reference Partial. The reference Partial is the first Partial in the range [b,e) having the specified label.
threshold_dB is the amplitude below which breakpoint frequencies are harmonified (0 by default, to apply only to quiet Partials, specify a threshold, like -90).
Exceptions:
InvalidArgument if no Partial in the range [b,e) has the specified label.
InvalidArgument if refLabel is non-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.

The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2