Skip to content

Commit

Permalink
finalized 0.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
reillypascal committed Jun 19, 2024
1 parent 23c32af commit 701f470
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 8 deletions.
3 changes: 3 additions & 0 deletions Source/ConcertHallB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,10 @@ ReverbProcessorParameters& LargeConcertHallB::getParameters() { return mParamete
void LargeConcertHallB::setParameters(const ReverbProcessorParameters& params)
{
if (!(params == mParameters))
{
mParameters = params;
mParameters.roomSize = scale(mParameters.roomSize, 0.0f, 1.0f, 0.25f, 1.75f);
}
}

////==============================================================================
Expand Down
3 changes: 3 additions & 0 deletions Source/DattorroVerb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,10 @@ ReverbProcessorParameters& DattorroPlate::getParameters() { return mParameters;
void DattorroPlate::setParameters(const ReverbProcessorParameters& params)
{
if (!(params == mParameters))
{
mParameters = params;
mParameters.roomSize = scale(mParameters.roomSize, 0.0f, 1.0f, 0.25f, 1.75f);
}
}

//DattorroPlate::DattorroPlate() {}
Expand Down
3 changes: 3 additions & 0 deletions Source/EarlyReflections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,8 @@ ReverbProcessorParameters& EarlyReflections::getParameters() { return mParameter
void EarlyReflections::setParameters(const ReverbProcessorParameters& params)
{
if (!(params == mParameters))
{
mParameters = params;
mParameters.roomSize = scale(mParameters.roomSize, 0.0f, 1.0f, 0.25f, 1.75f);
}
}
3 changes: 3 additions & 0 deletions Source/FDNs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,10 @@ ReverbProcessorParameters& GeneralizedFDN::getParameters() { return mParameters;
void GeneralizedFDN::setParameters(const ReverbProcessorParameters& params)
{
if (!(params == mParameters))
{
mParameters = params;
mParameters.roomSize = scale(mParameters.roomSize, 0.0f, 1.0f, 0.25f, 1.75f);
}
}

//===================================================================
Expand Down
3 changes: 3 additions & 0 deletions Source/Freeverb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,10 @@ ReverbProcessorParameters& Freeverb::getParameters() { return mParameters; }
void Freeverb::setParameters(const ReverbProcessorParameters& params)
{
if (!(params == mParameters))
{
mParameters = params;
mParameters.roomSize = scale(mParameters.roomSize, 0.0f, 1.0f, 0.25f, 1.75f);
}
}

////==============================================================================
Expand Down
9 changes: 9 additions & 0 deletions Source/GardnerRooms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ ReverbProcessorParameters& GardnerSmallRoom::getParameters() { return mParameter
void GardnerSmallRoom::setParameters(const ReverbProcessorParameters &params)
{
if (!(params == mParameters))
{
mParameters = params;
mParameters.roomSize = scale(mParameters.roomSize, 0.0f, 1.0f, 0.25f, 1.75f);
}
}


Expand Down Expand Up @@ -333,7 +336,10 @@ ReverbProcessorParameters& GardnerMediumRoom::getParameters() { return mParamete
void GardnerMediumRoom::setParameters(const ReverbProcessorParameters& params)
{
if (!(params == mParameters))
{
mParameters = params;
mParameters.roomSize = scale(mParameters.roomSize, 0.0f, 1.0f, 0.25f, 1.75f);
}
}

//==============================================================================
Expand Down Expand Up @@ -522,7 +528,10 @@ ReverbProcessorParameters& GardnerLargeRoom::getParameters() { return mParameter
void GardnerLargeRoom::setParameters(const ReverbProcessorParameters &params)
{
if (!(params == mParameters))
{
mParameters = params;
mParameters.roomSize = scale(mParameters.roomSize, 0.0f, 1.0f, 0.25f, 1.75f);
}
}

////==============================================================================
Expand Down
2 changes: 1 addition & 1 deletion Source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ void RSAlgorithmicVerbAudioProcessor::processBlock (juce::AudioBuffer<float>& bu
reverbParameters.diffusion = parameters.getRawParameterValue("diffusion")->load();
reverbParameters.modDepth = parameters.getRawParameterValue("modDepth")->load();
reverbParameters.modRate = parameters.getRawParameterValue("modRate")->load();
reverbParameters.roomSize = scale(parameters.getRawParameterValue("roomSize")->load(), 0.0f, 1.0f, 0.25f, 1.75f);
reverbParameters.roomSize = parameters.getRawParameterValue("roomSize")->load();

//============ set parameters ============
reverbProcessor->setParameters(reverbParameters);
Expand Down
23 changes: 16 additions & 7 deletions Source/SpecialFX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ void Constellation::prepare(const juce::dsp::ProcessSpec& spec)

delay.prepare(spec);
dampingFilter.prepare(spec);
dcFilter.prepare(spec);

dcFilter.setType(juce::dsp::FirstOrderTPTFilterType::highpass);
dcFilter.setCutoffFrequency(20.0f);

// prepare lfo
lfoParameters.frequency_Hz = 0.25;
Expand Down Expand Up @@ -60,32 +64,34 @@ void Constellation::processBlock(juce::AudioBuffer<float>& buffer, juce::MidiBuf
lfoOutput = lfo[channel].renderAudioOutput();

// input + damped feedback into delay
delay.pushSample(channel, channelData[sample] + (dampingFilter.processSample(channel, channelFeedback[channel]) * mParameters.decayTime));
delay.pushSample(channel, channelData[sample] + dcFilter.processSample(channel, dampingFilter.processSample(channel, channelFeedback[channel]) * mParameters.decayTime));
dampingFilter.snapToZero();
dcFilter.snapToZero();

// reset channelData, then sum outputs to channel
channelData[sample] = 0.0f;
for (int delOut = 0; delOut < 4; ++delOut)
{
channelData[sample] += delay.getSampleAtDelay(channel, channelOutDelayTimes[channel][delOut] * mSamplesPerMs) / 2.828f;
channelData[sample] += delay.getSampleAtDelay(channel, channelOutDelayTimes[channel][delOut] * mSamplesPerMs) / 2.0f;
}

// reset feedback, then add delay taps
channelFeedback[channel] = 0.0f;
for (int delFb = 0; delFb < 16; ++delFb)
for (int delTime = 0; delTime < 16; ++delTime)
{
float selectedLfo { 0.0f };

if (delFb % 4 == 0)
if (delTime % 4 == 0)
selectedLfo = lfoOutput.quadPhaseOutput_neg;
else if (delFb % 3 == 0)
else if (delTime % 3 == 0)
selectedLfo = lfoOutput.invertedOutput;
else if (delFb % 2 == 0)
else if (delTime % 2 == 0)
selectedLfo = lfoOutput.quadPhaseOutput_pos;
else
selectedLfo = lfoOutput.normalOutput;

channelFeedback[channel] += delay.getSampleAtDelay(channel, (feedbackDelayTimes[delFb] * mSamplesPerMs * mParameters.roomSize) + (selectedLfo * 32.0f)) / 13.0f;
// modulate from +/- 32 to +/- 64; does not turn fully off to allow for longer tails
channelFeedback[channel] += delay.getSampleAtDelay(channel, (feedbackDelayTimes[delTime] * mSamplesPerMs * mParameters.roomSize) + (selectedLfo * (mParameters.modDepth * 32.0f + 32.0f))) / 7.0f;
}
}
}
Expand All @@ -102,6 +108,9 @@ ReverbProcessorParameters& Constellation::getParameters() { return mParameters;
void Constellation::setParameters(const ReverbProcessorParameters& params)
{
if (!(params == mParameters))
{
mParameters = params;
mParameters.roomSize = scale(mParameters.roomSize, 0.0f, 1.0f, 0.25f, 4.0f);
}
}

1 change: 1 addition & 0 deletions Source/SpecialFX.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Constellation : public ReverbProcessorBase
DelayLineWithSampleAccess<float> delay { 22050 };

juce::dsp::FirstOrderTPTFilter<float> dampingFilter;
juce::dsp::FirstOrderTPTFilter<float> dcFilter;

OscillatorParameters lfoParameters;
SignalGenData lfoOutput;
Expand Down

0 comments on commit 701f470

Please sign in to comment.