Move the oscillator count to Config.h
This commit is contained in:
parent
0dca7dbc5e
commit
c4c4278ee3
4 changed files with 7 additions and 10 deletions
|
|
@ -60,6 +60,7 @@ namespace config {
|
|||
constexpr int filtersInPool { maxVoices * 2 };
|
||||
constexpr int filtersPerVoice { 2 };
|
||||
constexpr int eqsPerVoice { 3 };
|
||||
constexpr int oscillatorsPerVoice { 9 };
|
||||
constexpr float noiseVariance { 0.25f };
|
||||
/**
|
||||
Minimum interval in frames between recomputations of coefficients of the
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ namespace Default
|
|||
constexpr float oscillatorPhase { 0.0 };
|
||||
constexpr Range<float> oscillatorPhaseRange { -1.0, 360.0 };
|
||||
constexpr int oscillatorMulti { 1 };
|
||||
constexpr Range<int> oscillatorMultiRange { 1, 9 };
|
||||
constexpr Range<int> oscillatorMultiRange { 1, config::oscillatorsPerVoice };
|
||||
constexpr float oscillatorDetune { 0 };
|
||||
constexpr Range<float> oscillatorDetuneRange { -9600, 9600 };
|
||||
|
||||
|
|
|
|||
|
|
@ -666,7 +666,7 @@ void sfz::Voice::setupOscillatorUnison()
|
|||
waveUnisonSize = m;
|
||||
|
||||
// detune (cents)
|
||||
float detunes[maxWaveOscillators];
|
||||
float detunes[config::oscillatorsPerVoice];
|
||||
detunes[0] = 0.0;
|
||||
detunes[1] = -d;
|
||||
detunes[2] = +d;
|
||||
|
|
@ -703,5 +703,3 @@ void sfz::Voice::setupOscillatorUnison()
|
|||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
constexpr unsigned sfz::Voice::maxWaveOscillators;
|
||||
|
|
|
|||
|
|
@ -288,15 +288,13 @@ private:
|
|||
ADSREnvelope<float> egEnvelope;
|
||||
float bendStepFactor { centsFactor(1) };
|
||||
|
||||
static constexpr unsigned maxWaveOscillators = Default::oscillatorMultiRange.getEnd();
|
||||
|
||||
WavetableOscillator waveOscillators[maxWaveOscillators];
|
||||
WavetableOscillator waveOscillators[config::oscillatorsPerVoice];
|
||||
|
||||
// unison of oscillators
|
||||
unsigned waveUnisonSize { 0 };
|
||||
float waveDetuneRatio[maxWaveOscillators] { };
|
||||
float waveLeftGain[maxWaveOscillators] { };
|
||||
float waveRightGain[maxWaveOscillators] { };
|
||||
float waveDetuneRatio[config::oscillatorsPerVoice] { };
|
||||
float waveLeftGain[config::oscillatorsPerVoice] { };
|
||||
float waveRightGain[config::oscillatorsPerVoice] { };
|
||||
|
||||
Duration dataDuration;
|
||||
Duration amplitudeDuration;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue