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