#include <SpectralSurface.h>
Public Member Functions | |
| template<typename Iter > | |
| SpectralSurface (Iter b, Iter e) | |
| void | scaleAmplitudes (Partial &p) |
| template<typename Iter > | |
| void | scaleAmplitudes (Iter b, Iter e) |
| void | setAmplitudes (Partial &p) |
| template<typename Iter > | |
| void | setAmplitudes (Iter b, Iter e) |
| double | frequencyStretch (void) const |
| double | timeStretch (void) const |
| double | effect (void) const |
| void | setFrequencyStretch (double stretch) |
| void | setTimeStretch (double stretch) |
| void | setEffect (double effect) |
| Loris::SpectralSurface::SpectralSurface | ( | Iter | b, | |
| Iter | e | |||
| ) | [inline] |
Contsruct a new SpectralSurface from a sequence of distilled Partials.
| b | the beginning of the sequence of Partials | |
| e | the end of the sequence of Partials |
Contsruct a new SpectralSurface from a sequence of distilled Partials.
| b | the beginning of the sequence of Partials | |
| e | the end of the sequence of Partials |
| double Loris::SpectralSurface::effect | ( | void | ) | const |
Return the amount of effect applied by scaleAmplitudes and setAmplitudes (default 1, full effect). Values less than 1 (but greater than 0) reduce the amount of amplitude modified performed by application of the surface. (This is rarely a good way of controlling the amount of the effect.)
| double Loris::SpectralSurface::frequencyStretch | ( | void | ) | const |
Return the amount of strecthing in the frequency dimension (default 1, no stretching). Values greater than 1 stretch the surface in the frequency dimension, values less than 1 (but greater than 0) compress the surface in the frequency dimension.
| void Loris::SpectralSurface::scaleAmplitudes | ( | Iter | b, | |
| Iter | e | |||
| ) | [inline] |
Scale the amplitudes of a sequence of Partials according to the amplitude of the spectral surface at the corresponding times and frequencies, performing cross-synthesis, the filtering of one sound (the sequence of Partials) by the time-varying spectrum of another sound (the Partials used to construct the surface). The surface is stretched in time and frequency according to the values of the two stretch factors (default 1, no stretching) and the amount of the effect is governed by the `effect' parameter (default 1, full effect).
| b | the beginning of the sequence of Partials | |
| e | the end of the sequence of Partials |
Scale the amplitudes of a sequence of Partials according to the amplitude of the spectral surface at the corresponding times and frequencies, performing cross-synthesis, the filtering of one sound (the sequence of Partials) by the time-varying spectrum of another sound (the Partials used to construct the surface). The surface is stretched in time and frequency according to the values of the two stretch factors (default 1, no stretching) and the amount of the effect is governed by the `effect' parameter (default 1, full effect).
| b | the beginning of the sequence of Partials | |
| e | the end of the sequence of Partials |
| void Loris::SpectralSurface::scaleAmplitudes | ( | Partial & | p | ) |
Scale the amplitude of every Breakpoint in a Partial according to the amplitude of the spectral surface at the corresponding time and frequency.
| p | the Partial to modify |
| void Loris::SpectralSurface::setAmplitudes | ( | Iter | b, | |
| Iter | e | |||
| ) | [inline] |
Set the amplitudes of a sequence of Partials equal to the amplitude of the spectral surface at the corresponding times and frequencies. This can be used to perform formant-corrected pitch shifting of a sound: construct the surface from the unmodified Partials, perform the pitch shift on the Partials, then apply the surface to the shifted Partials using setAmplitudes. The surface is stretched in time and frequency according to the values of the two stretch factors (default 1, no stretching) and the amount of the effect is governed by the `effect' parameter (default 1, full effect).
| b | the beginning of the sequence of Partials | |
| e | the end of the sequence of Partials |
Set the amplitudes of a sequence of Partials equal to the amplitude of the spectral surface at the corresponding times and frequencies. This can be used to perform formant-corrected pitch shifting of a sound: construct the surface from the unmodified Partials, perform the pitch shift on the Partials, then apply the surface to the shifted Partials using setAmplitudes. The surface is stretched in time and frequency according to the values of the two stretch factors (default 1, no stretching) and the amount of the effect is governed by the `effect' parameter (default 1, full effect).
| b | the beginning of the sequence of Partials | |
| e | the end of the sequence of Partials |
| void Loris::SpectralSurface::setAmplitudes | ( | Partial & | p | ) |
Set the amplitude of every Breakpoint in a Partial equal to the amplitude of the spectral surface at the corresponding time and frequency.
| p | the Partial to modify |
| void Loris::SpectralSurface::setEffect | ( | double | effect | ) |
Set the amount of effect applied by scaleAmplitudes and setAmplitudes (default 1, full effect). Values less than 1 (but greater than 0) reduce the amount of amplitude modified performed by application of the surface. (This is rarely a good way of controlling the amount of the effect.)
| effect | the new factor controlling the amount of amplitude modification performed by scaleAmplitudes and setAmplitudes |
| void Loris::SpectralSurface::setFrequencyStretch | ( | double | stretch | ) |
Set the amount of strecthing in the frequency dimension (default 1, no stretching). Values greater than 1 stretch the surface in the frequency dimension, values less than 1 (but greater than 0) compress the surface in the frequency dimension.
| stretch | the new stretch factor for the frequency dimension |
| void Loris::SpectralSurface::setTimeStretch | ( | double | stretch | ) |
Set the amount of strecthing in the time dimension (default 1, no stretching). Values greater than 1 stretch the surface in the time dimension, values less than 1 (but greater than 0) compress the surface in the time dimension.
| stretch | the new stretch factor for the time dimension |
| double Loris::SpectralSurface::timeStretch | ( | void | ) | const |
Return the amount of strecthing in the time dimension (default 1, no stretching). Values greater than 1 stretch the surface in the time dimension, values less than 1 (but greater than 0) compress the surface in the time dimension.
1.5.7