Output the audio signal (*.bin) with filtering by IIR filter in the SD card using onboard CODEC. For *.wav file, F746_SD_WavPlayer and F746_SD_GraphicEqualiser are published on mbed. SD カードのオーディオ信号 (*.bin) を遮断周波数可変の IIR フィルタを通して,ボードに搭載されているCODEC で出力する.*.wav 形式のファイル用には,F746_SD_WavPlayer と F746_SD_GraphicEqualiser を mbed で公開している.
Dependencies: BSP_DISCO_F746NG_patch_fixed F746_GUI LCD_DISCO_F746NG SDFileSystem_Warning_Fixed TS_DISCO_F746NG mbed
DesignerDrawer.hpp
00001 //------------------------------------------------------------------------------ 00002 // IIR フィルタを双一次 z 変換で設計し,その周波数特性を描画するためのクラス -- Header 00003 // 00004 // 2016/04/17, Copyright (c) 2016 MIKAMI, Naoki 00005 //------------------------------------------------------------------------------ 00006 00007 #ifndef F746_DISIGNER_AND_DRAWER_HPP 00008 #define F746_DISIGNER_AND_DRAWER_HPP 00009 00010 #include "NumericLabel.hpp" 00011 #include "TouchPanelDetectorX.hpp" 00012 #include "FrquencyResponseDrawer.hpp" 00013 #include "BilinearDesignLH.hpp" 00014 #include "IIR_CascadeFrqResp.hpp" 00015 00016 namespace Mikami 00017 { 00018 class DesignerDrawer 00019 { 00020 public: 00021 // Constructor 00022 DesignerDrawer(uint16_t x0, uint16_t y0, 00023 uint16_t db10, int fs, int order, 00024 float fc, uint16_t fL, uint16_t fH, 00025 BilinearDesign::Type lpHp); 00026 00027 ~DesignerDrawer(); 00028 00029 // フィルタの再設計と周波数特性の再描画 00030 bool ReDesignAndDraw(Biquad::Coefs *ck, float &g0, 00031 BilinearDesign::Type lpHp); 00032 00033 // 周波数特性の描画 00034 void DrawResponse(); 00035 00036 void GetCoefficients(Biquad::Coefs *ck, float &g0); 00037 00038 uint16_t GetOrder() { return ORDER_; } 00039 00040 private: 00041 LCD_DISCO_F746NG *lcd_; 00042 TS_DISCO_F746NG *ts_; 00043 00044 const uint16_t X0_, Y0_; 00045 const uint16_t DB10_; 00046 const uint16_t ORDER_; 00047 const uint16_t CURSOR_Y0_, CURSOR_LENGTH_; 00048 const uint16_t LOWER_F_, HIGHER_F_; 00049 const uint32_t CURSOR_COLOR_, CURSOR_TOUCHED_COLOR_; 00050 00051 IIR_CascadeFrqResp frqResp_; // IIR フィルタの周波数応答に対応するオブジェクト 00052 BilinearDesign::Coefs *coefs_; // 設計された係数 00053 Biquad::Coefs *ck_; 00054 float g0_; // 設計された係数(利得定数) 00055 00056 int fC_; // 遮断周波数 00057 00058 uint16_t cursorX_, oldCursorX_; 00059 bool cursorRedraw_; 00060 BilinearDesign::Type lp_; 00061 00062 FrqRespDrawer *drawerObj_; 00063 BilinearDesign *designObj_; 00064 TouchPanelDetectorX *tp_; 00065 NumericLabel<int> *lblFrq_; // 遮断周波数表示用 00066 00067 // 周波数を 10, 20, 50, 100 Hz の倍数にする 00068 int Frq10(float f); 00069 00070 // 周波数特性の目盛値の描画 00071 void DrawAxisNum(); 00072 }; 00073 } 00074 #endif // F746_DISIGNER_AND_DRAWER_HPP
Generated on Wed Jul 13 2022 03:37:09 by 1.7.2