NeuralPi

Raspberry Pi guitar pedal using neural networks to emulate real amps and effects
Log | Files | Refs | Submodules | README

Eq4Band.h (1644B)


      1 /*
      2   ==============================================================================
      3 
      4   Eq4Band
      5 
      6   ==============================================================================
      7 */
      8 
      9 #pragma once
     10 
     11 #include "../JuceLibraryCode/JuceHeader.h"
     12 
     13 
     14 //==============================================================================
     15 
     16 class Eq4Band
     17 {
     18 public:
     19     Eq4Band();
     20     void process (const float* inData, float* outData, MidiBuffer& midiMessages, const int numSamples, const int numInputChannels, const int sampleRate);
     21     void setParameters(float bass_slider, float mid_slider, float treble_slider, float presence_slider);
     22     void resetSampleRate();
     23 
     24 private:
     25     // Tone Knob related variables
     26     float cDenorm = 10e-30;
     27     float cAmpDB = 8.65617025;
     28 
     29     int bass_frequency = 200;
     30     int mid_frequency = 2000;
     31     int treble_frequency = 5000;
     32     //int presence_frequency = 5500;
     33 
     34     int srate = 44100;  // Set default
     35 
     36     float pi = 3.1415926;
     37 
     38     float outVol;
     39     float xHI = 0.0;//
     40     float a0HI = 0.0;//
     41     float b1HI = 0.0;
     42     float xMID = 0.0;
     43     float a0MID = 0.0;
     44     float b1MID = 0.0;
     45     float xLOW = 0.0;
     46     float a0LOW = 0.0;
     47     float b1LOW = 0.0;
     48 
     49     float lVol = 0.0;
     50     float lmVol = 0.0;
     51     float hmVol = 0.0;
     52     float hVol = 0.0;
     53 
     54     float s0 = 0.0;
     55     float low0 = 0.0;
     56     float tmplMID = 0.0;
     57     float spl0 = 0.0;
     58     float hi0 = 0.0;
     59     float midS0 = 0.0;
     60     float highS0 = 0.0;
     61     float tmplHI = 0.0;
     62     float lowS0 = 0.0;
     63     float tmplLOW = 0.0;
     64 
     65 
     66     //==============================================================================
     67     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Eq4Band)
     68 };