aboutsummaryrefslogtreecommitdiff
path: root/quantum/audio/wave.h
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/audio/wave.h')
-rw-r--r--quantum/audio/wave.h265
1 files changed, 265 insertions, 0 deletions
diff --git a/quantum/audio/wave.h b/quantum/audio/wave.h
new file mode 100644
index 000000000..6ebc34851
--- /dev/null
+++ b/quantum/audio/wave.h
@@ -0,0 +1,265 @@
1#include <avr/io.h>
2#include <avr/interrupt.h>
3#include <avr/pgmspace.h>
4
5#define SINE_LENGTH 2048
6
7const uint8_t sinewave[] PROGMEM= //2048 values
8{
90x80,0x80,0x80,0x81,0x81,0x81,0x82,0x82,
100x83,0x83,0x83,0x84,0x84,0x85,0x85,0x85,
110x86,0x86,0x87,0x87,0x87,0x88,0x88,0x88,
120x89,0x89,0x8a,0x8a,0x8a,0x8b,0x8b,0x8c,
130x8c,0x8c,0x8d,0x8d,0x8e,0x8e,0x8e,0x8f,
140x8f,0x8f,0x90,0x90,0x91,0x91,0x91,0x92,
150x92,0x93,0x93,0x93,0x94,0x94,0x95,0x95,
160x95,0x96,0x96,0x96,0x97,0x97,0x98,0x98,
170x98,0x99,0x99,0x9a,0x9a,0x9a,0x9b,0x9b,
180x9b,0x9c,0x9c,0x9d,0x9d,0x9d,0x9e,0x9e,
190x9e,0x9f,0x9f,0xa0,0xa0,0xa0,0xa1,0xa1,
200xa2,0xa2,0xa2,0xa3,0xa3,0xa3,0xa4,0xa4,
210xa5,0xa5,0xa5,0xa6,0xa6,0xa6,0xa7,0xa7,
220xa7,0xa8,0xa8,0xa9,0xa9,0xa9,0xaa,0xaa,
230xaa,0xab,0xab,0xac,0xac,0xac,0xad,0xad,
240xad,0xae,0xae,0xae,0xaf,0xaf,0xb0,0xb0,
250xb0,0xb1,0xb1,0xb1,0xb2,0xb2,0xb2,0xb3,
260xb3,0xb4,0xb4,0xb4,0xb5,0xb5,0xb5,0xb6,
270xb6,0xb6,0xb7,0xb7,0xb7,0xb8,0xb8,0xb8,
280xb9,0x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f2,0xf2,0xf2,0xf2,0xf2,0xf2,0xf3,
550xf3,0xf3,0xf3,0xf3,0xf3,0xf4,0xf4,0xf4,
560xf4,0xf4,0xf4,0xf5,0xf5,0xf5,0xf5,0xf5,
570xf5,0xf5,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,
580xf6,0xf7,0xf7,0xf7,0xf7,0xf7,0xf7,0xf7,
590xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,
600xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,
610xfa,0xfa,0xfa,0xfa,0xfa,0xfa,0xfa,0xfa,
620xfa,0xfa,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,
630xfb,0xfb,0xfb,0xfb,0xfc,0xfc,0xfc,0xfc,
640xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,
650xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,
660xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfe,0xfe,
670xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,
680xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,
690xfe,0xfe,0xfe,0xfe,0xff,0xff,0xff,0xff,
700xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
710xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
720xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
730xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
740xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
750xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
760xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xfe,
770xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,
780xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,
790xfe,0xfe,0xfe,0xfd,0xfd,0xfd,0xfd,0xfd,
800xfd,0xfd,0xfd,0xfd,0x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91,0x90,0x90,0x8f,
1320x8f,0x8f,0x8e,0x8e,0x8e,0x8d,0x8d,0x8c,
1330x8c,0x8c,0x8b,0x8b,0x8a,0x8a,0x8a,0x89,
1340x89,0x88,0x88,0x88,0x87,0x87,0x87,0x86,
1350x86,0x85,0x85,0x85,0x84,0x84,0x83,0x83,
1360x83,0x82,0x82,0x81,0x81,0x81,0x80,0x80,
1370x80,0x7f,0x7f,0x7e,0x7e,0x7e,0x7d,0x7d,
1380x7c,0x7c,0x7c,0x7b,0x7b,0x7a,0x7a,0x7a,
1390x79,0x79,0x78,0x78,0x78,0x77,0x77,0x77,
1400x76,0x76,0x75,0x75,0x75,0x74,0x74,0x73,
1410x73,0x73,0x72,0x72,0x71,0x71,0x71,0x70,
1420x70,0x70,0x6f,0x6f,0x6e,0x6e,0x6e,0x6d,
1430x6d,0x6c,0x6c,0x6c,0x6b,0x6b,0x6a,0x6a,
1440x6a,0x69,0x69,0x69,0x68,0x68,0x67,0x67,
1450x67,0x66,0x66,0x65,0x65,0x65,0x64,0x64,
1460x64,0x63,0x63,0x62,0x62,0x62,0x61,0x61,
1470x61,0x60,0x60,0x5f,0x5f,0x5f,0x5e,0x5e,
1480x5d,0x5d,0x5d,0x5c,0x5c,0x5c,0x5b,0x5b,
1490x5a,0x5a,0x5a,0x59,0x59,0x59,0x58,0x58,
1500x58,0x57,0x57,0x56,0x56,0x56,0x55,0x55,
1510x55,0x54,0x54,0x53,0x53,0x53,0x52,0x52,
1520x52,0x51,0x51,0x51,0x50,0x50,0x4f,0x4f,
1530x4f,0x4e,0x4e,0x4e,0x4d,0x4d,0x4d,0x4c,
1540x4c,0x4b,0x4b,0x4b,0x4a,0x4a,0x4a,0x49,
1550x49,0x49,0x48,0x48,0x48,0x47,0x47,0x47,
1560x46,0x46,0x45,0x45,0x45,0x44,0x44,0x44,
1570x43,0x43,0x43,0x42,0x42,0x42,0x41,0x41,
1580x41,0x40,0x40,0x40,0x3f,0x3f,0x3f,0x3e,
1590x3e,0x3e,0x3d,0x3d,0x3d,0x3c,0x3c,0x3c,
1600x3b,0x3b,0x3b,0x3a,0x3a,0x3a,0x39,0x39,
1610x39,0x38,0x38,0x38,0x37,0x37,0x37,0x36,
1620x36,0x36,0x35,0x35,0x35,0x34,0x34,0x34,
1630x34,0x33,0x33,0x33,0x32,0x32,0x32,0x31,
1640x31,0x31,0x30,0x30,0x30,0x30,0x2f,0x2f,
1650x2f,0x2e,0x2e,0x2e,0x2d,0x2d,0x2d,0x2d,
1660x2c,0x2c,0x2c,0x2b,0x2b,0x2b,0x2a,0x2a,
1670x2a,0x2a,0x29,0x29,0x29,0x28,0x28,0x28,
1680x28,0x27,0x27,0x27,0x26,0x26,0x26,0x26,
1690x25,0x25,0x25,0x25,0x24,0x24,0x24,0x23,
1700x23,0x23,0x23,0x22,0x22,0x22,0x22,0x21,
1710x21,0x21,0x21,0x20,0x20,0x20,0x1f,0x1f,
1720x1f,0x1f,0x1e,0x1e,0x1e,0x1e,0x1d,0x1d,
1730x1d,0x1d,0x1c,0x1c,0x1c,0x1c,0x1b,0x1b,
1740x1b,0x1b,0x1b,0x1a,0x1a,0x1a,0x1a,0x19,
1750x19,0x19,0x19,0x18,0x18,0x18,0x18,0x17,
1760x17,0x17,0x17,0x17,0x16,0x16,0x16,0x16,
1770x15,0x15,0x15,0x15,0x15,0x14,0x14,0x14,
1780x14,0x14,0x13,0x13,0x13,0x13,0x13,0x12,
1790x12,0x12,0x12,0x12,0x11,0x11,0x11,0x11,
1800x11,0x10,0x10,0x10,0x10,0x10,0xf,0xf,
1810xf,0xf,0xf,0xf,0xe,0xe,0xe,0xe,
1820xe,0xd,0xd,0xd,0xd,0xd,0xd,0xc,
1830xc,0xc,0xc,0xc,0xc,0xb,0xb,0xb,
1840xb,0xb,0xb,0xa,0xa,0xa,0xa,0xa,
1850xa,0xa,0x9,0x9,0x9,0x9,0x9,0x9,
1860x9,0x8,0x8,0x8,0x8,0x8,0x8,0x8,
1870x7,0x7,0x7,0x7,0x7,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0xb,0xb,
2180xb,0xb,0xb,0xb,0xc,0xc,0xc,0xc,
2190xc,0xc,0xd,0xd,0xd,0xd,0xd,0xd,
2200xe,0xe,0xe,0xe,0xe,0xf,0xf,0xf,
2210xf,0xf,0xf,0x10,0x10,0x10,0x10,0x10,
2220x11,0x11,0x11,0x11,0x11,0x12,0x12,0x12,
2230x12,0x12,0x13,0x13,0x13,0x13,0x13,0x14,
2240x14,0x14,0x14,0x14,0x15,0x15,0x15,0x15,
2250x15,0x16,0x16,0x16,0x16,0x17,0x17,0x17,
2260x17,0x17,0x18,0x18,0x18,0x18,0x19,0x19,
2270x19,0x19,0x1a,0x1a,0x1a,0x1a,0x1b,0x1b,
2280x1b,0x1b,0x1b,0x1c,0x1c,0x1c,0x1c,0x1d,
2290x1d,0x1d,0x1d,0x1e,0x1e,0x1e,0x1e,0x1f,
2300x1f,0x1f,0x1f,0x20,0x20,0x20,0x21,0x21,
2310x21,0x21,0x22,0x22,0x22,0x22,0x23,0x23,
2320x23,0x23,0x24,0x24,0x24,0x25,0x25,0x25,
2330x25,0x26,0x26,0x26,0x26,0x27,0x27,0x27,
2340x28,0x28,0x28,0x28,0x29,0x29,0x29,0x2a,
2350x2a,0x2a,0x2a,0x2b,0x2b,0x2b,0x2c,0x2c,
2360x2c,0x2d,0x2d,0x2d,0x2d,0x2e,0x2e,0x2e,
2370x2f,0x2f,0x2f,0x30,0x30,0x30,0x30,0x31,
2380x31,0x31,0x32,0x32,0x32,0x33,0x33,0x33,
2390x34,0x34,0x34,0x34,0x35,0x35,0x35,0x36,
2400x36,0x36,0x37,0x37,0x37,0x38,0x38,0x38,
2410x39,0x39,0x39,0x3a,0x3a,0x3a,0x3b,0x3b,
2420x3b,0x3c,0x3c,0x3c,0x3d,0x3d,0x3d,0x3e,
2430x3e,0x3e,0x3f,0x3f,0x3f,0x40,0x40,0x40,
2440x41,0x41,0x41,0x42,0x42,0x42,0x43,0x43,
2450x43,0x44,0x44,0x44,0x45,0x45,0x45,0x46,
2460x46,0x47,0x47,0x47,0x48,0x48,0x48,0x49,
2470x49,0x49,0x4a,0x4a,0x4a,0x4b,0x4b,0x4b,
2480x4c,0x4c,0x4d,0x4d,0x4d,0x4e,0x4e,0x4e,
2490x4f,0x4f,0x4f,0x50,0x50,0x51,0x51,0x51,
2500x52,0x52,0x52,0x53,0x53,0x53,0x54,0x54,
2510x55,0x55,0x55,0x56,0x56,0x56,0x57,0x57,
2520x58,0x58,0x58,0x59,0x59,0x59,0x5a,0x5a,
2530x5a,0x5b,0x5b,0x5c,0x5c,0x5c,0x5d,0x5d,
2540x5d,0x5e,0x5e,0x5f,0x5f,0x5f,0x60,0x60,
2550x61,0x61,0x61,0x62,0x62,0x62,0x63,0x63,
2560x64,0x64,0x64,0x65,0x65,0x65,0x66,0x66,
2570x67,0x67,0x67,0x68,0x68,0x69,0x69,0x69,
2580x6a,0x6a,0x6a,0x6b,0x6b,0x6c,0x6c,0x6c,
2590x6d,0x6d,0x6e,0x6e,0x6e,0x6f,0x6f,0x70,
2600x70,0x70,0x71,0x71,0x71,0x72,0x72,0x73,
2610x73,0x73,0x74,0x74,0x75,0x75,0x75,0x76,
2620x76,0x77,0x77,0x77,0x78,0x78,0x78,0x79,
2630x79,0x7a,0x7a,0x7a,0x7b,0x7b,0x7c,0x7c,
2640x7c,0x7d,0x7d,0x7e,0x7e,0x7e,0x7f,0x7f
265}; \ No newline at end of file