Demo program of digital signal processing: Variable LPF/HPF, Vocal canceller, Pitch shifter, Reverbrator. ディジタル信号処理のデモプログラム. 遮断周波数可変 LPF/HPF,ボーカルキャンセラ,ピッチシフタ,残響生成器.

Dependencies:   Array_Matrix F446_AD_DA UIT_AQM1602 mbed

Revision:
5:503bd366fd73
Parent:
0:fa74b1130cc3
--- a/SignalProcessing/ReverbUnit.hpp	Mon Jan 30 13:58:11 2017 +0000
+++ b/SignalProcessing/ReverbUnit.hpp	Tue Jan 31 12:52:35 2017 +0000
@@ -1,6 +1,6 @@
 //--------------------------------------------------------------
 // Reverb unit
-//  2017/01/28, Copyright (c) 2017 MIKAMI, Naoki
+//  2017/01/31, Copyright (c) 2017 MIKAMI, Naoki
 //--------------------------------------------------------------
 
 #ifndef REVERB_UNIT_HPP
@@ -32,20 +32,13 @@
 
     protected:
         float Get() { return un_[ptr_]; }
-        
-        float Get(int n)
-        {
-            int k = ptr_ + n;
-            if (k > DELAY_) k -= DELAY_;
-            if (k < 0) k += DELAY_;
-            return un_[k];
-        }        
 
         void Set(float x)
         {
             un_[ptr_] = x;   
             if (++ptr_ >=  DELAY_) ptr_ = 0;
         }
+
     private:
         const int DELAY_;
         Array<float> un_;   // for delay
@@ -72,14 +65,6 @@
             return yn;
          }
 
-        // Execute comb filter with variable delay
-        float Execute(float x, int n)
-        {
-            float yn = Reverb::Get(n);
-            Reverb::Set(x + G0_*yn);
-            return yn;
-         }
-
     private:
         const float G0_;
     };
@@ -100,9 +85,9 @@
             Reverb::Set(un);
             return yn;
         }
+
     private:
         const float G0_;
     };
 }
 #endif  // REVERB_UNIT_HPP
-