music mixer code

Dependencies:   mbed wave_player mbed-rtos SimpleRGB 4DGL-uLCD-SE PinDetect

Committer:
vamsatoor
Date:
Mon Dec 09 16:43:04 2019 +0000
Revision:
10:5f5e199e1b9c
commit 1;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vamsatoor 10:5f5e199e1b9c 1 /**********************************************************************
vamsatoor 10:5f5e199e1b9c 2 * Written by WAVToCode
vamsatoor 10:5f5e199e1b9c 3 * Date: Sat Dec 07 06:00:17 PM
vamsatoor 10:5f5e199e1b9c 4 * FileName: snare_8k_8bit_unsigned.C
vamsatoor 10:5f5e199e1b9c 5 * Interleaved: N/A
vamsatoor 10:5f5e199e1b9c 6 * Signed: No
vamsatoor 10:5f5e199e1b9c 7 * No. of channels: 1
vamsatoor 10:5f5e199e1b9c 8 * No. of samples: 2203
vamsatoor 10:5f5e199e1b9c 9 * Bits/Sample: 8
vamsatoor 10:5f5e199e1b9c 10 **********************************************************************/
vamsatoor 10:5f5e199e1b9c 11
vamsatoor 10:5f5e199e1b9c 12 #define NUM_ELEMENTS 2203
vamsatoor 10:5f5e199e1b9c 13
vamsatoor 10:5f5e199e1b9c 14 const unsigned char data_snare[NUM_ELEMENTS] = {
vamsatoor 10:5f5e199e1b9c 15 126, 118, 118, 119, 122, 116, 113, 110, /* 0-7 */
vamsatoor 10:5f5e199e1b9c 16 110, 108, 107, 112, 105, 105, 123, 139, /* 8-15 */
vamsatoor 10:5f5e199e1b9c 17 150, 156, 164, 172, 173, 179, 183, 182, /* 16-23 */
vamsatoor 10:5f5e199e1b9c 18 171, 163, 160, 155, 150, 145, 139, 136, /* 24-31 */
vamsatoor 10:5f5e199e1b9c 19 132, 127, 123, 115, 107, 100, 101, 93, /* 32-39 */
vamsatoor 10:5f5e199e1b9c 20 89, 85, 74, 75, 78, 70, 56, 54, /* 40-47 */
vamsatoor 10:5f5e199e1b9c 21 63, 74, 81, 84, 83, 87, 97, 110, /* 48-55 */
vamsatoor 10:5f5e199e1b9c 22 125, 143, 156, 164, 170, 176, 174, 171, /* 56-63 */
vamsatoor 10:5f5e199e1b9c 23 177, 177, 170, 166, 161, 163, 170, 176, /* 64-71 */
vamsatoor 10:5f5e199e1b9c 24 179, 178, 177, 169, 161, 160, 157, 148, /* 72-79 */
vamsatoor 10:5f5e199e1b9c 25 140, 133, 125, 126, 126, 123, 117, 111, /* 80-87 */
vamsatoor 10:5f5e199e1b9c 26 103, 96, 92, 85, 81, 79, 76, 74, /* 88-95 */
vamsatoor 10:5f5e199e1b9c 27 76, 81, 79, 76, 76, 80, 80, 85, /* 96-103 */
vamsatoor 10:5f5e199e1b9c 28 88, 90, 98, 109, 120, 126, 135, 150, /* 104-111 */
vamsatoor 10:5f5e199e1b9c 29 160, 164, 167, 168, 174, 185, 200, 198, /* 112-119 */
vamsatoor 10:5f5e199e1b9c 30 182, 181, 179, 184, 174, 163, 165, 154, /* 120-127 */
vamsatoor 10:5f5e199e1b9c 31 153, 140, 138, 139, 128, 117, 121, 120, /* 128-135 */
vamsatoor 10:5f5e199e1b9c 32 107, 108, 95, 96, 92, 94, 84, 72, /* 136-143 */
vamsatoor 10:5f5e199e1b9c 33 80, 77, 77, 73, 78, 76, 77, 86, /* 144-151 */
vamsatoor 10:5f5e199e1b9c 34 99, 114, 121, 125, 130, 141, 154, 162, /* 152-159 */
vamsatoor 10:5f5e199e1b9c 35 165, 160, 149, 153, 153, 151, 153, 154, /* 160-167 */
vamsatoor 10:5f5e199e1b9c 36 143, 147, 154, 150, 154, 151, 156, 147, /* 168-175 */
vamsatoor 10:5f5e199e1b9c 37 152, 157, 151, 146, 143, 149, 144, 131, /* 176-183 */
vamsatoor 10:5f5e199e1b9c 38 118, 116, 119, 110, 102, 102, 102, 99, /* 184-191 */
vamsatoor 10:5f5e199e1b9c 39 95, 94, 100, 96, 109, 106, 100, 110, /* 192-199 */
vamsatoor 10:5f5e199e1b9c 40 102, 109, 104, 102, 109, 108, 109, 116, /* 200-207 */
vamsatoor 10:5f5e199e1b9c 41 126, 129, 127, 133, 133, 141, 145, 148, /* 208-215 */
vamsatoor 10:5f5e199e1b9c 42 149, 143, 148, 140, 143, 139, 142, 142, /* 216-223 */
vamsatoor 10:5f5e199e1b9c 43 142, 149, 147, 154, 154, 149, 152, 153, /* 224-231 */
vamsatoor 10:5f5e199e1b9c 44 141, 130, 128, 130, 125, 130, 129, 113, /* 232-239 */
vamsatoor 10:5f5e199e1b9c 45 108, 103, 99, 103, 100, 89, 92, 92, /* 240-247 */
vamsatoor 10:5f5e199e1b9c 46 90, 96, 107, 127, 122, 114, 123, 126, /* 248-255 */
vamsatoor 10:5f5e199e1b9c 47 129, 147, 147, 139, 145, 153, 150, 153, /* 256-263 */
vamsatoor 10:5f5e199e1b9c 48 148, 151, 146, 137, 152, 144, 148, 134, /* 264-271 */
vamsatoor 10:5f5e199e1b9c 49 130, 129, 133, 125, 119, 119, 118, 127, /* 272-279 */
vamsatoor 10:5f5e199e1b9c 50 126, 128, 118, 124, 118, 122, 124, 122, /* 280-287 */
vamsatoor 10:5f5e199e1b9c 51 112, 121, 110, 105, 118, 112, 108, 108, /* 288-295 */
vamsatoor 10:5f5e199e1b9c 52 115, 113, 117, 110, 118, 120, 122, 129, /* 296-303 */
vamsatoor 10:5f5e199e1b9c 53 131, 145, 138, 135, 146, 141, 148, 146, /* 304-311 */
vamsatoor 10:5f5e199e1b9c 54 148, 139, 129, 137, 132, 138, 141, 142, /* 312-319 */
vamsatoor 10:5f5e199e1b9c 55 138, 127, 121, 118, 117, 124, 117, 117, /* 320-327 */
vamsatoor 10:5f5e199e1b9c 56 115, 115, 123, 126, 117, 121, 122, 109, /* 328-335 */
vamsatoor 10:5f5e199e1b9c 57 121, 129, 144, 136, 135, 141, 126, 116, /* 336-343 */
vamsatoor 10:5f5e199e1b9c 58 120, 118, 121, 114, 108, 113, 114, 134, /* 344-351 */
vamsatoor 10:5f5e199e1b9c 59 123, 125, 134, 147, 139, 137, 144, 145, /* 352-359 */
vamsatoor 10:5f5e199e1b9c 60 147, 144, 144, 136, 139, 140, 133, 127, /* 360-367 */
vamsatoor 10:5f5e199e1b9c 61 138, 121, 120, 120, 122, 124, 114, 111, /* 368-375 */
vamsatoor 10:5f5e199e1b9c 62 111, 115, 120, 118, 116, 129, 113, 118, /* 376-383 */
vamsatoor 10:5f5e199e1b9c 63 121, 114, 121, 131, 130, 125, 118, 123, /* 384-391 */
vamsatoor 10:5f5e199e1b9c 64 126, 113, 130, 135, 124, 120, 118, 124, /* 392-399 */
vamsatoor 10:5f5e199e1b9c 65 126, 119, 122, 128, 124, 129, 135, 139, /* 400-407 */
vamsatoor 10:5f5e199e1b9c 66 150, 146, 141, 142, 148, 144, 142, 144, /* 408-415 */
vamsatoor 10:5f5e199e1b9c 67 133, 138, 139, 135, 130, 132, 129, 121, /* 416-423 */
vamsatoor 10:5f5e199e1b9c 68 121, 117, 114, 107, 114, 123, 114, 121, /* 424-431 */
vamsatoor 10:5f5e199e1b9c 69 109, 116, 121, 110, 127, 118, 115, 121, /* 432-439 */
vamsatoor 10:5f5e199e1b9c 70 121, 125, 132, 127, 119, 129, 130, 125, /* 440-447 */
vamsatoor 10:5f5e199e1b9c 71 136, 130, 125, 123, 126, 130, 119, 135, /* 448-455 */
vamsatoor 10:5f5e199e1b9c 72 142, 135, 148, 145, 131, 135, 143, 142, /* 456-463 */
vamsatoor 10:5f5e199e1b9c 73 131, 136, 135, 129, 124, 119, 125, 128, /* 464-471 */
vamsatoor 10:5f5e199e1b9c 74 121, 112, 113, 126, 120, 115, 120, 122, /* 472-479 */
vamsatoor 10:5f5e199e1b9c 75 126, 124, 119, 120, 137, 130, 121, 129, /* 480-487 */
vamsatoor 10:5f5e199e1b9c 76 122, 124, 127, 123, 119, 117, 126, 126, /* 488-495 */
vamsatoor 10:5f5e199e1b9c 77 130, 138, 130, 134, 132, 132, 135, 129, /* 496-503 */
vamsatoor 10:5f5e199e1b9c 78 128, 127, 124, 119, 121, 118, 117, 121, /* 504-511 */
vamsatoor 10:5f5e199e1b9c 79 138, 137, 128, 137, 144, 140, 145, 146, /* 512-519 */
vamsatoor 10:5f5e199e1b9c 80 133, 132, 129, 129, 130, 126, 132, 130, /* 520-527 */
vamsatoor 10:5f5e199e1b9c 81 120, 124, 126, 116, 116, 126, 118, 120, /* 528-535 */
vamsatoor 10:5f5e199e1b9c 82 115, 113, 112, 112, 116, 114, 115, 113, /* 536-543 */
vamsatoor 10:5f5e199e1b9c 83 112, 111, 120, 121, 119, 123, 132, 132, /* 544-551 */
vamsatoor 10:5f5e199e1b9c 84 136, 134, 139, 140, 145, 143, 132, 140, /* 552-559 */
vamsatoor 10:5f5e199e1b9c 85 136, 140, 141, 139, 136, 140, 134, 136, /* 560-567 */
vamsatoor 10:5f5e199e1b9c 86 141, 132, 137, 139, 134, 134, 132, 127, /* 568-575 */
vamsatoor 10:5f5e199e1b9c 87 119, 116, 120, 111, 108, 111, 109, 111, /* 576-583 */
vamsatoor 10:5f5e199e1b9c 88 111, 111, 116, 113, 124, 125, 118, 125, /* 584-591 */
vamsatoor 10:5f5e199e1b9c 89 129, 126, 128, 131, 133, 133, 130, 136, /* 592-599 */
vamsatoor 10:5f5e199e1b9c 90 135, 134, 136, 136, 131, 138, 127, 129, /* 600-607 */
vamsatoor 10:5f5e199e1b9c 91 132, 124, 129, 124, 128, 124, 129, 127, /* 608-615 */
vamsatoor 10:5f5e199e1b9c 92 125, 132, 122, 123, 121, 129, 132, 126, /* 616-623 */
vamsatoor 10:5f5e199e1b9c 93 128, 132, 134, 135, 138, 123, 122, 121, /* 624-631 */
vamsatoor 10:5f5e199e1b9c 94 122, 123, 115, 127, 118, 121, 125, 123, /* 632-639 */
vamsatoor 10:5f5e199e1b9c 95 129, 127, 127, 127, 128, 126, 122, 125, /* 640-647 */
vamsatoor 10:5f5e199e1b9c 96 124, 121, 123, 124, 121, 129, 131, 126, /* 648-655 */
vamsatoor 10:5f5e199e1b9c 97 126, 125, 127, 133, 130, 130, 139, 135, /* 656-663 */
vamsatoor 10:5f5e199e1b9c 98 140, 140, 137, 140, 128, 135, 133, 130, /* 664-671 */
vamsatoor 10:5f5e199e1b9c 99 131, 131, 133, 128, 128, 125, 133, 122, /* 672-679 */
vamsatoor 10:5f5e199e1b9c 100 116, 121, 124, 116, 112, 117, 114, 118, /* 680-687 */
vamsatoor 10:5f5e199e1b9c 101 113, 119, 116, 113, 122, 125, 126, 133, /* 688-695 */
vamsatoor 10:5f5e199e1b9c 102 136, 132, 127, 137, 138, 135, 129, 131, /* 696-703 */
vamsatoor 10:5f5e199e1b9c 103 135, 126, 129, 128, 126, 130, 126, 124, /* 704-711 */
vamsatoor 10:5f5e199e1b9c 104 134, 125, 128, 130, 126, 125, 130, 128, /* 712-719 */
vamsatoor 10:5f5e199e1b9c 105 124, 128, 123, 126, 125, 124, 125, 122, /* 720-727 */
vamsatoor 10:5f5e199e1b9c 106 126, 130, 124, 128, 127, 128, 128, 124, /* 728-735 */
vamsatoor 10:5f5e199e1b9c 107 126, 128, 124, 123, 125, 128, 133, 131, /* 736-743 */
vamsatoor 10:5f5e199e1b9c 108 126, 130, 136, 126, 130, 133, 128, 131, /* 744-751 */
vamsatoor 10:5f5e199e1b9c 109 129, 134, 131, 128, 131, 124, 122, 126, /* 752-759 */
vamsatoor 10:5f5e199e1b9c 110 123, 120, 120, 121, 122, 123, 128, 129, /* 760-767 */
vamsatoor 10:5f5e199e1b9c 111 127, 131, 134, 132, 130, 132, 131, 128, /* 768-775 */
vamsatoor 10:5f5e199e1b9c 112 128, 127, 123, 124, 122, 120, 127, 121, /* 776-783 */
vamsatoor 10:5f5e199e1b9c 113 125, 126, 123, 128, 125, 128, 126, 125, /* 784-791 */
vamsatoor 10:5f5e199e1b9c 114 127, 126, 126, 125, 128, 126, 125, 132, /* 792-799 */
vamsatoor 10:5f5e199e1b9c 115 127, 131, 129, 131, 131, 129, 133, 131, /* 800-807 */
vamsatoor 10:5f5e199e1b9c 116 132, 130, 132, 133, 130, 127, 128, 125, /* 808-815 */
vamsatoor 10:5f5e199e1b9c 117 126, 126, 124, 126, 126, 128, 123, 123, /* 816-823 */
vamsatoor 10:5f5e199e1b9c 118 121, 123, 130, 126, 125, 122, 121, 125, /* 824-831 */
vamsatoor 10:5f5e199e1b9c 119 121, 124, 122, 122, 123, 123, 124, 126, /* 832-839 */
vamsatoor 10:5f5e199e1b9c 120 128, 131, 132, 133, 132, 133, 135, 131, /* 840-847 */
vamsatoor 10:5f5e199e1b9c 121 134, 136, 133, 131, 132, 128, 129, 132, /* 848-855 */
vamsatoor 10:5f5e199e1b9c 122 127, 127, 126, 130, 128, 126, 131, 124, /* 856-863 */
vamsatoor 10:5f5e199e1b9c 123 121, 119, 116, 121, 124, 124, 122, 125, /* 864-871 */
vamsatoor 10:5f5e199e1b9c 124 120, 121, 127, 127, 126, 123, 123, 124, /* 872-879 */
vamsatoor 10:5f5e199e1b9c 125 126, 128, 128, 129, 130, 125, 127, 128, /* 880-887 */
vamsatoor 10:5f5e199e1b9c 126 129, 132, 130, 129, 130, 129, 132, 130, /* 888-895 */
vamsatoor 10:5f5e199e1b9c 127 133, 133, 132, 133, 130, 131, 130, 130, /* 896-903 */
vamsatoor 10:5f5e199e1b9c 128 125, 128, 122, 121, 124, 121, 127, 130, /* 904-911 */
vamsatoor 10:5f5e199e1b9c 129 125, 125, 123, 126, 128, 130, 129, 125, /* 912-919 */
vamsatoor 10:5f5e199e1b9c 130 124, 123, 128, 126, 128, 123, 120, 121, /* 920-927 */
vamsatoor 10:5f5e199e1b9c 131 124, 125, 124, 126, 123, 127, 126, 124, /* 928-935 */
vamsatoor 10:5f5e199e1b9c 132 127, 127, 126, 130, 131, 130, 130, 131, /* 936-943 */
vamsatoor 10:5f5e199e1b9c 133 129, 130, 128, 130, 129, 131, 130, 134, /* 944-951 */
vamsatoor 10:5f5e199e1b9c 134 133, 130, 134, 127, 128, 126, 128, 127, /* 952-959 */
vamsatoor 10:5f5e199e1b9c 135 127, 123, 124, 125, 125, 126, 123, 122, /* 960-967 */
vamsatoor 10:5f5e199e1b9c 136 123, 124, 126, 132, 129, 128, 122, 128, /* 968-975 */
vamsatoor 10:5f5e199e1b9c 137 124, 120, 122, 119, 120, 121, 125, 122, /* 976-983 */
vamsatoor 10:5f5e199e1b9c 138 124, 130, 127, 130, 132, 132, 130, 132, /* 984-991 */
vamsatoor 10:5f5e199e1b9c 139 132, 131, 133, 131, 133, 128, 128, 131, /* 992-999 */
vamsatoor 10:5f5e199e1b9c 140 130, 128, 126, 128, 124, 123, 129, 128, /* 1000-1007 */
vamsatoor 10:5f5e199e1b9c 141 126, 127, 128, 129, 132, 130, 127, 128, /* 1008-1015 */
vamsatoor 10:5f5e199e1b9c 142 126, 123, 123, 123, 124, 122, 122, 121, /* 1016-1023 */
vamsatoor 10:5f5e199e1b9c 143 123, 129, 126, 128, 130, 126, 126, 128, /* 1024-1031 */
vamsatoor 10:5f5e199e1b9c 144 125, 128, 127, 124, 124, 122, 125, 123, /* 1032-1039 */
vamsatoor 10:5f5e199e1b9c 145 124, 128, 127, 129, 129, 127, 131, 127, /* 1040-1047 */
vamsatoor 10:5f5e199e1b9c 146 127, 131, 127, 130, 128, 128, 128, 128, /* 1048-1055 */
vamsatoor 10:5f5e199e1b9c 147 128, 130, 130, 127, 129, 129, 132, 133, /* 1056-1063 */
vamsatoor 10:5f5e199e1b9c 148 133, 132, 130, 130, 129, 126, 125, 123, /* 1064-1071 */
vamsatoor 10:5f5e199e1b9c 149 120, 118, 120, 123, 120, 118, 123, 124, /* 1072-1079 */
vamsatoor 10:5f5e199e1b9c 150 124, 124, 129, 129, 125, 128, 127, 130, /* 1080-1087 */
vamsatoor 10:5f5e199e1b9c 151 128, 128, 127, 129, 128, 126, 128, 126, /* 1088-1095 */
vamsatoor 10:5f5e199e1b9c 152 129, 130, 127, 128, 130, 132, 132, 131, /* 1096-1103 */
vamsatoor 10:5f5e199e1b9c 153 133, 131, 131, 128, 126, 126, 127, 124, /* 1104-1111 */
vamsatoor 10:5f5e199e1b9c 154 123, 124, 123, 124, 124, 125, 124, 125, /* 1112-1119 */
vamsatoor 10:5f5e199e1b9c 155 122, 124, 124, 121, 126, 123, 122, 126, /* 1120-1127 */
vamsatoor 10:5f5e199e1b9c 156 127, 126, 127, 130, 131, 132, 132, 131, /* 1128-1135 */
vamsatoor 10:5f5e199e1b9c 157 133, 136, 135, 132, 133, 133, 130, 129, /* 1136-1143 */
vamsatoor 10:5f5e199e1b9c 158 127, 127, 128, 126, 123, 125, 125, 123, /* 1144-1151 */
vamsatoor 10:5f5e199e1b9c 159 124, 127, 126, 128, 125, 126, 128, 127, /* 1152-1159 */
vamsatoor 10:5f5e199e1b9c 160 126, 123, 125, 124, 121, 122, 126, 125, /* 1160-1167 */
vamsatoor 10:5f5e199e1b9c 161 123, 124, 125, 127, 125, 125, 126, 126, /* 1168-1175 */
vamsatoor 10:5f5e199e1b9c 162 125, 127, 127, 128, 131, 129, 133, 133, /* 1176-1183 */
vamsatoor 10:5f5e199e1b9c 163 131, 135, 132, 129, 132, 133, 133, 131, /* 1184-1191 */
vamsatoor 10:5f5e199e1b9c 164 131, 130, 129, 128, 125, 127, 126, 125, /* 1192-1199 */
vamsatoor 10:5f5e199e1b9c 165 124, 122, 121, 120, 120, 124, 123, 125, /* 1200-1207 */
vamsatoor 10:5f5e199e1b9c 166 127, 127, 128, 127, 129, 127, 125, 124, /* 1208-1215 */
vamsatoor 10:5f5e199e1b9c 167 125, 125, 123, 123, 124, 125, 127, 125, /* 1216-1223 */
vamsatoor 10:5f5e199e1b9c 168 125, 128, 128, 130, 131, 134, 134, 132, /* 1224-1231 */
vamsatoor 10:5f5e199e1b9c 169 129, 131, 131, 128, 129, 129, 129, 130, /* 1232-1239 */
vamsatoor 10:5f5e199e1b9c 170 129, 127, 129, 127, 128, 128, 127, 127, /* 1240-1247 */
vamsatoor 10:5f5e199e1b9c 171 126, 126, 127, 126, 125, 126, 125, 125, /* 1248-1255 */
vamsatoor 10:5f5e199e1b9c 172 125, 124, 125, 124, 125, 124, 125, 123, /* 1256-1263 */
vamsatoor 10:5f5e199e1b9c 173 120, 125, 126, 125, 127, 127, 127, 127, /* 1264-1271 */
vamsatoor 10:5f5e199e1b9c 174 127, 129, 126, 127, 126, 125, 126, 128, /* 1272-1279 */
vamsatoor 10:5f5e199e1b9c 175 129, 129, 133, 131, 134, 134, 132, 132, /* 1280-1287 */
vamsatoor 10:5f5e199e1b9c 176 131, 126, 129, 128, 128, 127, 126, 126, /* 1288-1295 */
vamsatoor 10:5f5e199e1b9c 177 124, 127, 128, 128, 130, 127, 124, 128, /* 1296-1303 */
vamsatoor 10:5f5e199e1b9c 178 124, 123, 126, 128, 126, 125, 124, 124, /* 1304-1311 */
vamsatoor 10:5f5e199e1b9c 179 125, 126, 125, 123, 124, 124, 124, 126, /* 1312-1319 */
vamsatoor 10:5f5e199e1b9c 180 129, 127, 127, 127, 129, 130, 129, 128, /* 1320-1327 */
vamsatoor 10:5f5e199e1b9c 181 130, 131, 130, 127, 127, 128, 128, 127, /* 1328-1335 */
vamsatoor 10:5f5e199e1b9c 182 127, 129, 126, 127, 128, 129, 129, 127, /* 1336-1343 */
vamsatoor 10:5f5e199e1b9c 183 127, 129, 128, 127, 128, 127, 127, 126, /* 1344-1351 */
vamsatoor 10:5f5e199e1b9c 184 127, 126, 124, 125, 126, 125, 125, 124, /* 1352-1359 */
vamsatoor 10:5f5e199e1b9c 185 125, 126, 126, 127, 125, 126, 126, 125, /* 1360-1367 */
vamsatoor 10:5f5e199e1b9c 186 126, 124, 125, 128, 127, 125, 128, 131, /* 1368-1375 */
vamsatoor 10:5f5e199e1b9c 187 130, 131, 130, 132, 131, 131, 132, 129, /* 1376-1383 */
vamsatoor 10:5f5e199e1b9c 188 129, 129, 128, 127, 129, 128, 129, 127, /* 1384-1391 */
vamsatoor 10:5f5e199e1b9c 189 126, 127, 128, 128, 129, 128, 126, 129, /* 1392-1399 */
vamsatoor 10:5f5e199e1b9c 190 127, 129, 127, 124, 122, 121, 120, 120, /* 1400-1407 */
vamsatoor 10:5f5e199e1b9c 191 123, 119, 121, 124, 124, 126, 126, 125, /* 1408-1415 */
vamsatoor 10:5f5e199e1b9c 192 128, 128, 127, 128, 125, 129, 130, 129, /* 1416-1423 */
vamsatoor 10:5f5e199e1b9c 193 131, 131, 131, 131, 132, 131, 130, 130, /* 1424-1431 */
vamsatoor 10:5f5e199e1b9c 194 130, 130, 128, 129, 130, 129, 131, 129, /* 1432-1439 */
vamsatoor 10:5f5e199e1b9c 195 128, 125, 126, 125, 123, 124, 122, 123, /* 1440-1447 */
vamsatoor 10:5f5e199e1b9c 196 123, 124, 126, 126, 127, 126, 126, 126, /* 1448-1455 */
vamsatoor 10:5f5e199e1b9c 197 126, 124, 122, 123, 122, 124, 123, 125, /* 1456-1463 */
vamsatoor 10:5f5e199e1b9c 198 126, 127, 129, 130, 131, 132, 133, 134, /* 1464-1471 */
vamsatoor 10:5f5e199e1b9c 199 133, 132, 133, 130, 128, 129, 128, 127, /* 1472-1479 */
vamsatoor 10:5f5e199e1b9c 200 126, 126, 126, 125, 125, 126, 127, 128, /* 1480-1487 */
vamsatoor 10:5f5e199e1b9c 201 127, 126, 125, 125, 126, 126, 126, 125, /* 1488-1495 */
vamsatoor 10:5f5e199e1b9c 202 124, 125, 124, 125, 126, 124, 124, 124, /* 1496-1503 */
vamsatoor 10:5f5e199e1b9c 203 125, 128, 128, 127, 128, 127, 126, 127, /* 1504-1511 */
vamsatoor 10:5f5e199e1b9c 204 127, 126, 127, 129, 127, 126, 126, 128, /* 1512-1519 */
vamsatoor 10:5f5e199e1b9c 205 128, 128, 129, 130, 130, 131, 130, 132, /* 1520-1527 */
vamsatoor 10:5f5e199e1b9c 206 130, 130, 130, 128, 128, 125, 126, 126, /* 1528-1535 */
vamsatoor 10:5f5e199e1b9c 207 125, 124, 124, 127, 127, 129, 129, 129, /* 1536-1543 */
vamsatoor 10:5f5e199e1b9c 208 129, 129, 128, 126, 125, 124, 122, 121, /* 1544-1551 */
vamsatoor 10:5f5e199e1b9c 209 121, 121, 121, 123, 125, 125, 126, 126, /* 1552-1559 */
vamsatoor 10:5f5e199e1b9c 210 128, 127, 129, 130, 130, 130, 131, 132, /* 1560-1567 */
vamsatoor 10:5f5e199e1b9c 211 130, 130, 130, 131, 129, 129, 129, 129, /* 1568-1575 */
vamsatoor 10:5f5e199e1b9c 212 128, 128, 130, 129, 128, 128, 129, 126, /* 1576-1583 */
vamsatoor 10:5f5e199e1b9c 213 126, 126, 124, 124, 123, 123, 122, 122, /* 1584-1591 */
vamsatoor 10:5f5e199e1b9c 214 122, 121, 125, 124, 124, 125, 125, 124, /* 1592-1599 */
vamsatoor 10:5f5e199e1b9c 215 124, 127, 126, 128, 127, 128, 128, 127, /* 1600-1607 */
vamsatoor 10:5f5e199e1b9c 216 128, 127, 127, 127, 129, 130, 129, 131, /* 1608-1615 */
vamsatoor 10:5f5e199e1b9c 217 132, 131, 133, 133, 131, 130, 129, 129, /* 1616-1623 */
vamsatoor 10:5f5e199e1b9c 218 128, 126, 126, 125, 126, 126, 125, 127, /* 1624-1631 */
vamsatoor 10:5f5e199e1b9c 219 126, 127, 127, 127, 127, 127, 127, 125, /* 1632-1639 */
vamsatoor 10:5f5e199e1b9c 220 125, 124, 123, 124, 124, 124, 124, 123, /* 1640-1647 */
vamsatoor 10:5f5e199e1b9c 221 123, 123, 125, 126, 126, 126, 127, 127, /* 1648-1655 */
vamsatoor 10:5f5e199e1b9c 222 128, 129, 128, 128, 128, 128, 127, 128, /* 1656-1663 */
vamsatoor 10:5f5e199e1b9c 223 127, 129, 130, 130, 130, 129, 130, 130, /* 1664-1671 */
vamsatoor 10:5f5e199e1b9c 224 129, 130, 129, 128, 128, 127, 127, 125, /* 1672-1679 */
vamsatoor 10:5f5e199e1b9c 225 125, 124, 125, 125, 125, 126, 125, 125, /* 1680-1687 */
vamsatoor 10:5f5e199e1b9c 226 126, 125, 124, 125, 124, 125, 125, 127, /* 1688-1695 */
vamsatoor 10:5f5e199e1b9c 227 126, 127, 127, 126, 125, 125, 126, 126, /* 1696-1703 */
vamsatoor 10:5f5e199e1b9c 228 127, 128, 129, 131, 131, 133, 133, 133, /* 1704-1711 */
vamsatoor 10:5f5e199e1b9c 229 132, 131, 130, 130, 129, 127, 128, 126, /* 1712-1719 */
vamsatoor 10:5f5e199e1b9c 230 126, 126, 127, 127, 127, 128, 128, 127, /* 1720-1727 */
vamsatoor 10:5f5e199e1b9c 231 126, 126, 124, 122, 122, 122, 122, 123, /* 1728-1735 */
vamsatoor 10:5f5e199e1b9c 232 123, 124, 124, 124, 125, 126, 125, 127, /* 1736-1743 */
vamsatoor 10:5f5e199e1b9c 233 127, 129, 129, 130, 129, 130, 129, 128, /* 1744-1751 */
vamsatoor 10:5f5e199e1b9c 234 128, 128, 127, 127, 127, 128, 128, 128, /* 1752-1759 */
vamsatoor 10:5f5e199e1b9c 235 130, 130, 129, 129, 129, 129, 128, 128, /* 1760-1767 */
vamsatoor 10:5f5e199e1b9c 236 128, 127, 127, 126, 126, 125, 126, 126, /* 1768-1775 */
vamsatoor 10:5f5e199e1b9c 237 125, 125, 125, 125, 126, 127, 127, 127, /* 1776-1783 */
vamsatoor 10:5f5e199e1b9c 238 127, 128, 130, 128, 127, 126, 125, 124, /* 1784-1791 */
vamsatoor 10:5f5e199e1b9c 239 124, 124, 125, 125, 126, 128, 127, 130, /* 1792-1799 */
vamsatoor 10:5f5e199e1b9c 240 129, 129, 129, 129, 128, 125, 127, 126, /* 1800-1807 */
vamsatoor 10:5f5e199e1b9c 241 125, 126, 127, 128, 127, 128, 128, 129, /* 1808-1815 */
vamsatoor 10:5f5e199e1b9c 242 130, 131, 130, 130, 130, 128, 127, 127, /* 1816-1823 */
vamsatoor 10:5f5e199e1b9c 243 126, 126, 125, 124, 124, 124, 124, 124, /* 1824-1831 */
vamsatoor 10:5f5e199e1b9c 244 125, 125, 124, 125, 125, 125, 127, 127, /* 1832-1839 */
vamsatoor 10:5f5e199e1b9c 245 127, 126, 127, 126, 126, 127, 125, 125, /* 1840-1847 */
vamsatoor 10:5f5e199e1b9c 246 127, 127, 127, 129, 129, 130, 131, 131, /* 1848-1855 */
vamsatoor 10:5f5e199e1b9c 247 130, 131, 129, 129, 131, 129, 129, 128, /* 1856-1863 */
vamsatoor 10:5f5e199e1b9c 248 128, 127, 127, 126, 127, 125, 125, 125, /* 1864-1871 */
vamsatoor 10:5f5e199e1b9c 249 125, 126, 127, 127, 127, 127, 126, 126, /* 1872-1879 */
vamsatoor 10:5f5e199e1b9c 250 124, 124, 124, 124, 124, 124, 124, 126, /* 1880-1887 */
vamsatoor 10:5f5e199e1b9c 251 126, 127, 129, 130, 128, 130, 130, 130, /* 1888-1895 */
vamsatoor 10:5f5e199e1b9c 252 129, 128, 128, 126, 127, 128, 128, 128, /* 1896-1903 */
vamsatoor 10:5f5e199e1b9c 253 128, 128, 129, 128, 129, 129, 129, 127, /* 1904-1911 */
vamsatoor 10:5f5e199e1b9c 254 128, 127, 127, 128, 126, 125, 124, 124, /* 1912-1919 */
vamsatoor 10:5f5e199e1b9c 255 123, 123, 123, 124, 125, 126, 125, 126, /* 1920-1927 */
vamsatoor 10:5f5e199e1b9c 256 126, 127, 127, 128, 128, 128, 126, 127, /* 1928-1935 */
vamsatoor 10:5f5e199e1b9c 257 127, 126, 126, 126, 127, 129, 129, 128, /* 1936-1943 */
vamsatoor 10:5f5e199e1b9c 258 130, 130, 130, 130, 130, 130, 129, 131, /* 1944-1951 */
vamsatoor 10:5f5e199e1b9c 259 130, 131, 130, 129, 128, 127, 128, 126, /* 1952-1959 */
vamsatoor 10:5f5e199e1b9c 260 125, 125, 126, 126, 127, 128, 128, 127, /* 1960-1967 */
vamsatoor 10:5f5e199e1b9c 261 128, 127, 126, 125, 124, 122, 122, 122, /* 1968-1975 */
vamsatoor 10:5f5e199e1b9c 262 123, 124, 124, 125, 126, 126, 128, 128, /* 1976-1983 */
vamsatoor 10:5f5e199e1b9c 263 128, 128, 128, 128, 126, 126, 125, 126, /* 1984-1991 */
vamsatoor 10:5f5e199e1b9c 264 126, 128, 128, 129, 129, 129, 130, 131, /* 1992-1999 */
vamsatoor 10:5f5e199e1b9c 265 131, 130, 131, 131, 131, 131, 131, 130, /* 2000-2007 */
vamsatoor 10:5f5e199e1b9c 266 129, 128, 127, 126, 126, 125, 125, 125, /* 2008-2015 */
vamsatoor 10:5f5e199e1b9c 267 125, 125, 126, 124, 124, 124, 125, 125, /* 2016-2023 */
vamsatoor 10:5f5e199e1b9c 268 124, 123, 124, 124, 124, 124, 124, 125, /* 2024-2031 */
vamsatoor 10:5f5e199e1b9c 269 125, 127, 127, 128, 128, 128, 129, 129, /* 2032-2039 */
vamsatoor 10:5f5e199e1b9c 270 131, 131, 131, 132, 132, 132, 131, 130, /* 2040-2047 */
vamsatoor 10:5f5e199e1b9c 271 129, 129, 128, 128, 128, 129, 129, 129, /* 2048-2055 */
vamsatoor 10:5f5e199e1b9c 272 130, 129, 128, 128, 126, 125, 124, 123, /* 2056-2063 */
vamsatoor 10:5f5e199e1b9c 273 122, 121, 121, 122, 122, 122, 124, 124, /* 2064-2071 */
vamsatoor 10:5f5e199e1b9c 274 124, 125, 126, 127, 127, 127, 127, 128, /* 2072-2079 */
vamsatoor 10:5f5e199e1b9c 275 127, 127, 128, 128, 128, 129, 128, 129, /* 2080-2087 */
vamsatoor 10:5f5e199e1b9c 276 128, 128, 128, 128, 129, 130, 130, 130, /* 2088-2095 */
vamsatoor 10:5f5e199e1b9c 277 131, 132, 131, 129, 129, 128, 127, 128, /* 2096-2103 */
vamsatoor 10:5f5e199e1b9c 278 127, 125, 125, 125, 126, 126, 126, 126, /* 2104-2111 */
vamsatoor 10:5f5e199e1b9c 279 126, 125, 125, 126, 127, 125, 125, 126, /* 2112-2119 */
vamsatoor 10:5f5e199e1b9c 280 126, 124, 124, 125, 125, 125, 126, 126, /* 2120-2127 */
vamsatoor 10:5f5e199e1b9c 281 125, 126, 126, 128, 127, 128, 130, 128, /* 2128-2135 */
vamsatoor 10:5f5e199e1b9c 282 129, 128, 128, 128, 127, 127, 127, 127, /* 2136-2143 */
vamsatoor 10:5f5e199e1b9c 283 128, 128, 129, 130, 129, 130, 130, 130, /* 2144-2151 */
vamsatoor 10:5f5e199e1b9c 284 129, 129, 127, 127, 125, 126, 125, 125, /* 2152-2159 */
vamsatoor 10:5f5e199e1b9c 285 125, 125, 123, 123, 125, 125, 125, 125, /* 2160-2167 */
vamsatoor 10:5f5e199e1b9c 286 125, 125, 125, 125, 125, 126, 126, 126, /* 2168-2175 */
vamsatoor 10:5f5e199e1b9c 287 126, 126, 126, 127, 127, 127, 127, 128, /* 2176-2183 */
vamsatoor 10:5f5e199e1b9c 288 129, 130, 130, 130, 130, 130, 130, 130, /* 2184-2191 */
vamsatoor 10:5f5e199e1b9c 289 129, 129, 129, 129, 128, 128, 128, 127, /* 2192-2199 */
vamsatoor 10:5f5e199e1b9c 290 127, 128, 127}; /* 2200-2202 */
vamsatoor 10:5f5e199e1b9c 291
vamsatoor 10:5f5e199e1b9c 292
vamsatoor 10:5f5e199e1b9c 293 //get and set the frequency from wav conversion tool GUI
vamsatoor 10:5f5e199e1b9c 294 int sn=0;
vamsatoor 10:5f5e199e1b9c 295
vamsatoor 10:5f5e199e1b9c 296 //interrupt routine to play next audio sample from array in flash
vamsatoor 10:5f5e199e1b9c 297 void audio_sample_snare()
vamsatoor 10:5f5e199e1b9c 298 {
vamsatoor 10:5f5e199e1b9c 299
vamsatoor 10:5f5e199e1b9c 300 speaker = data_snare[sn]/255.0;//scale to 0.0 to 1.0 for PWM
vamsatoor 10:5f5e199e1b9c 301 sn++;
vamsatoor 10:5f5e199e1b9c 302 if (sn>= NUM_ELEMENTS) {
vamsatoor 10:5f5e199e1b9c 303 sn = 0;
vamsatoor 10:5f5e199e1b9c 304 sampletick.detach();
vamsatoor 10:5f5e199e1b9c 305 myled = 0;
vamsatoor 10:5f5e199e1b9c 306 }
vamsatoor 10:5f5e199e1b9c 307 }