Diff of /src/Echotron.h [8613c3] .. [d9ebf7] Maximize Restore

  Switch to side-by-side view

--- a/src/Echotron.h
+++ b/src/Echotron.h
@@ -26,6 +26,7 @@
 
 #include "global.h"
 #include "AnalogFilter.h"
+#include "EffectLFO.h"
 
 //some of the C++ std libs
 #include <iostream>
@@ -33,7 +34,7 @@
 #include <string>
 #include <sstream>
 
-#define  ECHOTRON_F_SIZE   500       //Allow up to 500 points in the file
+#define  ECHOTRON_F_SIZE   150       //Allow up to 500 points in the file
 #define  ECHOTRON_MAXFILTERS  8      //filters available
 
 //and for some of the std libs functions
@@ -66,43 +67,33 @@
   void sethidamp (int Phidamp);
   void setlpf (int Plpf);
   void setfb(int value);
-  void convert_time();
+  void init_params();
+  void modulate_delay();
+  void modulate_filters();
 
 
 
-  //Parametrii
+  //User input parameters
+  EffectLFO lfo;  
   int Pvolume;	//This is master wet/dry mix like other FX...but I am finding it is not useful
   int Ppanning;	//Panning
   int Plrcross;	// L/R Mixing  // 
   int Phidamp;
   int Puser;		//0,1//
-  int Ptempo;		//-64 ... 64//For stretching reverb responses
+  int Ptempo;		//Tempo, BPM//For stretching reverb responses
   int Filenum;
   int Pfb;		//-64 ... 64// amount of feedback
-  int Pfade;
-  int Pes;		//0 ... 127// Add stereo spatialization
-  int Prv;              //Shuffle
-  int Plpf;
-  int Pdiff;
+  int Pdepth;
+  int Pwidth;
+  int Pfilters;         //0 or 1// use or don't use filters in delay line
+  int Pmodfilts;	//0 or 1// apply LFO to filter freqs
+  int Pmoddly;		//0 or 1// apply LFO to delay time
+  int Pstdiff;
+  int Plength;  
   
-  //variables to keep the compiler happy during development:
-  int Plevel;
-  int Plength;
-  int Psafe;
-  int Pidelay;
-  int Pstretch;
-  float *data;
-  float lrcross, feedback;
 
-  int imctr; 
-  int imax;
   int offset;
-  int hoffset;
   int maxx_size;
-  int data_length;
-  int avgtime;
-  int hrtf_size;
-  int hlength;
 
   
   //arrays of parameters:
@@ -114,20 +105,22 @@
 float fHP[ECHOTRON_MAXFILTERS];
 float fFreq[ECHOTRON_MAXFILTERS];
 float fQ[ECHOTRON_MAXFILTERS];
-float fStages[ECHOTRON_MAXFILTERS];
+int iStages[ECHOTRON_MAXFILTERS];
 
-int time[ECHOTRON_F_SIZE];
-float i_fPan[ECHOTRON_F_SIZE];  //1-fPan
+int rtime[ECHOTRON_F_SIZE];
+int ltime[ECHOTRON_F_SIZE];
 float ldata[ECHOTRON_F_SIZE];
 float rdata[ECHOTRON_F_SIZE];
+int interpl[ECHOTRON_F_SIZE];
+int interpr[ECHOTRON_F_SIZE];
 
-  float fstretch, idelay, ffade, maxtime, maxdata, decay, diffusion;
-  float lpanning, rpanning, hidamp, alpha_hidamp, convlength, oldl;
+  float width, depth;
+  float lpanning, rpanning, hidamp, alpha_hidamp, convlength;
   
-  float *lxn, *rxn, *imdelay;
+  float *lxn, *rxn;
   
-  float level,fb, rfeedback, lfeedback,levpanl,levpanr, ilrcross;
-  float roomsize;
+  float level,fb, rfeedback, lfeedback,levpanl,levpanr, lrcross, ilrcross;
+  float tempo_coeff;
  
   class AnalogFilter *lpfl, *lpfr;	//filters
   
@@ -138,14 +131,6 @@
 
   } filterbank[ECHOTRON_MAXFILTERS];
 
-template <class T>
-bool from_string(T& t, 
-                 const std::string& s, 
-                 std::ios_base& (*f)(std::ios_base&))
-{
-  std::istringstream iss(s);
-  return !(iss >> f >> t).fail();
-}
 };