Match behavior of random opcodes to ARIA
This commit is contained in:
parent
dafde79560
commit
05bd4d6831
3 changed files with 6 additions and 6 deletions
|
|
@ -84,7 +84,7 @@ FloatSpec crossfadeOutNorm { 1.0f, {0.0f, 1.0f}, 0 };
|
||||||
FloatSpec ampKeytrack { 0.0f, {-96.0f, 12.0f}, 0 };
|
FloatSpec ampKeytrack { 0.0f, {-96.0f, 12.0f}, 0 };
|
||||||
FloatSpec ampVeltrack { 100.0f, {-100.0f, 100.0f}, kNormalizePercent };
|
FloatSpec ampVeltrack { 100.0f, {-100.0f, 100.0f}, kNormalizePercent };
|
||||||
FloatSpec ampVelcurve { 0.0f, {0.0f, 1.0f}, 0 };
|
FloatSpec ampVelcurve { 0.0f, {0.0f, 1.0f}, 0 };
|
||||||
FloatSpec ampRandom { 0.0f, {0.0f, 24.0f}, 0 };
|
FloatSpec ampRandom { 0.0f, {-24.0f, 24.0f}, 0 };
|
||||||
BoolSpec rtDead { false, {false, true}, 0 };
|
BoolSpec rtDead { false, {false, true}, 0 };
|
||||||
FloatSpec rtDecay { 0.0f, {0.0f, 200.0f}, 0 };
|
FloatSpec rtDecay { 0.0f, {0.0f, 200.0f}, 0 };
|
||||||
FloatSpec filterCutoff { 0.0f, {0.0f, 20000.0f}, kEnforceUpperBound };
|
FloatSpec filterCutoff { 0.0f, {0.0f, 20000.0f}, kEnforceUpperBound };
|
||||||
|
|
@ -93,7 +93,7 @@ FloatSpec filterResonance { 0.0f, {0.0f, 96.0f}, 0 };
|
||||||
FloatSpec filterResonanceMod { 0.0f, {0.0f, 96.0f}, 0 };
|
FloatSpec filterResonanceMod { 0.0f, {0.0f, 96.0f}, 0 };
|
||||||
FloatSpec filterGain { 0.0f, {-96.0f, 96.0f}, 0 };
|
FloatSpec filterGain { 0.0f, {-96.0f, 96.0f}, 0 };
|
||||||
FloatSpec filterGainMod { 0.0f, {-96.0f, 96.0f}, 0 };
|
FloatSpec filterGainMod { 0.0f, {-96.0f, 96.0f}, 0 };
|
||||||
FloatSpec filterRandom { 0.0f, {0.0f, 12000.0f}, 0 };
|
FloatSpec filterRandom { 0.0f, {-12000.0f, 12000.0f}, 0 };
|
||||||
Int32Spec filterKeytrack { 0, {0, 1200}, 0 };
|
Int32Spec filterKeytrack { 0, {0, 1200}, 0 };
|
||||||
Int32Spec filterVeltrack { 0, {-12000, 12000}, 0 };
|
Int32Spec filterVeltrack { 0, {-12000, 12000}, 0 };
|
||||||
FloatSpec eqBandwidth { 1.0f, {0.001f, 4.0f}, 0 };
|
FloatSpec eqBandwidth { 1.0f, {0.001f, 4.0f}, 0 };
|
||||||
|
|
@ -105,7 +105,7 @@ FloatSpec eqGainMod { 0.0f, {-96.0f, 96.0f}, 0 };
|
||||||
FloatSpec eqVel2Frequency { 0.0f, {-30000.0f, 30000.0f}, 0 };
|
FloatSpec eqVel2Frequency { 0.0f, {-30000.0f, 30000.0f}, 0 };
|
||||||
FloatSpec eqVel2Gain { 0.0f, {-96.0f, 96.0f}, 0 };
|
FloatSpec eqVel2Gain { 0.0f, {-96.0f, 96.0f}, 0 };
|
||||||
Int32Spec pitchKeytrack { 100, {-1200, 1200}, 0 };
|
Int32Spec pitchKeytrack { 100, {-1200, 1200}, 0 };
|
||||||
FloatSpec pitchRandom { 0.0f, {0.0f, 12000.0f}, 0 };
|
FloatSpec pitchRandom { 0.0f, {-12000.0f, 12000.0f}, 0 };
|
||||||
Int32Spec pitchVeltrack { 0, {-12000, 12000}, 0 };
|
Int32Spec pitchVeltrack { 0, {-12000, 12000}, 0 };
|
||||||
Int32Spec transpose { 0, {-127, 127}, 0 };
|
Int32Spec transpose { 0, {-127, 127}, 0 };
|
||||||
FloatSpec pitch { 0.0f, {-2400.0f, 2400.0f}, 0 };
|
FloatSpec pitch { 0.0f, {-2400.0f, 2400.0f}, 0 };
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ void sfz::FilterHolder::setup(const Region& region, unsigned filterId, int noteN
|
||||||
// Setup the base values
|
// Setup the base values
|
||||||
baseCutoff = description->cutoff;
|
baseCutoff = description->cutoff;
|
||||||
if (description->random != 0) {
|
if (description->random != 0) {
|
||||||
fast_real_distribution<float> dist { -description->random, description->random };
|
fast_real_distribution<float> dist { 0.0f, description->random };
|
||||||
baseCutoff *= centsFactor(dist(Random::randomGenerator));
|
baseCutoff *= centsFactor(dist(Random::randomGenerator));
|
||||||
}
|
}
|
||||||
const auto keytrack = description->keytrack * (noteNumber - description->keycenter);
|
const auto keytrack = description->keytrack * (noteNumber - description->keycenter);
|
||||||
|
|
|
||||||
|
|
@ -1586,7 +1586,7 @@ float sfz::Region::getBasePitchVariation(float noteNumber, float velocity) const
|
||||||
{
|
{
|
||||||
ASSERT(velocity >= 0.0f && velocity <= 1.0f);
|
ASSERT(velocity >= 0.0f && velocity <= 1.0f);
|
||||||
|
|
||||||
fast_real_distribution<float> pitchDistribution { -pitchRandom, pitchRandom };
|
fast_real_distribution<float> pitchDistribution { 0.0f, pitchRandom };
|
||||||
auto pitchVariationInCents = pitchKeytrack * (noteNumber - pitchKeycenter); // note difference with pitch center
|
auto pitchVariationInCents = pitchKeytrack * (noteNumber - pitchKeycenter); // note difference with pitch center
|
||||||
pitchVariationInCents += pitch; // sample tuning
|
pitchVariationInCents += pitch; // sample tuning
|
||||||
pitchVariationInCents += config::centPerSemitone * transpose; // sample transpose
|
pitchVariationInCents += config::centPerSemitone * transpose; // sample transpose
|
||||||
|
|
@ -1597,7 +1597,7 @@ float sfz::Region::getBasePitchVariation(float noteNumber, float velocity) const
|
||||||
|
|
||||||
float sfz::Region::getBaseVolumedB(int noteNumber) const noexcept
|
float sfz::Region::getBaseVolumedB(int noteNumber) const noexcept
|
||||||
{
|
{
|
||||||
fast_real_distribution<float> volumeDistribution { -ampRandom, ampRandom };
|
fast_real_distribution<float> volumeDistribution { 0.0f, ampRandom };
|
||||||
auto baseVolumedB = volume + volumeDistribution(Random::randomGenerator);
|
auto baseVolumedB = volume + volumeDistribution(Random::randomGenerator);
|
||||||
baseVolumedB += globalVolume;
|
baseVolumedB += globalVolume;
|
||||||
baseVolumedB += masterVolume;
|
baseVolumedB += masterVolume;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue