mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-13 11:38:24 -04:00
Alias-free oscillators (#5826)
Add a band-limited, alias-free wavetable oscillator option to the `Oscillator` class. Use it by default for Triple Oscillator. Savefiles which do not have this feature enabled (e.g. old savefiles) will be loaded without this feature to keep the sound consistent. Original author: @curlymorphic. Fixed: @he29-net.
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "ProjectJournal.h"
|
||||
#include "Song.h"
|
||||
#include "BandLimitedWave.h"
|
||||
#include "Oscillator.h"
|
||||
|
||||
float LmmsCore::s_framesPerTick;
|
||||
Mixer* LmmsCore::s_mixer = NULL;
|
||||
@@ -58,6 +59,8 @@ void LmmsCore::init( bool renderOnly )
|
||||
emit engine->initProgress(tr("Generating wavetables"));
|
||||
// generate (load from file) bandlimited wavetables
|
||||
BandLimitedWave::generateWaves();
|
||||
//initilize oscillators
|
||||
Oscillator::waveTableInit();
|
||||
|
||||
emit engine->initProgress(tr("Initializing data structures"));
|
||||
s_projectJournal = new ProjectJournal;
|
||||
@@ -111,6 +114,10 @@ void LmmsCore::destroy()
|
||||
deleteHelper( &s_song );
|
||||
|
||||
delete ConfigManager::inst();
|
||||
|
||||
// The oscillator FFT plans remain throughout the application lifecycle
|
||||
// due to being expensive to create, and being used whenever a userwave form is changed
|
||||
Oscillator::destroyFFTPlans();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user