|
Loris 1.5
|
#include <Harmonifier.h>
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) |
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.
| 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.
| Loris::Harmonifier::Harmonifier | ( | Iter | b, |
| Iter | e, | ||
| Partial::label_type | refLabel, | ||
| 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 reference Partial is the first Partial in the range [b,e) having the specified label.
| 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.
| InvalidArgument | if no Partial in the range [b,e) has the specified label. |
| InvalidArgument | if refLabel is non-positive. |
| Loris::Harmonifier::Harmonifier | ( | Iter | b, |
| Iter | e, | ||
| Partial::label_type | refLabel, | ||
| 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 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.
| 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.
| InvalidArgument | if no Partial in the range [b,e) has the specified label. |
| InvalidArgument | if refLabel is non-positive. |
| void Loris::Harmonifier::harmonify | ( | Iter | b, |
| Iter | e, | ||
| Partial::label_type | refLabel, | ||
| const Envelope & | env, | ||
| double | threshold_dB = 0 |
||
| ) | [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.
| 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). |
| 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.
| void Loris::Harmonifier::harmonify | ( | Iter | b, |
| Iter | e, | ||
| Partial::label_type | refLabel, | ||
| double | threshold_dB = 0 |
||
| ) | [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.
| 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). |
| 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.