#include <Oscillator.h>
|
| enum class | WaveShape {
Sine
, Triangle
, Saw
, Square
,
MoogSaw
, Exponential
, WhiteNoise
, UserDefined
,
Count
} |
| enum class | ModulationAlgo {
PhaseModulation
, AmplitudeModulation
, SignalMix
, SynchronizedBySubOsc
,
FrequencyModulation
, Count
} |
|
| | Oscillator (const IntModel *wave_shape_model, const IntModel *mod_algo_model, const float &freq, const float &detuning_div_samplerate, const float &phase_offset, const float &volume, Oscillator *m_subOsc=nullptr) |
| virtual | ~Oscillator () |
| void | setUseWaveTable (bool n) |
| void | setUserWave (std::shared_ptr< const SampleBuffer > _wave) |
| void | setUserAntiAliasWaveTable (std::shared_ptr< const OscillatorConstants::waveform_t > waveform) |
| void | update (SampleFrame *ab, const f_cnt_t frames, const ch_cnt_t chnl, bool modulator=false) |
| wtSampleControl | getWtSampleControl (const float sample) const |
| sample_t | wtSample (const sample_t table[OscillatorConstants::WAVE_TABLES_PER_WAVEFORM_COUNT][OscillatorConstants::WAVETABLE_LENGTH], const float sample) const |
| sample_t | wtSample (const OscillatorConstants::waveform_t *table, const float sample) const |
| sample_t | wtSample (sample_t **table, const float sample) const |
|
| void | updateNoSub (SampleFrame *_ab, const f_cnt_t _frames, const ch_cnt_t _chnl) |
| void | updatePM (SampleFrame *_ab, const f_cnt_t _frames, const ch_cnt_t _chnl) |
| void | updateAM (SampleFrame *_ab, const f_cnt_t _frames, const ch_cnt_t _chnl) |
| void | updateMix (SampleFrame *_ab, const f_cnt_t _frames, const ch_cnt_t _chnl) |
| void | updateSync (SampleFrame *_ab, const f_cnt_t _frames, const ch_cnt_t _chnl) |
| void | updateFM (SampleFrame *_ab, const f_cnt_t _frames, const ch_cnt_t _chnl) |
| float | syncInit (SampleFrame *_ab, const f_cnt_t _frames, const ch_cnt_t _chnl) |
| bool | syncOk (float _osc_coeff) |
| template<WaveShape W> |
| void | updateNoSub (SampleFrame *_ab, const f_cnt_t _frames, const ch_cnt_t _chnl) |
| template<WaveShape W> |
| void | updatePM (SampleFrame *_ab, const f_cnt_t _frames, const ch_cnt_t _chnl) |
| template<WaveShape W> |
| void | updateAM (SampleFrame *_ab, const f_cnt_t _frames, const ch_cnt_t _chnl) |
| template<WaveShape W> |
| void | updateMix (SampleFrame *_ab, const f_cnt_t _frames, const ch_cnt_t _chnl) |
| template<WaveShape W> |
| void | updateSync (SampleFrame *_ab, const f_cnt_t _frames, const ch_cnt_t _chnl) |
| template<WaveShape W> |
| void | updateFM (SampleFrame *_ab, const f_cnt_t _frames, const ch_cnt_t _chnl) |
| template<WaveShape W> |
| sample_t | getSample (const float _sample) |
| void | recalcPhase () |
◆ ModulationAlgo
| Enumerator |
|---|
| PhaseModulation | |
| AmplitudeModulation | |
| SignalMix | |
| SynchronizedBySubOsc | |
| FrequencyModulation | |
| Count | |
◆ WaveShape
| Enumerator |
|---|
| Sine | |
| Triangle | |
| Saw | |
| Square | |
| MoogSaw | |
| Exponential | |
| WhiteNoise | |
| UserDefined | |
| Count | Number of all available wave shapes.
|
◆ Oscillator()
◆ ~Oscillator()
| virtual lmms::Oscillator::~Oscillator |
( |
| ) |
|
|
inlinevirtual |
◆ createFFTPlans()
| void lmms::Oscillator::createFFTPlans |
( |
| ) |
|
|
staticprivate |
◆ destroyFFTPlans()
| void lmms::Oscillator::destroyFFTPlans |
( |
| ) |
|
|
static |
◆ expSample()
◆ freqFromWaveTableBand()
| float lmms::Oscillator::freqFromWaveTableBand |
( |
int | band | ) |
|
|
inlinestatic |
◆ generateAntiAliasUserWaveTable()
◆ generateFromFFT()
◆ generateSawWaveTable()
| void lmms::Oscillator::generateSawWaveTable |
( |
int | bands, |
|
|
sample_t * | table, |
|
|
int | firstBand = 1 ) |
|
staticprivate |
◆ generateSquareWaveTable()
| void lmms::Oscillator::generateSquareWaveTable |
( |
int | bands, |
|
|
sample_t * | table, |
|
|
int | firstBand = 1 ) |
|
staticprivate |
◆ generateTriangleWaveTable()
| void lmms::Oscillator::generateTriangleWaveTable |
( |
int | bands, |
|
|
sample_t * | table, |
|
|
int | firstBand = 1 ) |
|
staticprivate |
◆ generateWaveTables()
| void lmms::Oscillator::generateWaveTables |
( |
| ) |
|
|
staticprivate |
◆ getSample()
◆ getWtSampleControl()
◆ moogSawSample()
◆ noiseSample()
◆ recalcPhase()
| void lmms::Oscillator::recalcPhase |
( |
| ) |
|
|
inlineprivate |
◆ sawSample()
◆ setUserAntiAliasWaveTable()
◆ setUserWave()
◆ setUseWaveTable()
| void lmms::Oscillator::setUseWaveTable |
( |
bool | n | ) |
|
|
inline |
◆ sinSample()
◆ squareSample()
◆ syncInit()
◆ syncOk()
| bool lmms::Oscillator::syncOk |
( |
float | _osc_coeff | ) |
|
|
inlineprivate |
◆ triangleSample()
◆ update()
◆ updateAM() [1/2]
◆ updateAM() [2/2]
◆ updateFM() [1/2]
◆ updateFM() [2/2]
◆ updateMix() [1/2]
◆ updateMix() [2/2]
◆ updateNoSub() [1/2]
◆ updateNoSub() [2/2]
◆ updatePM() [1/2]
◆ updatePM() [2/2]
◆ updateSync() [1/2]
◆ updateSync() [2/2]
◆ userWaveSample()
◆ waveTableBandFromFreq()
| int lmms::Oscillator::waveTableBandFromFreq |
( |
float | freq | ) |
|
|
inlinestatic |
◆ waveTableInit()
| void lmms::Oscillator::waveTableInit |
( |
| ) |
|
|
static |
◆ wtSample() [1/3]
◆ wtSample() [2/3]
| sample_t lmms::Oscillator::wtSample |
( |
const sample_t | table[OscillatorConstants::WAVE_TABLES_PER_WAVEFORM_COUNT][OscillatorConstants::WAVETABLE_LENGTH], |
|
|
const float | sample ) const |
|
inline |
◆ wtSample() [3/3]
◆ FirstWaveShapeTable
First wave shape that has a pre-generated table.
◆ m_detuning_div_samplerate
| const float& lmms::Oscillator::m_detuning_div_samplerate |
|
private |
◆ m_ext_phaseOffset
| const float& lmms::Oscillator::m_ext_phaseOffset |
|
private |
◆ m_freq
| const float& lmms::Oscillator::m_freq |
|
private |
◆ m_isModulator
| bool lmms::Oscillator::m_isModulator |
|
private |
◆ m_modulationAlgoModel
◆ m_phase
| float lmms::Oscillator::m_phase |
|
private |
◆ m_phaseOffset
| float lmms::Oscillator::m_phaseOffset |
|
private |
◆ m_subOsc
◆ m_userAntiAliasWaveTable
◆ m_userWave
◆ m_useWaveTable
| bool lmms::Oscillator::m_useWaveTable |
|
private |
◆ m_volume
| const float& lmms::Oscillator::m_volume |
|
private |
◆ m_waveShapeModel
◆ NumModulationAlgos
◆ NumWaveShapes
| auto lmms::Oscillator::NumWaveShapes = static_cast<std::size_t>(WaveShape::Count) |
|
staticconstexpr |
◆ NumWaveShapeTables
Number of band-limited wave shapes to be generated.
◆ s_fftPlan
| fftwf_plan lmms::Oscillator::s_fftPlan |
|
staticprivate |
◆ s_ifftPlan
| fftwf_plan lmms::Oscillator::s_ifftPlan |
|
staticprivate |
◆ s_sampleBuffer
◆ s_specBuf
| fftwf_complex * lmms::Oscillator::s_specBuf |
|
staticprivate |
◆ s_waveTables
The documentation for this class was generated from the following files: