]> git.donarmstrong.com Git - qmk_firmware.git/blob - quantum/audio/luts.c
57f2d5924c38c9f17621ebd23a37ec49030c02f3
[qmk_firmware.git] / quantum / audio / luts.c
1 /* Copyright 2016 IBNobody
2  *
3  * This program is free software: you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15  */
16
17 #include <avr/io.h>
18 #include <avr/interrupt.h>
19 #include <avr/pgmspace.h>
20 #include "luts.h"
21
22 const float vibrato_lut[VIBRATO_LUT_LENGTH] =
23 {
24         1.0022336811487,
25         1.0042529943610,
26         1.0058584256028,
27         1.0068905285205,
28         1.0072464122237,
29         1.0068905285205,
30         1.0058584256028,
31         1.0042529943610,
32         1.0022336811487,
33         1.0000000000000,
34         0.9977712970630,
35         0.9957650169978,
36         0.9941756956510,
37         0.9931566259436,
38         0.9928057204913,
39         0.9931566259436,
40         0.9941756956510,
41         0.9957650169978,
42         0.9977712970630,
43         1.0000000000000,
44 };
45
46 const uint16_t frequency_lut[FREQUENCY_LUT_LENGTH] =
47 {
48         0x8E0B,
49         0x8C02,
50         0x8A00,
51         0x8805,
52         0x8612,
53         0x8426,
54         0x8241,
55         0x8063,
56         0x7E8C,
57         0x7CBB,
58         0x7AF2,
59         0x792E,
60         0x7772,
61         0x75BB,
62         0x740B,
63         0x7261,
64         0x70BD,
65         0x6F20,
66         0x6D88,
67         0x6BF6,
68         0x6A69,
69         0x68E3,
70         0x6762,
71         0x65E6,
72         0x6470,
73         0x6300,
74         0x6194,
75         0x602E,
76         0x5ECD,
77         0x5D71,
78         0x5C1A,
79         0x5AC8,
80         0x597B,
81         0x5833,
82         0x56EF,
83         0x55B0,
84         0x5475,
85         0x533F,
86         0x520E,
87         0x50E1,
88         0x4FB8,
89         0x4E93,
90         0x4D73,
91         0x4C57,
92         0x4B3E,
93         0x4A2A,
94         0x491A,
95         0x480E,
96         0x4705,
97         0x4601,
98         0x4500,
99         0x4402,
100         0x4309,
101         0x4213,
102         0x4120,
103         0x4031,
104         0x3F46,
105         0x3E5D,
106         0x3D79,
107         0x3C97,
108         0x3BB9,
109         0x3ADD,
110         0x3A05,
111         0x3930,
112         0x385E,
113         0x3790,
114         0x36C4,
115         0x35FB,
116         0x3534,
117         0x3471,
118         0x33B1,
119         0x32F3,
120         0x3238,
121         0x3180,
122         0x30CA,
123         0x3017,
124         0x2F66,
125         0x2EB8,
126         0x2E0D,
127         0x2D64,
128         0x2CBD,
129         0x2C19,
130         0x2B77,
131         0x2AD8,
132         0x2A3A,
133         0x299F,
134         0x2907,
135         0x2870,
136         0x27DC,
137         0x2749,
138         0x26B9,
139         0x262B,
140         0x259F,
141         0x2515,
142         0x248D,
143         0x2407,
144         0x2382,
145         0x2300,
146         0x2280,
147         0x2201,
148         0x2184,
149         0x2109,
150         0x2090,
151         0x2018,
152         0x1FA3,
153         0x1F2E,
154         0x1EBC,
155         0x1E4B,
156         0x1DDC,
157         0x1D6E,
158         0x1D02,
159         0x1C98,
160         0x1C2F,
161         0x1BC8,
162         0x1B62,
163         0x1AFD,
164         0x1A9A,
165         0x1A38,
166         0x19D8,
167         0x1979,
168         0x191C,
169         0x18C0,
170         0x1865,
171         0x180B,
172         0x17B3,
173         0x175C,
174         0x1706,
175         0x16B2,
176         0x165E,
177         0x160C,
178         0x15BB,
179         0x156C,
180         0x151D,
181         0x14CF,
182         0x1483,
183         0x1438,
184         0x13EE,
185         0x13A4,
186         0x135C,
187         0x1315,
188         0x12CF,
189         0x128A,
190         0x1246,
191         0x1203,
192         0x11C1,
193         0x1180,
194         0x1140,
195         0x1100,
196         0x10C2,
197         0x1084,
198         0x1048,
199         0x100C,
200         0xFD1,
201         0xF97,
202         0xF5E,
203         0xF25,
204         0xEEE,
205         0xEB7,
206         0xE81,
207         0xE4C,
208         0xE17,
209         0xDE4,
210         0xDB1,
211         0xD7E,
212         0xD4D,
213         0xD1C,
214         0xCEC,
215         0xCBC,
216         0xC8E,
217         0xC60,
218         0xC32,
219         0xC05,
220         0xBD9,
221         0xBAE,
222         0xB83,
223         0xB59,
224         0xB2F,
225         0xB06,
226         0xADD,
227         0xAB6,
228         0xA8E,
229         0xA67,
230         0xA41,
231         0xA1C,
232         0x9F7,
233         0x9D2,
234         0x9AE,
235         0x98A,
236         0x967,
237         0x945,
238         0x923,
239         0x901,
240         0x8E0,
241         0x8C0,
242         0x8A0,
243         0x880,
244         0x861,
245         0x842,
246         0x824,
247         0x806,
248         0x7E8,
249         0x7CB,
250         0x7AF,
251         0x792,
252         0x777,
253         0x75B,
254         0x740,
255         0x726,
256         0x70B,
257         0x6F2,
258         0x6D8,
259         0x6BF,
260         0x6A6,
261         0x68E,
262         0x676,
263         0x65E,
264         0x647,
265         0x630,
266         0x619,
267         0x602,
268         0x5EC,
269         0x5D7,
270         0x5C1,
271         0x5AC,
272         0x597,
273         0x583,
274         0x56E,
275         0x55B,
276         0x547,
277         0x533,
278         0x520,
279         0x50E,
280         0x4FB,
281         0x4E9,
282         0x4D7,
283         0x4C5,
284         0x4B3,
285         0x4A2,
286         0x491,
287         0x480,
288         0x470,
289         0x460,
290         0x450,
291         0x440,
292         0x430,
293         0x421,
294         0x412,
295         0x403,
296         0x3F4,
297         0x3E5,
298         0x3D7,
299         0x3C9,
300         0x3BB,
301         0x3AD,
302         0x3A0,
303         0x393,
304         0x385,
305         0x379,
306         0x36C,
307         0x35F,
308         0x353,
309         0x347,
310         0x33B,
311         0x32F,
312         0x323,
313         0x318,
314         0x30C,
315         0x301,
316         0x2F6,
317         0x2EB,
318         0x2E0,
319         0x2D6,
320         0x2CB,
321         0x2C1,
322         0x2B7,
323         0x2AD,
324         0x2A3,
325         0x299,
326         0x290,
327         0x287,
328         0x27D,
329         0x274,
330         0x26B,
331         0x262,
332         0x259,
333         0x251,
334         0x248,
335         0x240,
336         0x238,
337         0x230,
338         0x228,
339         0x220,
340         0x218,
341         0x210,
342         0x209,
343         0x201,
344         0x1FA,
345         0x1F2,
346         0x1EB,
347         0x1E4,
348         0x1DD,
349         0x1D6,
350         0x1D0,
351         0x1C9,
352         0x1C2,
353         0x1BC,
354         0x1B6,
355         0x1AF,
356         0x1A9,
357         0x1A3,
358         0x19D,
359         0x197,
360         0x191,
361         0x18C,
362         0x186,
363         0x180,
364         0x17B,
365         0x175,
366         0x170,
367         0x16B,
368         0x165,
369         0x160,
370         0x15B,
371         0x156,
372         0x151,
373         0x14C,
374         0x148,
375         0x143,
376         0x13E,
377         0x13A,
378         0x135,
379         0x131,
380         0x12C,
381         0x128,
382         0x124,
383         0x120,
384         0x11C,
385         0x118,
386         0x114,
387         0x110,
388         0x10C,
389         0x108,
390         0x104,
391         0x100,
392         0xFD,
393         0xF9,
394         0xF5,
395         0xF2,
396         0xEE,
397 };
398