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

Damped sine oscillator based on an efficient recursion equation. More...

#include <Oscillator.h>

Inherits RSin2< T >, and Ts.

List of all members.

Public Member Functions

 SineD (Tv frq=440, Tv amp=1, Tv dcy=-1, Tv phs=0)
Tv freq () const
 Get frequency.
void ampPhase (Tv a=1, Tv p=0)
 Set amplitude and phase.
void set (Tv frq, Tv amp, Tv dcy, Tv phs=0)
 Set all control parameters.
T & operator[] (uint32_t i)
 Array set; sets current value.
operator() () const
 Generate next value.
operator() (const T &v) const
 Filter next value.
amp () const
 Get amplitude.
RSin2 & amp (const T &v)
 Set amplitude.
decay () const
 Get decay factor.
RSin2 & decay (const T &v)
 Set decay.
RSin2 & freq (const T &v)
 Set unit frequency.
phase () const
 Get unit phase.
RSin2 & phase (const T &v)
 Set unit phase.
RSin2 & reset ()
 Reset state from stored parameters.
RSin2 & set (T frq, T phs, T dcy, T amp=T(1))
 Set parameters from freq (rad/unit), phase (rad), decay, and amplitude.

Public Attributes

mul1
 Multiplication factors.
val
 Value.

Detailed Description

template<class Tv = double, class Ts = Synced>
class gam::SineD< Tv, Ts >

Damped sine oscillator based on an efficient recursion equation.

This oscillator is similar to SineR, however, it has an extra multiply in its sample generation to allow the oscillator to decay.


Constructor & Destructor Documentation

SineD ( Tv  frq = 440,
Tv  amp = 1,
Tv  dcy = -1,
Tv  phs = 0 
)
Parameters:
[in]frqFrequency
[in]ampAmplitude
[in]dcyT60 decay length
[in]phsPhase in [0, 1)

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