Damped sine oscillator based on an efficient recursion equation. More...
#include <Oscillator.h>
Inherits RSin2< T >, and Ts.
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. | |
T | operator() () const |
Generate next value. | |
T | operator() (const T &v) const |
Filter next value. | |
T | amp () const |
Get amplitude. | |
RSin2 & | amp (const T &v) |
Set amplitude. | |
T | decay () const |
Get decay factor. | |
RSin2 & | decay (const T &v) |
Set decay. | |
RSin2 & | freq (const T &v) |
Set unit frequency. | |
T | 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 | |
T | mul1 |
Multiplication factors. | |
T | val |
Value. |
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.
SineD | ( | Tv | frq = 440 , |
Tv | amp = 1 , |
||
Tv | dcy = -1 , |
||
Tv | phs = 0 |
||
) |
[in] | frq | Frequency |
[in] | amp | Amplitude |
[in] | dcy | T60 decay length |
[in] | phs | Phase in [0, 1) |