1 /*---------------------------------------------------------------------------* 2 project: NintendoWare 3 File: snd_BiquadFilterPresets.h 4 5 Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Revision: $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NW_SND_BIQUAD_FILTER_PRESETS_H_ 17 #define NW_SND_BIQUAD_FILTER_PRESETS_H_ 18 19 #include <nw/snd/snd_BiquadFilterCallback.h> 20 21 namespace nw { 22 namespace snd { 23 namespace internal { 24 25 /* ------------------------------------------------------------------------ 26 BiquadFilterLpf - ローパスフィルタ 27 (1/16オクターブ間隔、チェビシェフ近似) 28 ------------------------------------------------------------------------ */ 29 class BiquadFilterLpf : public BiquadFilterCallback 30 { 31 public: BiquadFilterLpf()32 BiquadFilterLpf() {} 33 virtual void GetCoefficients( int type, f32 value, Coefficients* coef ) const; 34 35 private: 36 static const int COEFFICIENTS_TABLE_SIZE = 112; 37 static const Coefficients COEFFICIENTS_TABLE[ COEFFICIENTS_TABLE_SIZE ]; 38 }; 39 40 /* ------------------------------------------------------------------------ 41 BiquadFilterHpf - ハイパスフィルタ 42 (1/16オクターブ間隔、チェビシェフ近似) 43 ------------------------------------------------------------------------ */ 44 class BiquadFilterHpf : public BiquadFilterCallback 45 { 46 public: BiquadFilterHpf()47 BiquadFilterHpf() {} 48 virtual void GetCoefficients( int type, f32 value, Coefficients* coef ) const; 49 50 private: 51 static const int COEFFICIENTS_TABLE_SIZE = 97; 52 static const Coefficients COEFFICIENTS_TABLE[ COEFFICIENTS_TABLE_SIZE ]; 53 }; 54 55 /* ------------------------------------------------------------------------ 56 BiquadFilterBpf512 - バンドパスフィルタ 57 (中心周波数 512Hz、チェビシェフ近似) 58 ------------------------------------------------------------------------ */ 59 class BiquadFilterBpf512 : public BiquadFilterCallback 60 { 61 public: BiquadFilterBpf512()62 BiquadFilterBpf512() {} 63 virtual void GetCoefficients( int type, f32 value, Coefficients* coef ) const; 64 65 private: 66 static const int COEFFICIENTS_TABLE_SIZE = 122; 67 static const Coefficients COEFFICIENTS_TABLE[ COEFFICIENTS_TABLE_SIZE ]; 68 }; 69 70 /* ------------------------------------------------------------------------ 71 BiquadFilterBpf1024 - バンドパスフィルタ 72 (中心周波数 1024Hz、チェビシェフ近似) 73 ------------------------------------------------------------------------ */ 74 class BiquadFilterBpf1024 : public BiquadFilterCallback 75 { 76 public: BiquadFilterBpf1024()77 BiquadFilterBpf1024() {} 78 virtual void GetCoefficients( int type, f32 value, Coefficients* coef ) const; 79 80 private: 81 static const int COEFFICIENTS_TABLE_SIZE = 93; 82 static const Coefficients COEFFICIENTS_TABLE[ COEFFICIENTS_TABLE_SIZE ]; 83 }; 84 85 /* ------------------------------------------------------------------------ 86 BiquadFilterBpf2048 - バンドパスフィルタ 87 (中心周波数 2048Hz、チェビシェフ近似) 88 ------------------------------------------------------------------------ */ 89 class BiquadFilterBpf2048 : public BiquadFilterCallback 90 { 91 public: BiquadFilterBpf2048()92 BiquadFilterBpf2048() {} 93 virtual void GetCoefficients( int type, f32 value, Coefficients* coef ) const; 94 95 private: 96 static const int COEFFICIENTS_TABLE_SIZE = 93; 97 static const Coefficients COEFFICIENTS_TABLE[ COEFFICIENTS_TABLE_SIZE ]; 98 }; 99 100 } // namespace nw::snd::internal 101 } // namespace nw::snd 102 } // namespace nw 103 104 105 #endif /* NW_SND_BIQUAD_FILTER_PRESETS_H_ */ 106 107