Gamma  0.9.5
Generic Synthesis Library
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Buzz< Tv, Ts > Class Template Reference

Base class for producing band-limited waveforms. More...

#include <Oscillator.h>

Inheritance diagram for Buzz< Tv, Ts >:
AccumPhase< Tv, Ts > Impulse< Tv, Ts > Saw< Tv, Ts > Square< Tv, Ts >

List of all members.

Public Member Functions

 Buzz (Tv frq=440, Tv phase=0, Tv harmonics=8)
void antialias ()
 Adjust number of harmonics to prevent aliasing.
void harmonics (Tv num)
 Set number of harmonics.
void harmonicsMax ()
 Set number of harmonics to fill Nyquist range.
Tv operator() ()
 Returns next sample of all harmonic impulse.
Tv odd ()
 Returns next sample of odd harmonic impulse.
Tv saw (Tv intg=0.997)
 Returns next sample of saw waveform.
Tv square (Tv intg=0.997)
 Returns next sample of square waveform.
Tv maxHarmonics ()
 Get number of harmonics below Nyquist based on current settings.
Tv nextPhase ()
 Generate next sample. Stored phase is post-incremented.
Tv nextPhase (Tv frqOffset)
 Generate next sample with a frequency offset.
void freq (Tv v)
 Set frequency.
Tv freq ()
 Get frequency.
void period (Tv v)
 Set period length.
Tv period ()
 Get period.
void phase (Tv v)
 Set phase from [0, 1) of one period.
Tv phase ()
 Get normalized phase in [0, 1)
void phaseAdd (Tv v)
 Add value to unit phase.

Detailed Description

template<class Tv = gam::real, class Ts = Synced>
class gam::Buzz< Tv, Ts >

Base class for producing band-limited waveforms.

This produces a finite sum of equi-amplitude cosine waves that approach the shape of a periodic impulse train. Due to numerical issues, this generator should not be used for producing very low frequency modulation signals. For that purpose, it is better to use the LFO class.


Constructor & Destructor Documentation

Buzz ( Tv  frq = 440,
Tv  phase = 0,
Tv  harmonics = 8 
)
Parameters:
[in]frqFrequency
[in]phasePhase in [0, 1)
[in]harmonicsNumber of harmonics

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