|
LMMS
|
#include <osc.h>
Public Types | |
| enum | { SIZE = 1 << SIZE_BITS , MASK = SIZE - 1 , SCALE = 1 << (32 - SIZE_BITS) } |
Public Member Functions | |
| waveform_oscillator () | |
| float | get () |
| Get the value from single oscillator at current position. | |
| float | get_phaseshifted (uint32_t shift, float mix) |
| Add/substract two phase-shifted values. | |
| float | get_phaseshifted2 (uint32_t shift, int32_t gshift, float mix) |
| Add/substract two phase-shifted values. | |
| float | get_phasedist (uint32_t sync, uint32_t shift, float mix) |
| Get the value of a hard synced osc (65536 = 1:1 ratio). | |
| void | advance () |
| One step. | |
| Public Member Functions inherited from dsp::simple_oscillator | |
| void | reset () |
| Reset oscillator phase to zero. | |
| void | set_freq (float freq, float sr) |
| Set phase delta based on oscillator frequency and sample rate. | |
| void | set_freq_odsr (float freq, double odsr) |
| Set phase delta based on oscillator frequency and inverse of sample rate. | |
| void | step () |
| Make one phase increment. | |
| float | get () |
| Make one phase increment and return a value from -0.5 to 0.5. | |
Public Attributes | |
| float * | waveform |
| Public Attributes inherited from dsp::simple_oscillator | |
| uint32_t | phase |
| Phase (from 0 to 0xFFFFFFFF). | |
| uint32_t | phasedelta |
| Per-sample phase delta (phase increment), equal to 2^32*freq/sr. | |
Simple table-based lerping oscillator. Uses waveform of size 2^SIZE_BITS. Combine with waveform_family if bandlimited waveforms are needed. Because of linear interpolation, it's usually a good idea to use large tables (2048-4096 points), otherwise aliasing may be produced.
| anonymous enum |
|
inline |
|
inline |
One step.
|
inline |
Get the value from single oscillator at current position.
|
inline |
Get the value of a hard synced osc (65536 = 1:1 ratio).
|
inline |
Add/substract two phase-shifted values.
|
inline |
Add/substract two phase-shifted values.
| float* dsp::waveform_oscillator< SIZE_BITS >::waveform |