diff --git a/Software/GuitarPedal/Effect-Modules/multi_delay_module.cpp b/Software/GuitarPedal/Effect-Modules/multi_delay_module.cpp index b567305..6bd254d 100644 --- a/Software/GuitarPedal/Effect-Modules/multi_delay_module.cpp +++ b/Software/GuitarPedal/Effect-Modules/multi_delay_module.cpp @@ -8,12 +8,12 @@ using namespace bkshepherd; PitchShifter DSY_SDRAM_BSS ps_taps[4]; // Delay Max Definitions (Assumes 48kHz samplerate) -#define MAX_DELAY_TAP static_cast(48000.0f * 8.f) +constexpr size_t MAX_DELAY_TAP = static_cast(48000.0f * 8.f); DelayLine DSY_SDRAM_BSS delayLineLeft0; DelayLine DSY_SDRAM_BSS delayLineRight0; float tap_delays[4] = {0.0f, 0.0f, 0.0f, 0.0f}; -struct delay { +struct delay_multi { DelayLine *del; float currentDelay; float delayTarget; @@ -29,7 +29,7 @@ struct delay { return read; } }; -delay delays[2]; +delay_multi delays[2]; static const char *s_typeBinNames[] = {"Follower", "Time"}; static const int s_paramCount = 13; diff --git a/Software/GuitarPedal/Effect-Modules/reverb_delay_module.h b/Software/GuitarPedal/Effect-Modules/reverb_delay_module.h index 2f2edd3..229d0f1 100644 --- a/Software/GuitarPedal/Effect-Modules/reverb_delay_module.h +++ b/Software/GuitarPedal/Effect-Modules/reverb_delay_module.h @@ -14,13 +14,13 @@ using namespace daisysp; // Delay Max Definitions (Assumes 48kHz samplerate) -#define MAX_DELAY \ - static_cast(48000.0f * 8.f) // 4 second max delay // Increased the max to 8 seconds, got horrible pop noise when set to 4 - // seconds, increasing buffer size fixes it for some reason. TODO figure out why? -#define MAX_DELAY_REV \ - static_cast(48000.0f * 8.f) // 8 second max delay (needs to be double for reverse, since read/write pointers are going - // opposite directions in the buffer) -#define MAX_DELAY_SPREAD static_cast(4800.0f) // 50 ms for Spread effect +constexpr size_t MAX_DELAY = + static_cast(48000.0f * 8.f); // 4 second max delay // Increased the max to 8 seconds, got horrible pop noise when set to 4 + // seconds, increasing buffer size fixes it for some reason. TODO figure out why? +constexpr size_t MAX_DELAY_REV = + static_cast(48000.0f * 8.f); // 8 second max delay (needs to be double for reverse, since read/write pointers are going + // opposite directions in the buffer) +constexpr size_t MAX_DELAY_SPREAD = static_cast(4800.0f); // 50 ms for Spread effect // This is the core delay struct, which actually includes two delays, // one for forwared/octave, and one for reverse. This is required @@ -32,7 +32,7 @@ using namespace daisysp; // octave delay, or create a "fading into the distance" effect for the // forward and reverse delays. A "level" param is included for modulation // of the output volume, for stereo panning. -struct delay { +struct delay_reverb { DelayLineRevOct *del; DelayLineReverse *delreverse; float currentDelay; @@ -149,8 +149,8 @@ class ReverbDelayModule : public BaseEffectModule { float m_modOscFreqMax; // Delays - delay delayLeft; - delay delayRight; + delay_reverb delayLeft; + delay_reverb delayRight; delay_spread delaySpread; // Mix params