#include <Synthesizer.h>
Public Member Functions | |
| Synthesizer (double srate, std::vector< double > &buffer, double fadeTime=.001) | |
| Construct a Synthesizer using the specified sampling rate, sample buffer (a standard library vector), and Partial fade time (in seconds). | |
| void | synthesize (const Partial &p) |
| Synthesize a bandwidth-enhanced sinusoidal Partial. | |
| void | operator() (const Partial &p) |
| Function call operator: same as synthesize( p ). | |
| template<typename Iter> void | synthesize (Iter begin_partials, Iter end_partials) |
| Synthesize all Partials on the specified half-open (STL-style) range. | |
| template<typename Iter> void | operator() (Iter begin_partials, Iter end_partials) |
| Function call operator: same as synthesize( begin_partials, end_partials, timeShift ). | |
| double | fadeTime (void) const |
| Return this Synthesizer's Partial fade time, in seconds. | |
| double | sampleRate (void) const |
| Return the sampling rate (in Hz) for this Synthesizer. | |
| const std::vector< double > | samples (void) const |
| Return a const reference to the sample buffer used (not owned) by this Synthesizer. | |
| std::vector< double > | samples (void) |
| Return a reference to the sample buffer used (not owned) by this Synthesizer. | |
| void | setFadeTime (double t) |
| Set this Synthesizer's fade time to the specified value (in seconds, must be non-negative). | |
Class Synthesizer represents an algorithm for rendering bandwidth-enhanced Partials as floating point (double) samples at a specified sampling rate, and accumulating them into a buffer.
The Synthesizer does not own the sample buffer, the client is responsible for its construction and destruction, and many Synthesizers may share a buffer.
|
||||||||||||||||
|
Construct a Synthesizer using the specified sampling rate, sample buffer (a standard library vector), and Partial fade time (in seconds). Since Partials generated by the Loris Analyzer generally begin and end at non-zero amplitude, zero-amplitude Breakpoints are inserted at either end of the Partial, at a temporal distance equal to the fade time, to reduce turn-on and turn-off artifacts. If the fade time is unspecified, the default value of one millisecond (0.001 seconds) is used.
|
|
|
Set this Synthesizer's fade time to the specified value (in seconds, must be non-negative).
|
|
||||||||||||||||
|
Synthesize all Partials on the specified half-open (STL-style) range. Null Breakpoints are inserted at either end of the Partial to reduce turn-on and turn-off artifacts, as described above. The synthesizer will resize the buffer as necessary to accommodate all the samples, including the fade outs. Previous contents of the buffer are not overwritten. Partials with start times earlier than the Partial fade time will have shorter onset fades. Partials are not rendered at frequencies above the half-sample rate.
|
|
|
Synthesize a bandwidth-enhanced sinusoidal Partial. Zero-amplitude Breakpoints are inserted at either end of the Partial to reduce turn-on and turn-off artifacts, as described above. The synthesizer will resize the buffer as necessary to accommodate all the samples, including the fade out. Previous contents of the buffer are not overwritten. Partials with start times earlier than the Partial fade time will have shorter onset fades. Partials are not rendered at frequencies above the half-sample rate.
|
1.3.4