This repository has been archived by the owner on Apr 1, 2020. It is now read-only.
forked from jsr606/CFO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
filterCoefficientsMoogLadder.inc
executable file
·25 lines (20 loc) · 11.3 KB
/
filterCoefficientsMoogLadder.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// value of coefficients for implementation of Moog Ladder style resonant low pass filter
// in 32bit fixed integer calculation with coefficients
// g = (1 - x)^4
// b1 = 4x
// b2 = -6x^2
// b3 = 4x^3
// b4 = -x^4
// x = EXP(-(14.445 * fc))
// where fc is a value between 0.0 and 0.5 of the sampling rate (in this case 48KHz)
//
// g
7730393,7956911,8190067,8430055,8677075,8931333,9193043,9462420,9739690,10025087,10318845,10621212,10932438,11252784,11582517,11921914,12271254,12630830,13000945,13381904,13774027,14177639,14593080,15020692,15460836,15913877,16380194,16860175,17354220,17862745,18386170,18924934,19479484,20050284,20637809,21242556,21865018,22505724,23165206,23844011,24542710,25261881,26002132,26764071,27548340,28355589,29186497,30041754,30922075,31828195,32760865,33720874,34709012,35726109,36773013,37850601,38959772,40101444,41276577,42486152,43731176,45012690,46331764,47689495,49087025,50525515,52006173,53530223,55098946,56713656,58375693,60086452,61847358,63659885,65525548,67445905,69422566,71457166,73551427,75707092,77925956,80209887,82560785,84980619,87471425,90035275,92674310,95390762,98186887,101065027,104027599,107077090,110216037,113447099,116772968,120196439,123720382,127347756,131081629,134925093,138881416,142953919,147146006,151461256,155903251,160475754,165182630,170027814,175015454,180149716,185434966,190875690,196476463,202242051,208177322,214287380,220577347,227052624,233718714,240581292,247646284,254919670,262407680,270116787,278053595,286224953,294637873,303299699,312217887,321400231,330854639,340589422,350613094,360934464,371562610,382506856,393777000,405382984,417335149,429644299,442321370,455377944,468825746,482677110,496944728,511641719,526781782,542378866,558447751,575003583,592062139,609639593,627753073,646420287,665659424,685489529,705930641,727003191,748728900,771130064,794230170,818053830,842626179,867974307,894125997,921110611,948958631,977702385,1007375692,1038014044,1069654650,1102337124,1136102744,1170995524,1207061686,1244350164,1282912925,1322805006,1364084973,1406815195,1451061624,1496895349,1544391890,1593631939,1644702479,1697696804,1752714830,1809865105,1869264035,1931037925,1995324032,2062270847,2132040807,2204810956,2280774706,2360144704,2443154837,2530062428,2621152714,2716741893,2817182420,2922866347,3034233898,3151781638,3276065795,3407721513,3547467988,3696130526,3854655329,4024136766,4205846353,4401269145,4612154019,4840571078,5088993792,5360401603,5658414293,5987476367,6353111379,6762261327,7223785189,7749168552,8353573824,9057436956,9889002851,10888442000,12114878218,13659111791,15668055402,18396174389,22325770963,28495882501,39631229567,65894430866,204816793749,-175652025025,-60228320333,-35828969727,-25197653708,-19224318982,-15382805412,-12693055725,-10695206179,-9144803901,-7899806521,-6871970546,-6003501819,-5254884437,-4598105816,-4012652847,-3483069834,-2997374010,-2546008524,-2121116169,-1716013394,-1324789764,
// gg
13914,14741,15618,16546,17530,18573,19677,20847,22087,23400,24791,26266,27828,29482,31235,33093,35060,37145,39354,41694,44174,46800,49583,52532,55655,58965,62471,66186,70121,74291,78709,83389,88348,93601,99167,105064,111311,117930,124943,132373,140244,148584,157419,166780,176698,187205,198337,210131,222627,235865,249891,264751,280495,297175,314846,333569,353405,374421,396687,420276,445269,471748,499802,529524,561014,594377,629724,667173,706849,748886,793422,840607,890599,943565,999681,1059135,1122126,1188863,1259570,1334484,1413854,1497945,1587040,1681434,1781446,1887407,1999672,2118619,2244642,2378165,2519633,2669520,2828328,2996587,3174861,3363747,3563876,3775920,4000588,4238631,4490849,4758086,5041237,5341254,5659141,5995964,6352854,6731008,7131698,7556267,8006144,8482842,8987961,9523203,10090367,10691369,11328227,12003094,12718243,13476088,14279197,15130275,16032204,16988041,18001022,19074586,20212372,21418256,22696333,24050965,25486758,27008623,28621764,30331706,32144313,34065799,36102796,38262309,40551793,42979192,45552895,48281874,51175612,54244230,57498473,60949765,64610281,68492916,72611470,76980591,81615890,86533938,91752485,97290423,103167833,109406164,116028374,123058827,130523687,138450781,146869934,155813077,165314152,175409810,186139089,197543939,209669229,222563267,236277884,250868768,266395759,282923490,300521367,319264484,339233762,360516675,383207941,407410107,433234454,460801877,490243509,521702619,555335151,591311314,629817659,671058529,715257897,762662780,813544735,868203926,926972831,990219658,1058354509,1131834311,1211169469,1296932582,1389767406,1490399216,1599649329,1718449991,1847864312,1989106573,2143572863,2312876167,2498879817,2703761196,2930064017,3180788100,3459483317,3770384171,4118574677,4510202000,4952765232,5455484699,6029814904,6690133676,7454690595,8346949063,9397516072,10646921175,12149818349,13981390104,16247433527,19100765745,22769062173,27603974843,34172617423,43439523997,57157119757,78794367644,116052117450,189062049498,365691808283,1010968354323,9767226642373,7183671438948,844581651071,298888206408,147829240284,86048254815,55094878737,37512198006,26632900166,19471030305,14530248724,10995189469,8391689997,6429341259,4922639833,3748895338,2824649091,2091808932,1509245346,1047536219,685616855,408633593,
// ggg
25,27,30,32,35,39,42,46,50,55,60,65,71,77,84,92,100,109,119,130,142,154,168,184,200,218,238,260,283,309,337,367,401,437,477,520,567,618,674,735,801,874,953,1039,1133,1236,1348,1470,1603,1748,1906,2079,2267,2472,2696,2940,3206,3496,3812,4157,4534,4944,5392,5880,6412,6992,7625,8315,9068,9889,10784,11760,12825,13985,15251,16632,18138,19780,21570,23523,25652,27975,30507,33269,36281,39566,43148,47054,51315,55961,61028,66553,72580,79152,86319,94136,102661,111958,122097,133155,145215,158368,172713,188358,205421,224031,244328,266465,290609,316943,345665,376992,411161,448430,489081,533421,581786,634541,692087,754859,823333,898029,979512,1068403,1165375,1271167,1386583,1512503,1649885,1799778,1963324,2141775,2336494,2548974,2780842,3033877,3310025,3611410,3940353,4299396,4691309,5119131,5586176,6096076,6652801,7260694,7924512,8649451,9441216,10306043,11250767,12282868,13410557,14642836,15989561,17461548,19070689,20829998,22753807,24857828,27159353,29677405,32432851,35448747,38750423,42365822,46325714,50664096,55418489,60630335,66345432,72614538,79493772,87045431,95338578,104449918,114464765,125478052,137595602,150935511,165629560,181825418,199688390,219403905,241180571,265253224,291886535,321380038,354072525,390348655,430646158,475463721,525371870,581024375,643172462,712682624,790557116,877958503,976241468,1086989670,1212062979,1353652371,1514354126,1697261034,1906066829,2145223598,2420113493,2737298606,3104823596,3532632618,4033113896,4621830978,5318530852,6148512813,7144569096,8349726741,9821198837,11636214390,13900796486,16763169158,20435004924,25225837833,31600737810,40280628376,52424920898,69980574551,96391210910,138148971466,208509368587,337491493681,603253253254,1254372752245,3374371678766,15510521906258,465775850394381,-293791861126116,-11843567301560,-2493349951485,-867282507162,-385152897419,-197327183287,-110861011699,-66320495312,-41457534274,-26725734030,-17592361704,-11729897504,-7866286980,-5270079440,-3502474994,-2290692656,-1459832705,-894663743,-517337120,-273931703,-126043708,
// G = gggg
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,2,2,2,2,3,3,3,4,4,5,5,6,6,7,8,9,10,12,13,15,16,18,21,23,26,29,33,37,41,46,52,58,65,73,82,92,104,116,131,147,165,185,207,233,261,293,329,369,415,465,522,586,658,739,829,931,1045,1173,1317,1478,1659,1863,2091,2347,2634,2957,3320,3726,4183,4696,5271,5917,6642,7457,8371,9397,10549,11842,13294,14924,16754,18809,21116,23706,26614,29879,33545,37661,42283,47473,53301,59845,67193,75446,84713,95121,106809,119937,134681,151241,169842,190736,214207,240574,270195,303474,340865,382878,430087,483139,542761,609770,685089,769755,864936,971949,1092274,1227582,1379757,1550921,1743464,1960089,2203841,2478157,2786915,3134502,3525865,3966604,4463042,5022338,5652596,6362975,7163873,8067060,9085892,10235511,11533128,12998292,14653229,16523222,18637092,21027655,23732383,26794045,30261528,34190790,38645928,43700471,49438879,55958214,63370360,71804302,81409018,92356997,104848191,119114728,135426995,154100134,175502630,200066396,228298588,260796925,298267442,341546601,391629087,449701548,517184339,595785206,687565276,795024101,921204910,1069834600,1245503352,1453887751,1702067583,1998915138,2355643766,2786522922,3309873118,3949426433,4736222811,5711308551,6929578562,8465412021,10421008012,12938960425,16221673847,20562044422,26392967093,34370013958,45513564077,61462422880,84945757885,120706435350,177412160472,271892124207,439349618992,760642890569,1445541245043,3135784986587,8322405293673,31136558075793,237966192290634,22211744516035900,12015256877698800,166082327562704,20799729956799,5088160811660,1723948436947,706744767506,327631132494,165149423120,88270991373,49157097929,28147872413,16396041262,9624387376,5642041313,3272252217,1857672466,1018788807,530346650,255492546,109446810,38878390,
// Gstage
7716504,7942197,8174479,8413541,8659580,8912799,9173408,9441619,9717654,10001741,10294113,10595012,10904682,11223379,11551366,11888913,12236293,12593794,12961710,13340339,13729995,14130993,14543665,14968344,15405381,15855130,16317961,16794248,17284381,17788762,18307796,18841911,19391535,19957117,20539117,21138009,21754271,22388409,23040933,23712369,24403262,25114166,25845660,26598323,27372768,28169612,28989499,29833083,30701039,31594065,32512866,33458185,34430766,35431386,36460840,37519946,38609544,39730487,40883667,42069992,43290395,44545835,45837296,47165786,48532351,49938049,51383984,52871263,54401050,55974531,57592910,59257442,60969401,62730102,64540889,66403145,68318289,70287759,72313063,74395724,76537298,78739403,81003677,83331808,85725537,88186621,90716874,93318175,95992413,98741536,101567550,104472504,107458473,110527627,113682141,116924265,120256292,123680570,127199523,130815562,134531234,138349100,142271761,146301944,150442336,154695752,159065055,163553124,168162987,172897633,177760181,182753799,187881676,193147112,198553426,204104083,209802486,215652211,221656840,227820022,234145536,240637109,247298590,254133932,261147090,268342114,275723070,283294182,291059630,299023739,307190782,315565210,324151483,332954130,341977720,351226834,360706243,370420619,380374740,390573527,401021756,411724470,422686551,433913081,445409128,457179780,469230250,481565597,494191163,507112187,520333990,533861770,547701010,561857159,576335536,591141579,606280923,621758917,637581253,653753406,670281047,687169945,704425506,722053734,740060295,758451085,777231857,796408655,815987510,835974493,856375675,877197491,898446180,920128373,942250664,964819817,987842843,1011326899,1035279419,1059708129,1084620754,1110025732,1135931607,1162347239,1189282170,1216746363,1244750091,1273304642,1302421578,1332113360,1362393412,1393275766,1424775789,1456909849,1489695424,1523151574,1557298891,1592159423,1627757351,1664118871,1701272730,1739249752,1778083998,1817813274,1858477605,1900122518,1942796904,1986555550,2031458306,2077571776,2124969830,2173734255,2223956537,2275738290,2329193578,2384450539,2441653032,2500963392,2562566115,2626670049,2693514005,2763371812,2836558465,2913437519,2994432687,3080039626,3170840682,3267527014,3370921657,3482018158,3602020921,3732409626,3875018714,4032153473,4206752535,4402618211,4624765942,4879946767,5177473195,5530569783,5958658981,6491508120,7177163478,8098547824,9412184160,11453182589,15091789849,23511984362,65147491412,-61046159117,-18425566938,-9921154401,-6252304812,-4190776664,-2857833714,-1915686403