π π A Python library for audio.
C audioaudio-processingaudio-productionaudio-researchaudio-unitaugmentationjucemachine-learningpybind11pythonvst3vst3-host
Formatting.
Peter Sobot762d6b5f090c
diff --git a/pedalboard/plugins/Delay.h b/pedalboard/plugins/Delay.hindex b04dbc3..4fe60a1 100644--- a/pedalboard/plugins/Delay.h+++ b/pedalboard/plugins/Delay.h@@ -19,7 +19,8 @@namespace Pedalboard {template <typename SampleType>-class Delay : public JucePlugin<juce::dsp::DelayLine<SampleType, juce::dsp::DelayLineInterpolationTypes::None>> {+class Delay : public JucePlugin<juce::dsp::DelayLine<+ SampleType, juce::dsp::DelayLineInterpolationTypes::None>> {public:SampleType getDelaySeconds() const { return delaySeconds; }void setDelaySeconds(const SampleType value) {@@ -67,7 +68,8 @@ public:if (delaySeconds == 0.0f) {// Special case where DelayLine doesn't do anything for us.- // Regardless of the mix or feedback parameters, the input will sound identical.+ // Regardless of the mix or feedback parameters, the input will sound+ // identical.return context.getInputBlock().getNumSamples();}@@ -81,8 +83,8 @@ public:for (size_t i = 0; i < context.getInputBlock().getNumSamples(); i++) {SampleType delayOutput = this->getDSP().popSample(c);- this->getDSP().pushSample(c,- channelBuffer[i] + (getFeedback() * delayOutput));+ this->getDSP().pushSample(c, channelBuffer[i] ++ (getFeedback() * delayOutput));channelBuffer[i] =(channelBuffer[i] * dryVolume) + (wetVolume * delayOutput);}diff --git a/tests/test_native_module.py b/tests/test_native_module.pyindex 1475212..43be12a 100644--- a/tests/test_native_module.py+++ b/tests/test_native_module.py@@ -105,10 +105,9 @@ def test_delay():dry_volume = 1.0 - mixwet_volume = mix- delayed_line = np.concatenate([- np.zeros(int(delay_seconds * sr)),- full_scale_noise- ])[:len(result)]+ delayed_line = np.concatenate([np.zeros(int(delay_seconds * sr)), full_scale_noise])[+ : len(result)+ ]expected = (dry_volume * full_scale_noise) + (wet_volume * delayed_line)np.testing.assert_equal(result.shape, expected.shape)