FrqRespDrawer class to draw frequency response for digital filter. ディジタルフィルタの周波数特性を,周波数軸をログスケールで描画するための FrqRespDrawer クラス. このライブラリを登録した際のプログラム:「F746_FrequencyResponseDrawer_Demo」

Dependents:   F746_SD_WavPlayer F746_SD_GraphicEqualizer_ren0620 F746_FrequencyResponseDrawer_Demo F746_SD_VarableFilter ... more

Revision:
2:8bccc97de938
Parent:
1:19a32f6279e6
Child:
4:47c6cbdd8d77
--- a/FrquencyResponseDrawer.cpp	Mon May 09 05:39:50 2016 +0000
+++ b/FrquencyResponseDrawer.cpp	Sun Jul 24 11:19:30 2016 +0000
@@ -2,7 +2,7 @@
 //  ディジタルフィルタの周波数特性を,周波数軸が対数スケールで描画するクラス
 //  FrqRespDrawer class
 //
-//  2016/05/09, Copyright (c) 2016 MIKAMI, Naoki
+//  2016/07/24, Copyright (c) 2016 MIKAMI, Naoki
 //------------------------------------------------------------------------
 
 #include "FrquencyResponseDrawer.hpp"
@@ -68,7 +68,7 @@
     }
 
     // 周波数特性のグラフの描画
-    void FrqRespDrawer::DrawGraph(FrequencyResponse *frqResp, uint32_t color)
+    void FrqRespDrawer::DrawGraph(FrequencyResponse &frqResp, uint32_t color)
     {
         lcd_->SetTextColor(color);
         uint16_t width = X(MAX_) - X(MIN_);   
@@ -79,7 +79,7 @@
         {
             float frq = PosToFrq(n+ORGX_);
             uint16_t x2 = X(frq);
-            float absHz = frqResp->AbsH_z(exp(Complex(0, pi2FsM*frq)));
+            float absHz = frqResp.AbsH_z(exp(Complex(0, pi2FsM*frq)));
             float dB = (absHz > 0.001f) ? 20.0f*log10f(absHz) : MIN_DB_;
             uint16_t y2 = ORGY_ - Round((dB - MIN_DB_)*DB1_);
             if (y2 > ORGY_) y2 = ORGY_;