libpsynth 0.2.1
Public Member Functions | Static Public Attributes
psynth::synth::oscillator< Generator > Class Template Reference

#include <oscillator.hpp>

Collaboration diagram for psynth::synth::oscillator< Generator >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 oscillator (std::size_t frame_rate, float freq=220.0f, float ampl=1.0f, float phase=0.0f, bool wave_table=true)
void restart ()
void set_frame_rate (std::size_t frame_rate)
void set_frequency (float freq)
void set_amplitude (float ampl)
void set_phase (float phase)
void set_wave_table (bool wave_table)
template<class Range1 >
void update (const Range1 &out_buf)
template<class Range1 , class Range2 >
void update_fm (const Range1 &out_buf, const Range2 &mod_buf)
template<class Range1 , class Range2 >
void update_pm (const Range1 &out_buf, const Range2 &mod_buf)
template<class Range1 , class Range2 >
void update_am (const Range1 &out_buf, const Range2 &mod_buf)

Static Public Attributes

static const std::size_t default_table_size = 1 << 12

template<class Generator = sine_generator>
class psynth::synth::oscillator< Generator >


Constructor & Destructor Documentation

template<class Generator = sine_generator>
psynth::synth::oscillator< Generator >::oscillator ( std::size_t  frame_rate,
float  freq = 220.0f,
float  ampl = 1.0f,
float  phase = 0.0f,
bool  wave_table = true 
) [inline]

Member Function Documentation

template<class Generator = sine_generator>
void psynth::synth::oscillator< Generator >::restart ( ) [inline]
template<class Generator = sine_generator>
void psynth::synth::oscillator< Generator >::set_amplitude ( float  ampl) [inline]
template<class Generator = sine_generator>
void psynth::synth::oscillator< Generator >::set_frame_rate ( std::size_t  frame_rate) [inline]
template<class Generator = sine_generator>
void psynth::synth::oscillator< Generator >::set_frequency ( float  freq) [inline]
template<class Generator = sine_generator>
void psynth::synth::oscillator< Generator >::set_phase ( float  phase) [inline]
template<class Generator = sine_generator>
void psynth::synth::oscillator< Generator >::set_wave_table ( bool  wave_table) [inline]
template<class Generator = sine_generator>
template<class Range1 >
void psynth::synth::oscillator< Generator >::update ( const Range1 &  out_buf)
template<class Generator = sine_generator>
template<class Range1 , class Range2 >
void psynth::synth::oscillator< Generator >::update_am ( const Range1 &  out_buf,
const Range2 &  mod_buf 
)
template<class Generator = sine_generator>
template<class Range1 , class Range2 >
void psynth::synth::oscillator< Generator >::update_fm ( const Range1 &  out_buf,
const Range2 &  mod_buf 
)
template<class Generator = sine_generator>
template<class Range1 , class Range2 >
void psynth::synth::oscillator< Generator >::update_pm ( const Range1 &  out_buf,
const Range2 &  mod_buf 
)

Member Data Documentation

template<class Generator = sine_generator>
const std::size_t psynth::synth::oscillator< Generator >::default_table_size = 1 << 12 [static]
Todo:
Parametrize?

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