collab/PineapplePad

git clone https://git.julia.blue/collab/PineapplePad

Joseph RyanFinishing touchesca230b6

master
1.9 KiB59 linesraw
1#ifndef _SOUND_H__
2#define _SOUND_H__
3#include <stdint.h>
4
5const uint8_t horn[64] = {
6    134, 136, 138, 141, 144, 157, 170, 203, 237, 243, 249,
7    209, 170, 127, 83, 75, 67, 67, 67, 71, 75, 77,
8    79, 82, 86, 92, 98, 114, 130, 138, 146, 153,
9    159, 169, 179, 190, 201, 208, 215, 205, 195, 209,
10    222, 204, 186, 162, 138, 107, 75, 60, 44, 38,
11    32, 35, 39, 45, 52, 62, 71, 81, 91, 107, 123, 129
12};
13
14const uint8_t guitar[64] = {
15    88, 88, 88, 84, 70, 53, 35, 18, 13, 22, 44,
16    75, 114, 145, 167, 180, 185, 176, 158, 128, 92, 57,
17    40, 40, 62, 101, 150, 198, 229, 238, 224, 198,
18    167, 136, 114, 101, 92, 88, 88, 88, 97, 110,
19    119, 128, 132, 128, 119, 97, 79, 57, 48, 44,
20    48, 57, 57, 57, 57, 57, 62, 70, 79, 88, 88, 88
21};
22
23const uint8_t basoon[64] = {
24    133, 146, 147, 145, 141, 139, 138, 134, 129, 123, 120,
25    123, 135, 168, 217, 233, 197, 129, 67, 39, 41, 59,
26    78, 101, 130, 159, 177, 183, 172, 150, 126, 102,
27    82, 66, 62, 74, 100, 132, 156, 165, 154, 131,
28    112, 103, 103, 106, 108, 108, 112, 120, 126, 128,
29    131, 136, 147, 153, 148, 142, 137, 138, 139, 134, 128, 125
30};
31
32const uint8_t sine[64] = {
33    128, 140, 153, 165, 177, 188, 199, 209, 218, 226, 234,
34    240, 245, 250, 253, 254, 255, 254, 253, 250, 245, 240,
35    234, 226, 218, 209, 199, 188, 177, 165, 153, 140,
36    128, 116, 103, 91, 79, 68, 57, 47, 38, 30,
37    22, 16, 11, 6, 3, 2, 1, 2, 3, 6, 11,
38    16, 22, 30, 38, 47, 57, 68, 79, 91, 103, 116
39};
40
41const uint8_t flute[64] = {
42    127, 135, 143, 146, 150, 156, 162, 166, 171, 174, 177,
43    178, 179, 178, 177, 174, 170, 166, 162, 157, 151, 146,
44    140, 136, 132, 130, 127, 124, 121, 120, 119, 118,
45    116, 116, 117, 115, 114, 113, 112, 111, 110, 108,
46    106, 103, 101, 99, 98, 96, 95, 94, 93, 94,
47    94, 95, 97, 98, 100, 102, 105, 108, 111, 115, 119, 123
48};
49
50extern const uint8_t* instruments[5];
51extern const uint8_t* instrument;
52
53void Sound_Init(void);
54
55void Sound_Play(uint32_t period);
56
57void Sound_Stop(void);
58
59#endif