/*
  Constant data
  -------------
  file: temp/tables.c
  Lookup tables and standard wavetables.
  created: Thu Dec 16 11:33:05 2021
  AUTOMATICALLY GENERATED FILE, DO NOT EDIT
*/

// 1st quadrant sine look up table for calculating the filter increment table, 0..1 out(Q16)
// The table is arranged as follows,
// the first 512 bytes are for a table with 32k points,
// the next 256 bytes have halved resolution, 16k points
// following 256 byte blocks each have halved resolution to the previous block until the
// last, fifth block, which has 1k resolution.
// This gives greater resolution for small angles because the table is accessed by frequency
// i.e. midi notes, which map to the log of the frequency.
const unsigned short int sine_table[1792] =
{
  0,6,13,19,25,31,38,44,50,57,63,69,75,82,88,94,101,107,113,119,126,132,138,145,151,157,163,170,176,
  182,188,195,201,207,214,220,226,232,239,245,251,258,264,270,276,283,289,295,302,308,314,320,327,333,
  339,346,352,358,364,371,377,383,390,396,402,408,415,421,427,434,440,446,452,459,465,471,478,484,490,
  496,503,509,515,521,528,534,540,547,553,559,565,572,578,584,591,597,603,609,616,622,628,635,641,647,
  653,660,666,672,679,685,691,697,704,710,716,723,729,735,741,748,754,760,767,773,779,785,792,798,804,
  811,817,823,829,836,842,848,854,861,867,873,880,886,892,898,905,911,917,924,930,936,942,949,955,961,
  968,974,980,986,993,999,1005,1012,1018,1024,1030,1037,1043,1049,1056,1062,1068,1074,1081,1087,1093,
  1100,1106,1112,1118,1125,1131,1137,1143,1150,1156,1162,1169,1175,1181,1187,1194,1200,1206,1213,1219,
  1225,1231,1238,1244,1250,1257,1263,1269,1275,1282,1288,1294,1301,1307,1313,1319,1326,1332,1338,1345,
  1351,1357,1363,1370,1376,1382,1388,1395,1401,1407,1414,1420,1426,1432,1439,1445,1451,1458,1464,1470,
  1476,1483,1489,1495,1502,1508,1514,1520,1527,1533,1539,1546,1552,1558,1564,1571,1577,1583,1589,1596,
  1602,1608,1615,1621,1627,1633,1640,1646,1652,1659,1665,1671,1677,1684,1690,1696,1703,1709,1715,1721,
  1728,1734,1740,1747,1753,1759,1765,1772,1778,1784,1790,1797,1803,1809,1816,1822,1828,1834,1841,1847,
  1853,1860,1866,1872,1878,1885,1891,1897,1904,1910,1916,1922,1929,1935,1941,1948,1954,1960,1966,1973,
  1979,1985,1991,1998,2004,2010,2017,2023,2029,2035,2042,2048,2054,2061,2067,2073,2079,2086,2092,2098,
  2105,2111,2117,2123,2130,2136,2142,2148,2155,2161,2167,2174,2180,2186,2192,2199,2205,2211,2218,2224,
  2230,2236,2243,2249,2255,2261,2268,2274,2280,2287,2293,2299,2305,2312,2318,2324,2331,2337,2343,2349,
  2356,2362,2368,2375,2381,2387,2393,2400,2406,2412,2418,2425,2431,2437,2444,2450,2456,2462,2469,2475,
  2481,2488,2494,2500,2506,2513,2519,2525,2531,2538,2544,2550,2557,2563,2569,2575,2582,2588,2594,2601,
  2607,2613,2619,2626,2632,2638,2645,2651,2657,2663,2670,2676,2682,2688,2695,2701,2707,2714,2720,2726,
  2732,2739,2745,2751,2758,2764,2770,2776,2783,2789,2795,2801,2808,2814,2820,2827,2833,2839,2845,2852,
  2858,2864,2870,2877,2883,2889,2896,2902,2908,2914,2921,2927,2933,2940,2946,2952,2958,2965,2971,2977,
  2983,2990,2996,3002,3009,3015,3021,3027,3034,3040,3046,3053,3059,3065,3071,3078,3084,3090,3096,3103,
  3109,3115,3122,3128,3134,3140,3147,3153,3159,3165,3172,3178,3184,3191,3197,3203,3209,3216,3228,3241,
  3253,3266,3278,3291,3304,3316,3329,3341,3354,3366,3379,3391,3404,3417,3429,3442,3454,3467,3479,3492,
  3504,3517,3529,3542,3555,3567,3580,3592,3605,3617,3630,3642,3655,3667,3680,3693,3705,3718,3730,3743,
  3755,3768,3780,3793,3805,3818,3831,3843,3856,3868,3881,3893,3906,3918,3931,3943,3956,3969,3981,3994,
  4006,4019,4031,4044,4056,4069,4081,4094,4107,4119,4132,4144,4157,4169,4182,4194,4207,4219,4232,4244,
  4257,4270,4282,4295,4307,4320,4332,4345,4357,4370,4382,4395,4407,4420,4433,4445,4458,4470,4483,4495,
  4508,4520,4533,4545,4558,4570,4583,4596,4608,4621,4633,4646,4658,4671,4683,4696,4708,4721,4733,4746,
  4758,4771,4784,4796,4809,4821,4834,4846,4859,4871,4884,4896,4909,4921,4934,4946,4959,4972,4984,4997,
  5009,5022,5034,5047,5059,5072,5084,5097,5109,5122,5134,5147,5159,5172,5184,5197,5210,5222,5235,5247,
  5260,5272,5285,5297,5310,5322,5335,5347,5360,5372,5385,5397,5410,5422,5435,5448,5460,5473,5485,5498,
  5510,5523,5535,5548,5560,5573,5585,5598,5610,5623,5635,5648,5660,5673,5685,5698,5710,5723,5735,5748,
  5761,5773,5786,5798,5811,5823,5836,5848,5861,5873,5886,5898,5911,5923,5936,5948,5961,5973,5986,5998,
  6011,6023,6036,6048,6061,6073,6086,6098,6111,6123,6136,6148,6161,6173,6186,6199,6211,6224,6236,6249,
  6261,6274,6286,6299,6311,6324,6336,6349,6361,6374,6386,6399,6411,6424,6449,6474,6499,6524,6549,6574,
  6599,6624,6649,6674,6699,6724,6749,6774,6799,6824,6849,6874,6899,6924,6949,6974,6999,7024,7049,7074,
  7099,7124,7149,7174,7199,7224,7249,7273,7298,7323,7348,7373,7398,7423,7448,7473,7498,7523,7548,7573,
  7598,7623,7648,7673,7698,7723,7748,7773,7798,7823,7848,7873,7898,7923,7947,7972,7997,8022,8047,8072,
  8097,8122,8147,8172,8197,8222,8247,8272,8297,8322,8346,8371,8396,8421,8446,8471,8496,8521,8546,8571,
  8596,8621,8646,8670,8695,8720,8745,8770,8795,8820,8845,8870,8895,8919,8944,8969,8994,9019,9044,9069,
  9094,9119,9144,9168,9193,9218,9243,9268,9293,9318,9343,9367,9392,9417,9442,9467,9492,9517,9542,9566,
  9591,9616,9641,9666,9691,9716,9740,9765,9790,9815,9840,9865,9890,9914,9939,9964,9989,10014,10039,10063,
  10088,10113,10138,10163,10188,10212,10237,10262,10287,10312,10336,10361,10386,10411,10436,10461,10485,
  10510,10535,10560,10585,10609,10634,10659,10684,10709,10733,10758,10783,10808,10833,10857,10882,10907,
  10932,10956,10981,11006,11031,11056,11080,11105,11130,11155,11179,11204,11229,11254,11278,11303,11328,
  11353,11377,11402,11427,11452,11476,11501,11526,11551,11575,11600,11625,11650,11674,11699,11724,11749,
  11773,11798,11823,11847,11872,11897,11922,11946,11971,11996,12020,12045,12070,12095,12119,12144,12169,
  12193,12218,12243,12267,12292,12317,12341,12366,12391,12415,12440,12465,12490,12514,12539,12564,12588,
  12613,12638,12662,12687,12711,12736,12761,12785,12835,12884,12933,12983,13032,13081,13130,13180,13229,
  13278,13327,13376,13426,13475,13524,13573,13622,13672,13721,13770,13819,13868,13917,13966,14016,14065,
  14114,14163,14212,14261,14310,14359,14408,14457,14506,14555,14604,14653,14702,14751,14800,14849,14898,
  14947,14996,15045,15094,15143,15192,15240,15289,15338,15387,15436,15485,15534,15582,15631,15680,15729,
  15778,15826,15875,15924,15973,16021,16070,16119,16168,16216,16265,16314,16362,16411,16460,16508,16557,
  16606,16654,16703,16751,16800,16849,16897,16946,16994,17043,17091,17140,17188,17237,17285,17334,17382,
  17431,17479,17528,17576,17625,17673,17721,17770,17818,17867,17915,17963,18012,18060,18108,18156,18205,
  18253,18301,18350,18398,18446,18494,18543,18591,18639,18687,18735,18783,18832,18880,18928,18976,19024,
  19072,19120,19168,19216,19264,19313,19361,19409,19457,19505,19553,19600,19648,19696,19744,19792,19840,
  19888,19936,19984,20032,20080,20127,20175,20223,20271,20319,20366,20414,20462,20510,20557,20605,20653,
  20701,20748,20796,20844,20891,20939,20987,21034,21082,21129,21177,21224,21272,21320,21367,21415,21462,
  21510,21557,21604,21652,21699,21747,21794,21842,21889,21936,21984,22031,22078,22126,22173,22220,22268,
  22315,22362,22409,22457,22504,22551,22598,22645,22693,22740,22787,22834,22881,22928,22975,23022,23069,
  23116,23163,23210,23257,23304,23351,23398,23445,23492,23539,23586,23633,23680,23727,23774,23820,23867,
  23914,23961,24008,24054,24101,24148,24195,24241,24288,24335,24381,24428,24475,24521,24568,24614,24661,
  24708,24754,24801,24847,24894,24940,24987,25033,25080,25172,25265,25358,25451,25543,25636,25728,25821,
  25913,26005,26098,26190,26282,26374,26466,26558,26650,26742,26833,26925,27017,27108,27200,27291,27382,
  27474,27565,27656,27747,27838,27929,28020,28111,28202,28293,28383,28474,28564,28655,28745,28835,28926,
  29016,29106,29196,29286,29376,29466,29555,29645,29735,29824,29914,30003,30093,30182,30271,30360,30449,
  30538,30627,30716,30805,30893,30982,31071,31159,31248,31336,31424,31512,31600,31688,31776,31864,31952,
  32040,32127,32215,32303,32390,32477,32565,32652,32739,32826,32913,33000,33087,33173,33260,33347,33433,
  33520,33606,33692,33778,33865,33951,34037,34122,34208,34294,34380,34465,34551,34636,34721,34806,34892,
  34977,35062,35146,35231,35316,35401,35485,35570,35654,35738,35823,35907,35991,36075,36159,36243,36326,
  36410,36493,36577,36660,36744,36827,36910,36993,37076,37159,37241,37324,37407,37489,37572,37654,37736,
  37818,37900,37982,38064,38146,38228,38309,38391,38472,38554,38635,38716,38797,38878,38959,39040,39120,
  39201,39282,39362,39442,39523,39603,39683,39763,39843,39922,40002,40082,40161,40241,40320,40399,40478,
  40557,40636,40715,40794,40872,40951,41029,41108,41186,41264,41342,41420,41498,41576,41653,41731,41808,
  41886,41963,42040,42117,42194,42271,42348,42424,42501,42578,42654,42730,42806,42882,42958,43034,43110,
  43186,43261,43337,43412,43487,43562,43638,43713,43787,43862,43937,44011,44086,44160,44234,44308,44382,
  44456,44530,44604,44677,44751,44824,44898,44971,45044,45117,45190,45262,45335,45408,45480,45552,45625,
  45697,45769,45841,45912,45984,46056,46127,46199,46270,46341,46483,46624,46765,46906,47046,47186,47325,
  47464,47603,47741,47878,48015,48152,48288,48424,48559,48694,48828,48962,49095,49228,49361,49493,49624,
  49756,49886,50016,50146,50275,50404,50532,50660,50787,50914,51041,51166,51292,51417,51541,51665,51789,
  51911,52034,52156,52277,52398,52519,52639,52759,52878,52996,53114,53232,53349,53465,53581,53697,53812,
  53926,54040,54154,54267,54379,54491,54603,54714,54824,54934,55043,55152,55260,55368,55476,55582,55689,
  55794,55900,56004,56108,56212,56315,56418,56520,56621,56722,56823,56923,57022,57121,57219,57317,57414,
  57511,57607,57703,57798,57892,57986,58079,58172,58265,58356,58448,58538,58628,58718,58807,58896,58983,
  59071,59158,59244,59330,59415,59499,59583,59667,59750,59832,59914,59995,60075,60156,60235,60314,60392,
  60470,60547,60624,60700,60776,60851,60925,60999,61072,61145,61217,61288,61359,61429,61499,61568,61637,
  61705,61772,61839,61906,61971,62036,62101,62165,62228,62291,62353,62415,62476,62536,62596,62655,62714,
  62772,62830,62886,62943,62998,63054,63108,63162,63215,63268,63320,63372,63423,63473,63523,63572,63621,
  63668,63716,63763,63809,63854,63899,63944,63987,64031,64073,64115,64156,64197,64237,64277,64316,64354,
  64392,64429,64465,64501,64536,64571,64605,64639,64672,64704,64735,64766,64797,64827,64856,64884,64912,
  64940,64967,64993,65018,65043,65067,65091,65114,65137,65159,65180,65200,65220,65240,65259,65277,65294,
  65311,65328,65343,65358,65373,65387,65400,65413,65425,65436,65447,65457,65467,65476,65484,65492,65499,
  65505,65511,65516,65521,65525,65528,65531,65533,65535,65535
};

// Envelope time constant scale table
const unsigned short int env_scale_table[128] =
{
  181,186,192,197,203,209,215,222,228,235,242,249,256,264,271,279,287,296,304,313,323,332,342,352,362,
  373,384,395,406,418,431,443,456,470,483,497,512,527,542,558,575,592,609,627,645,664,683,703,724,745,
  767,790,813,837,861,886,912,939,967,995,1024,1054,1085,1117,1149,1183,1218,1253,1290,1328,1367,1407,
  1448,1491,1534,1579,1625,1673,1722,1773,1825,1878,1933,1990,2048,2108,2170,2233,2299,2366,2435,2507,
  2580,2656,2734,2814,2896,2981,3069,3158,3251,3346,3444,3545,3649,3756,3866,3979,4096,4216,4340,4467,
  4598,4732,4871,5014,5161,5312,5468,5628,5793,5962,6137,6317,6502,6693,6889,7090
};

// Exponential look up table, 0..1 in to 1..2 out
const unsigned short int exp_table[1024] =
{
  32767,32789,32811,32834,32856,32878,32900,32923,32945,32967,32990,33012,33034,33057,33079,33101,33124,
  33146,33169,33191,33214,33236,33259,33281,33304,33326,33349,33371,33394,33417,33439,33462,33485,33507,
  33530,33553,33575,33598,33621,33644,33666,33689,33712,33735,33758,33780,33803,33826,33849,33872,33895,
  33918,33941,33964,33987,34010,34033,34056,34079,34102,34125,34148,34171,34195,34218,34241,34264,34287,
  34310,34334,34357,34380,34404,34427,34450,34473,34497,34520,34544,34567,34590,34614,34637,34661,34684,
  34708,34731,34755,34778,34802,34825,34849,34872,34896,34920,34943,34967,34991,35014,35038,35062,35086,
  35109,35133,35157,35181,35204,35228,35252,35276,35300,35324,35348,35372,35396,35420,35444,35468,35492,
  35516,35540,35564,35588,35612,35636,35660,35684,35708,35733,35757,35781,35805,35830,35854,35878,35902,
  35927,35951,35975,36000,36024,36048,36073,36097,36122,36146,36171,36195,36220,36244,36269,36293,36318,
  36342,36367,36392,36416,36441,36466,36490,36515,36540,36565,36589,36614,36639,36664,36689,36713,36738,
  36763,36788,36813,36838,36863,36888,36913,36938,36963,36988,37013,37038,37063,37088,37113,37138,37163,
  37189,37214,37239,37264,37289,37315,37340,37365,37391,37416,37441,37467,37492,37517,37543,37568,37594,
  37619,37644,37670,37695,37721,37747,37772,37798,37823,37849,37875,37900,37926,37952,37977,38003,38029,
  38054,38080,38106,38132,38158,38183,38209,38235,38261,38287,38313,38339,38365,38391,38417,38443,38469,
  38495,38521,38547,38573,38599,38625,38652,38678,38704,38730,38756,38783,38809,38835,38861,38888,38914,
  38940,38967,38993,39020,39046,39072,39099,39125,39152,39178,39205,39231,39258,39285,39311,39338,39364,
  39391,39418,39444,39471,39498,39525,39551,39578,39605,39632,39659,39685,39712,39739,39766,39793,39820,
  39847,39874,39901,39928,39955,39982,40009,40036,40063,40090,40118,40145,40172,40199,40226,40254,40281,
  40308,40335,40363,40390,40417,40445,40472,40500,40527,40554,40582,40609,40637,40664,40692,40720,40747,
  40775,40802,40830,40858,40885,40913,40941,40968,40996,41024,41052,41079,41107,41135,41163,41191,41219,
  41247,41275,41302,41330,41358,41386,41414,41442,41471,41499,41527,41555,41583,41611,41639,41668,41696,
  41724,41752,41780,41809,41837,41865,41894,41922,41951,41979,42007,42036,42064,42093,42121,42150,42178,
  42207,42235,42264,42293,42321,42350,42379,42407,42436,42465,42494,42522,42551,42580,42609,42638,42666,
  42695,42724,42753,42782,42811,42840,42869,42898,42927,42956,42985,43014,43044,43073,43102,43131,43160,
  43190,43219,43248,43277,43307,43336,43365,43395,43424,43453,43483,43512,43542,43571,43601,43630,43660,
  43689,43719,43749,43778,43808,43837,43867,43897,43927,43956,43986,44016,44046,44076,44105,44135,44165,
  44195,44225,44255,44285,44315,44345,44375,44405,44435,44465,44495,44525,44555,44586,44616,44646,44676,
  44707,44737,44767,44797,44828,44858,44888,44919,44949,44980,45010,45041,45071,45102,45132,45163,45193,
  45224,45255,45285,45316,45347,45377,45408,45439,45470,45500,45531,45562,45593,45624,45655,45685,45716,
  45747,45778,45809,45840,45871,45902,45934,45965,45996,46027,46058,46089,46120,46152,46183,46214,46246,
  46277,46308,46340,46371,46402,46434,46465,46497,46528,46560,46591,46623,46654,46686,46717,46749,46781,
  46812,46844,46876,46908,46939,46971,47003,47035,47067,47098,47130,47162,47194,47226,47258,47290,47322,
  47354,47386,47418,47450,47483,47515,47547,47579,47611,47644,47676,47708,47740,47773,47805,47838,47870,
  47902,47935,47967,48000,48032,48065,48097,48130,48162,48195,48228,48260,48293,48326,48358,48391,48424,
  48457,48490,48522,48555,48588,48621,48654,48687,48720,48753,48786,48819,48852,48885,48918,48951,48984,
  49018,49051,49084,49117,49150,49184,49217,49250,49284,49317,49350,49384,49417,49451,49484,49518,49551,
  49585,49618,49652,49686,49719,49753,49787,49820,49854,49888,49922,49955,49989,50023,50057,50091,50125,
  50159,50193,50227,50261,50295,50329,50363,50397,50431,50465,50499,50534,50568,50602,50636,50671,50705,
  50739,50774,50808,50842,50877,50911,50946,50980,51015,51049,51084,51118,51153,51188,51222,51257,51292,
  51327,51361,51396,51431,51466,51501,51535,51570,51605,51640,51675,51710,51745,51780,51815,51850,51885,
  51921,51956,51991,52026,52061,52097,52132,52167,52202,52238,52273,52309,52344,52379,52415,52450,52486,
  52521,52557,52593,52628,52664,52700,52735,52771,52807,52842,52878,52914,52950,52986,53022,53057,53093,
  53129,53165,53201,53237,53273,53309,53346,53382,53418,53454,53490,53526,53563,53599,53635,53672,53708,
  53744,53781,53817,53854,53890,53926,53963,54000,54036,54073,54109,54146,54183,54219,54256,54293,54330,
  54366,54403,54440,54477,54514,54551,54588,54625,54661,54699,54736,54773,54810,54847,54884,54921,54958,
  54996,55033,55070,55107,55145,55182,55219,55257,55294,55332,55369,55407,55444,55482,55519,55557,55594,
  55632,55670,55707,55745,55783,55821,55858,55896,55934,55972,56010,56048,56086,56124,56162,56200,56238,
  56276,56314,56352,56390,56428,56467,56505,56543,56581,56620,56658,56696,56735,56773,56812,56850,56889,
  56927,56966,57004,57043,57082,57120,57159,57198,57236,57275,57314,57353,57392,57430,57469,57508,57547,
  57586,57625,57664,57703,57742,57781,57820,57860,57899,57938,57977,58016,58056,58095,58134,58174,58213,
  58253,58292,58331,58371,58411,58450,58490,58529,58569,58609,58648,58688,58728,58767,58807,58847,58887,
  58927,58967,59007,59047,59087,59127,59167,59207,59247,59287,59327,59367,59407,59448,59488,59528,59568,
  59609,59649,59690,59730,59770,59811,59851,59892,59932,59973,60014,60054,60095,60136,60176,60217,60258,
  60299,60340,60380,60421,60462,60503,60544,60585,60626,60667,60708,60749,60790,60832,60873,60914,60955,
  60997,61038,61079,61121,61162,61203,61245,61286,61328,61369,61411,61452,61494,61536,61577,61619,61661,
  61703,61744,61786,61828,61870,61912,61954,61996,62038,62080,62122,62164,62206,62248,62290,62332,62374,
  62417,62459,62501,62544,62586,62628,62671,62713,62756,62798,62841,62883,62926,62968,63011,63054,63096,
  63139,63182,63225,63267,63310,63353,63396,63439,63482,63525,63568,63611,63654,63697,63740,63783,63827,
  63870,63913,63956,64000,64043,64086,64130,64173,64217,64260,64304,64347,64391,64434,64478,64522,64565,
  64609,64653,64697,64740,64784,64828,64872,64916,64960,65004,65048,65092,65136,65180,65224,65268,65313,
  65357,65401,65445,65490
};


