Loris::Oscillator Class Reference

#include <Oscillator.h>

List of all members.

Public Member Functions

 Oscillator (void)
 deterministic phase in radians
void resetEnvelopes (const Breakpoint &bp, double srate)
void resetPhase (double ph)
void oscillate (double *begin, double *end, const Breakpoint &bp, double srate)
double amplitude (void) const
 Return the instantaneous amplitde of the Oscillator.
double bandwidth (void) const
 Return the instantaneous bandwidth of the Oscillator.
double phase (void) const
 Return the instantaneous phase of the Oscillator.
double radianFreq (void) const
 Return the instantaneous radian frequency of the Oscillator.


Detailed Description

Class Oscillator represents the state of a single bandwidth-enhanced sinusoidal oscillator used for synthesizing sounds from Reassigned Bandwidth-Enhanced analysis data. Oscillator encapsulates the oscillator state, including the instantaneous radian frequency (radians per sample), amplitude, bandwidth coefficient, and phase, and a bandlimited stochastic modulator.

Class Synthesizer uses an instance of Oscillator to synthesize bandwidth-enhanced Partials.


Constructor & Destructor Documentation

Loris::Oscillator::Oscillator ( void   ) 

deterministic phase in radians

Construct a new Oscillator with all state parameters initialized to 0.


Member Function Documentation

void Loris::Oscillator::oscillate ( double *  begin,
double *  end,
const Breakpoint bp,
double  srate 
)

Accumulate bandwidth-enhanced sinusoidal samples modulating the oscillator state from its current values of radian frequency, amplitude, and bandwidth to the specified target values. Accumulate samples into the half-open (STL-style) range of doubles, starting at begin, and ending before end (no sample is accumulated at end). The caller must insure that the indices are valid. Target frequency and bandwidth are checked to prevent aliasing and bogus bandwidth enhancement.

void Loris::Oscillator::resetEnvelopes ( const Breakpoint bp,
double  srate 
)

Reset the instantaneous envelope parameters (frequency, amplitude, bandwidth, and phase). The sample rate is needed to convert the Breakpoint frequency (Hz) to radians per sample.

void Loris::Oscillator::resetPhase ( double  ph  ) 

Reset the phase of the Oscillator to the specified value. This is done when the amplitude of a Partial goes to zero, so that onsets are preserved in distilled and collated Partials.


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

Generated on Wed Mar 11 15:39:43 2009 for Loris by  doxygen 1.5.7