AnalogTapeModel

Physical modelling signal processing for analog tape recording
Log | Files | Refs | Submodules | README | LICENSE

WowFlutterProcessor.h (1544B)


      1 #ifndef WOWFLUTTERPROCESSOR_H_INCLUDED
      2 #define WOWFLUTTERPROCESSOR_H_INCLUDED
      3 
      4 #include "../BypassProcessor.h"
      5 #include "../Hysteresis/DCBlocker.h"
      6 #include "FlutterProcess.h"
      7 #include "WowProcess.h"
      8 
      9 class WowFlutterProcessor
     10 {
     11 public:
     12     WowFlutterProcessor (AudioProcessorValueTreeState& vts);
     13 
     14     void initialisePlots (foleys::MagicGUIState& magicState);
     15     static void createParameterLayout (chowdsp::Parameters& params);
     16 
     17     void prepareToPlay (double sampleRate, int samplesPerBlock, int numChannels);
     18     void processBlock (AudioBuffer<float>&);
     19 
     20 private:
     21     void processWetBuffer (AudioBuffer<float>& buffer);
     22     void processBypassed (const AudioBuffer<float>& buffer);
     23 
     24     std::atomic<float>* flutterOnOff = nullptr;
     25     chowdsp::FloatParameter* flutterRate = nullptr;
     26     chowdsp::FloatParameter* flutterDepth = nullptr;
     27     chowdsp::FloatParameter* wowRate = nullptr;
     28     chowdsp::FloatParameter* wowDepth = nullptr;
     29     chowdsp::FloatParameter* wowVariance = nullptr;
     30     chowdsp::FloatParameter* wowDrift = nullptr;
     31 
     32     BypassProcessor bypass;
     33     float fs = 48000.0f;
     34 
     35     WowProcess wowProcessor;
     36     FlutterProcess flutterProcessor;
     37     foleys::MagicPlotSource *wowPlot = nullptr, *flutterPlot = nullptr;
     38 
     39     enum
     40     {
     41         HISTORY_SIZE = 1 << 21,
     42     };
     43 
     44     chowdsp::DelayLine<float, chowdsp::DelayLineInterpolationTypes::Lagrange3rd> delay { HISTORY_SIZE };
     45     std::vector<DCBlocker> dcBlocker;
     46 
     47     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WowFlutterProcessor)
     48 };
     49 
     50 #endif //WOWFLUTTRPROCESSOR_H_INCLUDED