Deprecated: wp_getimagesize(): Implicitly marking parameter $image_info as nullable is deprecated, the explicit nullable type must be used instead in /homepages/22/d228324659/htdocs/wp/wp-includes/media.php on line 5474

Warning: Cannot modify header information - headers already sent by (output started at /homepages/22/d228324659/htdocs/wp/wp-includes/media.php:5474) in /homepages/22/d228324659/htdocs/wp/wp-includes/rest-api/class-wp-rest-server.php on line 1775

Warning: Cannot modify header information - headers already sent by (output started at /homepages/22/d228324659/htdocs/wp/wp-includes/media.php:5474) in /homepages/22/d228324659/htdocs/wp/wp-includes/rest-api/class-wp-rest-server.php on line 1775

Warning: Cannot modify header information - headers already sent by (output started at /homepages/22/d228324659/htdocs/wp/wp-includes/media.php:5474) in /homepages/22/d228324659/htdocs/wp/wp-includes/rest-api/class-wp-rest-server.php on line 1775

Warning: Cannot modify header information - headers already sent by (output started at /homepages/22/d228324659/htdocs/wp/wp-includes/media.php:5474) in /homepages/22/d228324659/htdocs/wp/wp-includes/rest-api/class-wp-rest-server.php on line 1775

Warning: Cannot modify header information - headers already sent by (output started at /homepages/22/d228324659/htdocs/wp/wp-includes/media.php:5474) in /homepages/22/d228324659/htdocs/wp/wp-includes/rest-api/class-wp-rest-server.php on line 1775

Warning: Cannot modify header information - headers already sent by (output started at /homepages/22/d228324659/htdocs/wp/wp-includes/media.php:5474) in /homepages/22/d228324659/htdocs/wp/wp-includes/rest-api/class-wp-rest-server.php on line 1775

Warning: Cannot modify header information - headers already sent by (output started at /homepages/22/d228324659/htdocs/wp/wp-includes/media.php:5474) in /homepages/22/d228324659/htdocs/wp/wp-includes/rest-api/class-wp-rest-server.php on line 1775

Warning: Cannot modify header information - headers already sent by (output started at /homepages/22/d228324659/htdocs/wp/wp-includes/media.php:5474) in /homepages/22/d228324659/htdocs/wp/wp-includes/rest-api/class-wp-rest-server.php on line 1775
{"id":273,"date":"2016-11-11T16:09:37","date_gmt":"2016-11-11T21:09:37","guid":{"rendered":"http:\/\/www.auriculaonline.com\/wp\/?p=273"},"modified":"2019-09-16T11:01:38","modified_gmt":"2019-09-16T16:01:38","slug":"eq-nth-order-bandpass","status":"publish","type":"post","link":"http:\/\/www.auriculaonline.com\/wp\/?p=273","title":{"rendered":"EQ, Nth-Order Bandpass"},"content":{"rendered":"Download<\/a>

     Disclaimer...<\/a>

23 \u00a0 desc:EQ, Bandpass Nth-Order, v1.0.1
24 \u00a0
25 \u00a0 slider1:2000<40,16000,1>Cutoff [Hz]
26 \u00a0 slider2:2<2,8,2>Order [N]
27 \u00a0
28 \u00a0 @init
29 \u00a0 M = 1;
30 \u00a0 Q = sqrt(2);
31 \u00a0
32 \u00a0
33 \u00a0 @slider
34 \u00a0
35 \u00a0 function find_Dk(index stages)
36 \u00a0 (
37 \u00a0 _k = index;
38 \u00a0 _M = stages;
39 \u00a0 2.0 * sin($pi*(2*_k-1)\/(2*_M));
40 \u00a0 );
41 \u00a0
42 \u00a0 slider1 > 39 ? (
43 \u00a0 slider2 > 1 ? (
44 \u00a0 N = slider2; \/\/ order N, 2 < N < 8
45 \u00a0 M = N \/ 2; \/\/ # of cascaded elements M, 1 < M < 4
46 \u00a0 w = 2.0 * $pi * slider1 \/ srate;
47 \u00a0 dE = 2.0 * tan( w \/ (2.0 * Q)) \/ sin(w);
48 \u00a0
49 \u00a0 k = 1;
50 \u00a0 j = 1;
51 \u00a0 Dk = find_Dk(k, M);
52 \u00a0 Ak = (1 + sqr(dE \/ 2.0)) \/ (Dk * dE \/ 2.0);
53 \u00a0 dk = sqrt(( dE * Dk ) \/ (Ak + sqrt(sqr(Ak) - 1) ));
54 \u00a0 Bk = Dk * (dE \/ 2.0) \/ dk;
55 \u00a0 Wk = Bk + sqrt(sqr(Bk) - 1);
56 \u00a0 theta_1k = 2.0 * atan(tan(w\/2.0) \/ Wk);
57 \u00a0
58 \u00a0 beta1 = 0.5 * (( 1.0 - dk \/ 2.0 * sin(theta_1k) ) \/ ( 1.0 + dk \/ 2.0 * sin(theta_1k) ));
59 \u00a0 gamma1 = ( 0.5 + beta1 ) * cos(theta_1k);
60 \u00a0 alpha1 = 0.5 * (0.5 - beta1) * sqrt(1+ sqr(de * Dk \/ ( Ak + sqrt( Ak*Ak -1 ) )));
61 \u00a0
62 \u00a0 M > 1 ? (
63 \u00a0 k = 1;
64 \u00a0 \t\tj = 2;
65 \u00a0 \t\ttheta_2k = 2.0 * atan( Wk * tan(w\/2.0) );
66 \u00a0
67 \u00a0 \t\tbeta2 = 0.5 * (( 1.0 - dk \/ 2.0 * sin(theta_2k) ) \/ ( 1.0 + dk \/ 2.0 * sin(theta_2k) ));
68 \u00a0 \t\tgamma2 = ( 0.5 + beta2 ) * cos(theta_2k);
69 \u00a0 \t\talpha2 = 0.5 * (0.5 - beta2) * sqrt(1+ sqr(de * Dk \/ ( Ak + sqrt( Ak*Ak -1 ) )));
70 \u00a0 );
71 \u00a0
72 \u00a0 M > 2 ? (
73 \u00a0 \t\tk = 2;
74 \u00a0 \t\tj = 1;
75 \u00a0 \t\tDk = find_Dk(k, M);
76 \u00a0 \t\tAk = (1 + sqr(dE \/ 2.0)) \/ (Dk * dE \/ 2.0);
77 \u00a0 \t\tdk = sqrt(( dE * Dk ) \/ (Ak + sqrt(sqr(Ak) - 1) ));
78 \u00a0 \t\tBk = Dk * (dE \/ 2.0) \/ dk;
79 \u00a0 \t\tWk = Bk + sqrt(sqr(Bk) - 1);
80 \u00a0 \t\ttheta_1k = 2.0 * atan(tan(w\/2.0) \/ Wk);
81 \u00a0
82 \u00a0 \t\tbeta3 = 0.5 * (( 1.0 - dk \/ 2.0 * sin(theta_1k) ) \/ ( 1.0 + dk \/ 2.0 * sin(theta_1k) ));
83 \u00a0 \t\tgamma3 = ( 0.5 + beta3 ) * cos(theta_1k);
84 \u00a0 \t\talpha3 = 0.5 * (0.5 - beta3) * sqrt(1+ sqr(de * Dk \/ ( Ak + sqrt( Ak*Ak -1 ) )));
85 \u00a0 );
86 \u00a0
87 \u00a0 M > 3 ? (
88 \u00a0 k = 2;
89 \u00a0 \t\tj = 2;
90 \u00a0 \t\ttheta_2k = 2.0 * atan( Wk * tan(w\/2.0) );
91 \u00a0
92 \u00a0 \t\tbeta4 = 0.5 * (( 1.0 - dk \/ 2.0 * sin(theta_2k) ) \/ ( 1.0 + dk \/ 2.0 * sin(theta_2k) ));
93 \u00a0 \t\tgamma4 = ( 0.5 + beta4 ) * cos(theta_2k);
94 \u00a0 \t\talpha4 = 0.5 * (0.5 - beta4) * sqrt(1+ sqr(de * Dk \/ ( Ak + sqrt( Ak*Ak -1 ) )));
95 \u00a0 );
96 \u00a0
97 \u00a0 );
98 \u00a0 );
99 \u00a0
100 \u00a0 @sample
101 \u00a0 x_1 = spl0;
102 \u00a0 y_1 = 2.0 * ( alpha1 * ( x_1 - x2_1 ) + gamma1 * y1_1 - beta1 * y2_1 );
103 \u00a0 x2_1 = x1_1;
104 \u00a0 x1_1 = x_1;
105 \u00a0 y2_1 = y1_1;
106 \u00a0 y1_1 = y_1;
107 \u00a0 spl0 = y_1;
108 \u00a0
109 \u00a0 M > 1 ? (
110 \u00a0 x_2 = spl0;
111 \u00a0 y_2 = 2.0 * ( alpha2 * ( x_2 - x2_2 ) + gamma2 * y1_2 - beta2 * y2_2 );
112 \u00a0 x2_2 = x1_2;
113 \u00a0 x1_2 = x_2;
114 \u00a0 y2_2 = y1_2;
115 \u00a0 y1_2 = y_2;
116 \u00a0 spl0 = y_2 * 2.0;
117 \u00a0 );
118 \u00a0
119 \u00a0 M > 2 ? (
120 \u00a0 x_3 = spl0;
121 \u00a0 y_3 = 2.0 * ( alpha3 * ( x_3 - x2_3 ) + gamma3 * y1_3 - beta3 * y2_3 );
122 \u00a0 x2_3 = x1_3;
123 \u00a0 x1_3 = x_3;
124 \u00a0 y2_3 = y1_3;
125 \u00a0 y1_3 = y_3;
126 \u00a0 spl0 = y_3 * sqrt(2);
127 \u00a0 );
128 \u00a0
129 \u00a0 M > 3 ? (
130 \u00a0 x_4 = spl0;
131 \u00a0 y_4 = 2.0 * ( alpha4 * ( x_4 - x2_4 ) + gamma4 * y1_4 - beta4 * y2_4 );
132 \u00a0 x2_4 = x1_4;
133 \u00a0 x1_4 = x_4;
134 \u00a0 y2_4 = y1_4;
135 \u00a0 y1_4 = y_4;
136 \u00a0 spl0 = y_4 * 2;
137 \u00a0 );
138 \u00a0
<\/p>

<\/p>Download<\/a>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"_links":{"self":[{"href":"http:\/\/www.auriculaonline.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/273"}],"collection":[{"href":"http:\/\/www.auriculaonline.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.auriculaonline.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.auriculaonline.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.auriculaonline.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=273"}],"version-history":[{"count":3,"href":"http:\/\/www.auriculaonline.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/273\/revisions"}],"predecessor-version":[{"id":629,"href":"http:\/\/www.auriculaonline.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/273\/revisions\/629"}],"wp:attachment":[{"href":"http:\/\/www.auriculaonline.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.auriculaonline.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=273"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.auriculaonline.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}