PokittoLib is the library needed for programming the Pokitto DIY game console (www.pokitto.com)
Dependents: YATTT sd_map_test cPong SnowDemo ... more
PokittoLib
Library for programming Pokitto hardware
How to Use
- Import this library to online compiler (see button "import" on the right hand side
- DO NOT import mbed-src anymore, a better version is now included inside PokittoLib
- Change My_settings.h according to your project
- Start coding!
POKITTO_LIBS/Synth/Synth_helpers.cpp@28:958b71c4b92a, 2018-01-05 (annotated)
- Committer:
- Pokitto
- Date:
- Fri Jan 05 02:19:51 2018 +0000
- Revision:
- 28:958b71c4b92a
- Parent:
- 6:72f87b7c7400
Sound level stored in EEPROM, sound output improved
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Pokitto | 6:72f87b7c7400 | 1 | /**************************************************************************/ |
Pokitto | 6:72f87b7c7400 | 2 | /*! |
Pokitto | 6:72f87b7c7400 | 3 | @file Synth_envfuncs.cpp |
Pokitto | 6:72f87b7c7400 | 4 | @author Jonne Valola |
Pokitto | 6:72f87b7c7400 | 5 | |
Pokitto | 6:72f87b7c7400 | 6 | @section LICENSE |
Pokitto | 6:72f87b7c7400 | 7 | |
Pokitto | 6:72f87b7c7400 | 8 | Pokitto development stage library |
Pokitto | 6:72f87b7c7400 | 9 | Software License Agreement |
Pokitto | 6:72f87b7c7400 | 10 | |
Pokitto | 6:72f87b7c7400 | 11 | Copyright (c) 2015, Jonne Valola ("Author") |
Pokitto | 6:72f87b7c7400 | 12 | All rights reserved. |
Pokitto | 6:72f87b7c7400 | 13 | |
Pokitto | 6:72f87b7c7400 | 14 | This library is intended solely for the purpose of Pokitto development. |
Pokitto | 6:72f87b7c7400 | 15 | |
Pokitto | 6:72f87b7c7400 | 16 | Redistribution and use in source and binary forms, with or without |
Pokitto | 6:72f87b7c7400 | 17 | modification requires written permission from Author. |
Pokitto | 6:72f87b7c7400 | 18 | */ |
Pokitto | 6:72f87b7c7400 | 19 | /**************************************************************************/ |
Pokitto | 6:72f87b7c7400 | 20 | |
Pokitto | 6:72f87b7c7400 | 21 | #include "Pokitto.h" |
Pokitto | 6:72f87b7c7400 | 22 | #include "Synth.h" |
Pokitto | 6:72f87b7c7400 | 23 | |
Pokitto | 6:72f87b7c7400 | 24 | #define PROGMEM |
Pokitto | 6:72f87b7c7400 | 25 | #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) |
Pokitto | 6:72f87b7c7400 | 26 | #ifndef WIN32 |
Pokitto | 6:72f87b7c7400 | 27 | #ifndef pgm_read_word |
Pokitto | 6:72f87b7c7400 | 28 | #define pgm_read_word(addr) (*(const unsigned short *)(addr)) |
Pokitto | 6:72f87b7c7400 | 29 | #endif |
Pokitto | 6:72f87b7c7400 | 30 | #else |
Pokitto | 6:72f87b7c7400 | 31 | #define pgm_read_word(addr) (*(const unsigned int *)(addr)) |
Pokitto | 6:72f87b7c7400 | 32 | #endif // WIN32 |
Pokitto | 6:72f87b7c7400 | 33 | |
Pokitto | 6:72f87b7c7400 | 34 | // http://www.arklyffe.com/main/2010/08/29/xorshift-pseudorandom-number-generator/ |
Pokitto | 6:72f87b7c7400 | 35 | static uint8_t y8 = 1; |
Pokitto | 6:72f87b7c7400 | 36 | static uint16_t y16 = 1; |
Pokitto | 6:72f87b7c7400 | 37 | |
Pokitto | 6:72f87b7c7400 | 38 | // returns values from 1 to 255 inclusive, period is 255 |
Pokitto | 6:72f87b7c7400 | 39 | uint8_t xorshift8(void) { |
Pokitto | 6:72f87b7c7400 | 40 | //y8 ^= (y8 << 7); |
Pokitto | 6:72f87b7c7400 | 41 | y8 ^= (y8 * 128); |
Pokitto | 6:72f87b7c7400 | 42 | y8 ^= (y8 >> 5); |
Pokitto | 6:72f87b7c7400 | 43 | //return y8 ^= (y8 << 3); |
Pokitto | 6:72f87b7c7400 | 44 | return y8 ^= (y8 * 8); |
Pokitto | 6:72f87b7c7400 | 45 | } |
Pokitto | 6:72f87b7c7400 | 46 | |
Pokitto | 6:72f87b7c7400 | 47 | // returns values from 1 to 65535 inclusive, period is 65535 |
Pokitto | 6:72f87b7c7400 | 48 | uint16_t xorshift16(void) { |
Pokitto | 6:72f87b7c7400 | 49 | //y16 ^= (y16 << 13); |
Pokitto | 6:72f87b7c7400 | 50 | y16 ^= (y16 * 8192); |
Pokitto | 6:72f87b7c7400 | 51 | y16 ^= (y16 >> 9); |
Pokitto | 6:72f87b7c7400 | 52 | //return y16 ^= (y16 << 7); |
Pokitto | 6:72f87b7c7400 | 53 | return y16 ^= (y16 * 128); |
Pokitto | 6:72f87b7c7400 | 54 | } |
Pokitto | 6:72f87b7c7400 | 55 | |
Pokitto | 6:72f87b7c7400 | 56 | |
Pokitto | 6:72f87b7c7400 | 57 | int8_t arptable[MAX_ARPMODE][5] = { |
Pokitto | 6:72f87b7c7400 | 58 | {0,0,0,0,0}, // Off |
Pokitto | 6:72f87b7c7400 | 59 | {0,4,7,4,0}, // Major tonic, 3rd, 5th |
Pokitto | 6:72f87b7c7400 | 60 | {0,3,7,3,0}, // Minor tonic, 3rd, 5th |
Pokitto | 6:72f87b7c7400 | 61 | {0,1,0,-1,0}, // vibrato test |
Pokitto | 6:72f87b7c7400 | 62 | {0,12,0,12,0}, // octave test |
Pokitto | 6:72f87b7c7400 | 63 | {0,11,14,17,21}, // funky test |
Pokitto | 6:72f87b7c7400 | 64 | }; |
Pokitto | 6:72f87b7c7400 | 65 | |
Pokitto | 6:72f87b7c7400 | 66 | /** VITAL TABLES **/ |
Pokitto | 6:72f87b7c7400 | 67 | |
Pokitto | 6:72f87b7c7400 | 68 | uint16_t cincs[] ={ |
Pokitto | 6:72f87b7c7400 | 69 | 36, // 0 - NOTE_B0 |
Pokitto | 6:72f87b7c7400 | 70 | 38, // 1 - NOTE_C1 |
Pokitto | 6:72f87b7c7400 | 71 | 40, // 2 - NOTE_CS1 |
Pokitto | 6:72f87b7c7400 | 72 | 43, // 3 - NOTE_D1 |
Pokitto | 6:72f87b7c7400 | 73 | 45, // 4 - NOTE_DS1 |
Pokitto | 6:72f87b7c7400 | 74 | 47, // 5 - NOTE_E1 |
Pokitto | 6:72f87b7c7400 | 75 | 51, // 6 - NOTE_F1 |
Pokitto | 6:72f87b7c7400 | 76 | 53, // 7 - NOTE_FS1 |
Pokitto | 6:72f87b7c7400 | 77 | 56, // 8 - NOTE_G1 |
Pokitto | 6:72f87b7c7400 | 78 | 60, // 9 - NOTE_GS1 |
Pokitto | 6:72f87b7c7400 | 79 | 63, // 10 - NOTE_A1 |
Pokitto | 6:72f87b7c7400 | 80 | 67, // 11 - NOTE_AS1 |
Pokitto | 6:72f87b7c7400 | 81 | 71, // 12 - NOTE_B1 |
Pokitto | 6:72f87b7c7400 | 82 | 75, // 13 - NOTE_C2 |
Pokitto | 6:72f87b7c7400 | 83 | 79, // 14 - NOTE_CS2 |
Pokitto | 6:72f87b7c7400 | 84 | 84, // 15 - NOTE_D2 |
Pokitto | 6:72f87b7c7400 | 85 | 90, // 16 - NOTE_DS2 |
Pokitto | 6:72f87b7c7400 | 86 | 94, // 17 - NOTE_E2 |
Pokitto | 6:72f87b7c7400 | 87 | 100, // 18 - NOTE_F2 |
Pokitto | 6:72f87b7c7400 | 88 | 107, // 19 - NOTE_FS2 |
Pokitto | 6:72f87b7c7400 | 89 | 113, // 20 - NOTE_G2 |
Pokitto | 6:72f87b7c7400 | 90 | 120, // 21 - NOTE_GS2 |
Pokitto | 6:72f87b7c7400 | 91 | 127, // 22 - NOTE_A2 |
Pokitto | 6:72f87b7c7400 | 92 | 135, // 23 - NOTE_AS2 |
Pokitto | 6:72f87b7c7400 | 93 | 142, // 24 - NOTE_B2 |
Pokitto | 6:72f87b7c7400 | 94 | 151, // 25 - NOTE_C3 |
Pokitto | 6:72f87b7c7400 | 95 | 160, // 26 - NOTE_CS3 |
Pokitto | 6:72f87b7c7400 | 96 | 169, // 27 - NOTE_D3 |
Pokitto | 6:72f87b7c7400 | 97 | 180, // 28 - NOTE_DS3 |
Pokitto | 6:72f87b7c7400 | 98 | 190, // 29 - NOTE_E3 |
Pokitto | 6:72f87b7c7400 | 99 | 201, // 30 - NOTE_F3 |
Pokitto | 6:72f87b7c7400 | 100 | 213, // 31 - NOTE_FS3 |
Pokitto | 6:72f87b7c7400 | 101 | 225, // 32 - NOTE_G3 |
Pokitto | 6:72f87b7c7400 | 102 | 239, //239, // 33 - NOTE_GS3 |
Pokitto | 6:72f87b7c7400 | 103 | 253, // 34 - NOTE_A3 |
Pokitto | 6:72f87b7c7400 | 104 | 267, // 35 - NOTE_AS3 |
Pokitto | 6:72f87b7c7400 | 105 | 284, // 36 - NOTE_B3 |
Pokitto | 6:72f87b7c7400 | 106 | 301, // 37 - NOTE_C4 |
Pokitto | 6:72f87b7c7400 | 107 | 318, // 38 - NOTE_CS4 |
Pokitto | 6:72f87b7c7400 | 108 | 338, // 39 - NOTE_D4 |
Pokitto | 6:72f87b7c7400 | 109 | 358, // 40 - NOTE_DS4 |
Pokitto | 6:72f87b7c7400 | 110 | 379, // 41 - NOTE_E4 |
Pokitto | 6:72f87b7c7400 | 111 | 402, // 42 - NOTE_F4 |
Pokitto | 6:72f87b7c7400 | 112 | 426, // 43 - NOTE_FS4 |
Pokitto | 6:72f87b7c7400 | 113 | 452, // 44 - NOTE_G4 |
Pokitto | 6:72f87b7c7400 | 114 | 478, // 45 - NOTE_GS4 |
Pokitto | 6:72f87b7c7400 | 115 | 504, // 46 - NOTE_A4 // 440Hz |
Pokitto | 6:72f87b7c7400 | 116 | 537, // 47 - NOTE_AS4 |
Pokitto | 6:72f87b7c7400 | 117 | 570, // 48 - NOTE_B4 |
Pokitto | 6:72f87b7c7400 | 118 | 601, // 49 - NOTE_C5 |
Pokitto | 6:72f87b7c7400 | 119 | 636, // 50 - NOTE_CS5 |
Pokitto | 6:72f87b7c7400 | 120 | 676, // 51 - NOTE_D5 |
Pokitto | 6:72f87b7c7400 | 121 | 712, // 52 - NOTE_DS5 |
Pokitto | 6:72f87b7c7400 | 122 | 762, // 53 - NOTE_E5 |
Pokitto | 6:72f87b7c7400 | 123 | 799, // 54 - NOTE_F5 |
Pokitto | 6:72f87b7c7400 | 124 | 851, // 55 - NOTE_FS5 |
Pokitto | 6:72f87b7c7400 | 125 | 898, // 56 - NOTE_G5 |
Pokitto | 6:72f87b7c7400 | 126 | 950, // 57 - NOTE_GS5 |
Pokitto | 6:72f87b7c7400 | 127 | 1008, // 58 - NOTE_A5 |
Pokitto | 6:72f87b7c7400 | 128 | 1074, // 59 - NOTE_AS5 |
Pokitto | 6:72f87b7c7400 | 129 | 1130, // 60 - NOTE_B5 |
Pokitto | 6:72f87b7c7400 | 130 | 1214, // 61 - NOTE_C6 |
Pokitto | 6:72f87b7c7400 | 131 | 1285, // 62 - NOTE_CS6 |
Pokitto | 6:72f87b7c7400 | 132 | 1337, // 63 - NOTE_D6 |
Pokitto | 6:72f87b7c7400 | 133 | 1425, // 64 - NOTE_DS6 |
Pokitto | 6:72f87b7c7400 | 134 | 1524, // 65 - NOTE_E6 |
Pokitto | 6:72f87b7c7400 | 135 | 1598, // 66 - NOTE_F6 |
Pokitto | 6:72f87b7c7400 | 136 | 1680, // 67 - NOTE_FS6 |
Pokitto | 6:72f87b7c7400 | 137 | 1820, // 68 - NOTE_G6 |
Pokitto | 6:72f87b7c7400 | 138 | 1928, // 69 - NOTE_GS6 |
Pokitto | 6:72f87b7c7400 | 139 | 2048, // 70 - NOTE_A6 |
Pokitto | 6:72f87b7c7400 | 140 | 2114, // 71 - NOTE_AS6 |
Pokitto | 6:72f87b7c7400 | 141 | 2260, // 72 - NOTE_B6 |
Pokitto | 6:72f87b7c7400 | 142 | 2427, // 73 - NOTE_C7 |
Pokitto | 6:72f87b7c7400 | 143 | 2521, // 74 - NOTE_CS7 |
Pokitto | 6:72f87b7c7400 | 144 | 2731, // 75 - NOTE_D7 |
Pokitto | 6:72f87b7c7400 | 145 | 2849, // 76 - NOTE_DS7 |
Pokitto | 6:72f87b7c7400 | 146 | 2979, // 77 - NOTE_E7 |
Pokitto | 6:72f87b7c7400 | 147 | 3277, // 78 - NOTE_F7 |
Pokitto | 6:72f87b7c7400 | 148 | 3449, // 79 - NOTE_FS7 |
Pokitto | 6:72f87b7c7400 | 149 | 3641, // 80 - NOTE_G7 |
Pokitto | 6:72f87b7c7400 | 150 | 3855, // 81 - NOTE_GS7 |
Pokitto | 6:72f87b7c7400 | 151 | 4096, // 82 - NOTE_A7 |
Pokitto | 6:72f87b7c7400 | 152 | 4369, // 83 - NOTE_AS7 |
Pokitto | 6:72f87b7c7400 | 153 | 4681, // 84 - NOTE_B7 |
Pokitto | 6:72f87b7c7400 | 154 | 4681, // 85 - NOTE_C8 |
Pokitto | 6:72f87b7c7400 | 155 | 5041, // 86 - NOTE_CS8 |
Pokitto | 6:72f87b7c7400 | 156 | 5461, // 87 - NOTE_D8 |
Pokitto | 6:72f87b7c7400 | 157 | 5958, // 88 - NOTE_DS8 |
Pokitto | 6:72f87b7c7400 | 158 | }; |
Pokitto | 6:72f87b7c7400 | 159 | |
Pokitto | 6:72f87b7c7400 | 160 | |
Pokitto | 6:72f87b7c7400 | 161 | /** NOTE TO TEXT TABLES **/ |
Pokitto | 6:72f87b7c7400 | 162 | |
Pokitto | 6:72f87b7c7400 | 163 | const char note_0[] PROGMEM = "B-0"; // 0 - NOTE_B0 |
Pokitto | 6:72f87b7c7400 | 164 | const char note_1[] PROGMEM = "C-1"; // 1 - NOTE_C1 |
Pokitto | 6:72f87b7c7400 | 165 | const char note_2[] PROGMEM = "C#1"; // 2 - NOTE_CS1 |
Pokitto | 6:72f87b7c7400 | 166 | const char note_3[] PROGMEM = "D-1"; // 3 - NOTE_D1 |
Pokitto | 6:72f87b7c7400 | 167 | const char note_4[] PROGMEM = "D#1"; // 4 - NOTE_DS1 |
Pokitto | 6:72f87b7c7400 | 168 | const char note_5[] PROGMEM = "E-1"; // 5 - NOTE_E1 |
Pokitto | 6:72f87b7c7400 | 169 | const char note_6[] PROGMEM = "F-1"; // 6 - NOTE_F1 |
Pokitto | 6:72f87b7c7400 | 170 | const char note_7[] PROGMEM = "F#1"; // 7 - NOTE_FS1 |
Pokitto | 6:72f87b7c7400 | 171 | const char note_8[] PROGMEM = "G-1"; // 8 - NOTE_G1 |
Pokitto | 6:72f87b7c7400 | 172 | const char note_9[] PROGMEM = "G#1"; // 9 - NOTE_GS1 |
Pokitto | 6:72f87b7c7400 | 173 | const char note_10[] PROGMEM = "A-1"; // 10 - NOTE_A1 |
Pokitto | 6:72f87b7c7400 | 174 | const char note_11[] PROGMEM = "A#1"; // 11 - NOTE_AS1 |
Pokitto | 6:72f87b7c7400 | 175 | const char note_12[] PROGMEM = "B-1"; // 12 - NOTE_B1 |
Pokitto | 6:72f87b7c7400 | 176 | const char note_13[] PROGMEM = "C-2"; // 2 - NOTE_C2 |
Pokitto | 6:72f87b7c7400 | 177 | const char note_14[] PROGMEM = "C#2"; // 2 - NOTE_CS2 |
Pokitto | 6:72f87b7c7400 | 178 | const char note_15[] PROGMEM = "D-2"; // 3 - NOTE_D2 |
Pokitto | 6:72f87b7c7400 | 179 | const char note_16[] PROGMEM = "D#2"; // 4 - NOTE_DS2 |
Pokitto | 6:72f87b7c7400 | 180 | const char note_17[] PROGMEM = "E-2"; // 5 - NOTE_E2 |
Pokitto | 6:72f87b7c7400 | 181 | const char note_18[] PROGMEM = "F-2"; // 6 - NOTE_F2 |
Pokitto | 6:72f87b7c7400 | 182 | const char note_19[] PROGMEM = "F#2"; // 7 - NOTE_FS2 |
Pokitto | 6:72f87b7c7400 | 183 | const char note_20[] PROGMEM = "G-2"; // 8 - NOTE_G2 |
Pokitto | 6:72f87b7c7400 | 184 | const char note_21[] PROGMEM = "G#2"; // 9 - NOTE_GS2 |
Pokitto | 6:72f87b7c7400 | 185 | const char note_22[] PROGMEM = "A-2"; // 20 - NOTE_A2 |
Pokitto | 6:72f87b7c7400 | 186 | const char note_23[] PROGMEM = "A#2"; // 22 - NOTE_AS2 |
Pokitto | 6:72f87b7c7400 | 187 | const char note_24[] PROGMEM = "B-2"; // 22 - NOTE_B2 |
Pokitto | 6:72f87b7c7400 | 188 | const char note_25[] PROGMEM = "C-3"; // 3 - NOTE_C3 |
Pokitto | 6:72f87b7c7400 | 189 | const char note_26[] PROGMEM = "C#3"; // 3 - NOTE_CS3 |
Pokitto | 6:72f87b7c7400 | 190 | const char note_27[] PROGMEM = "D-3"; // 3 - NOTE_D3 |
Pokitto | 6:72f87b7c7400 | 191 | const char note_28[] PROGMEM = "D#3"; // 4 - NOTE_DS3 |
Pokitto | 6:72f87b7c7400 | 192 | const char note_29[] PROGMEM = "E-3"; // 5 - NOTE_E3 |
Pokitto | 6:72f87b7c7400 | 193 | const char note_30[] PROGMEM = "F-3"; // 6 - NOTE_F3 |
Pokitto | 6:72f87b7c7400 | 194 | const char note_31[] PROGMEM = "F#3"; // 7 - NOTE_FS3 |
Pokitto | 6:72f87b7c7400 | 195 | const char note_32[] PROGMEM = "G-3"; // 8 - NOTE_G3 |
Pokitto | 6:72f87b7c7400 | 196 | const char note_33[] PROGMEM = "G#3"; // 9 - NOTE_GS3 |
Pokitto | 6:72f87b7c7400 | 197 | const char note_34[] PROGMEM = "A-3"; // 30 - NOTE_A3 |
Pokitto | 6:72f87b7c7400 | 198 | const char note_35[] PROGMEM = "A#3"; // 33 - NOTE_AS3 |
Pokitto | 6:72f87b7c7400 | 199 | const char note_36[] PROGMEM = "B-3"; // 33 - NOTE_B3 |
Pokitto | 6:72f87b7c7400 | 200 | const char note_37[] PROGMEM = "C-4"; // 4 - NOTE_C4 |
Pokitto | 6:72f87b7c7400 | 201 | const char note_38[] PROGMEM = "C#4"; // 4 - NOTE_CS4 |
Pokitto | 6:72f87b7c7400 | 202 | const char note_39[] PROGMEM = "D-4"; // 3 - NOTE_D4 |
Pokitto | 6:72f87b7c7400 | 203 | const char note_40[] PROGMEM = "D#4"; // 4 - NOTE_DS4 |
Pokitto | 6:72f87b7c7400 | 204 | const char note_41[] PROGMEM = "E-4"; // 5 - NOTE_E4 |
Pokitto | 6:72f87b7c7400 | 205 | const char note_42[] PROGMEM = "F-4"; // 6 - NOTE_F4 |
Pokitto | 6:72f87b7c7400 | 206 | const char note_43[] PROGMEM = "F#4"; // 7 - NOTE_FS4 |
Pokitto | 6:72f87b7c7400 | 207 | const char note_44[] PROGMEM = "G-4"; // 8 - NOTE_G4 |
Pokitto | 6:72f87b7c7400 | 208 | const char note_45[] PROGMEM = "G#4"; // 9 - NOTE_GS4 |
Pokitto | 6:72f87b7c7400 | 209 | const char note_46[] PROGMEM = "A-4"; // 40 - NOTE_A4 |
Pokitto | 6:72f87b7c7400 | 210 | const char note_47[] PROGMEM = "A#4"; // 44 - NOTE_AS4 |
Pokitto | 6:72f87b7c7400 | 211 | const char note_48[] PROGMEM = "B-4"; // 44 - NOTE_B4 |
Pokitto | 6:72f87b7c7400 | 212 | const char note_49[] PROGMEM = "C-5"; // 5 - NOTE_C5 |
Pokitto | 6:72f87b7c7400 | 213 | const char note_50[] PROGMEM = "C#5"; // 5 - NOTE_CS5 |
Pokitto | 6:72f87b7c7400 | 214 | const char note_51[] PROGMEM = "D-5"; // 3 - NOTE_D5 |
Pokitto | 6:72f87b7c7400 | 215 | const char note_52[] PROGMEM = "D#5"; // 4 - NOTE_DS5 |
Pokitto | 6:72f87b7c7400 | 216 | const char note_53[] PROGMEM = "E-5"; // 5 - NOTE_E5 |
Pokitto | 6:72f87b7c7400 | 217 | const char note_54[] PROGMEM = "F-5"; // 6 - NOTE_F5 |
Pokitto | 6:72f87b7c7400 | 218 | const char note_55[] PROGMEM = "F#5"; // 7 - NOTE_FS5 |
Pokitto | 6:72f87b7c7400 | 219 | const char note_56[] PROGMEM = "G-5"; // 8 - NOTE_G5 |
Pokitto | 6:72f87b7c7400 | 220 | const char note_57[] PROGMEM = "G#5"; // 9 - NOTE_GS5 |
Pokitto | 6:72f87b7c7400 | 221 | const char note_58[] PROGMEM = "A-5"; // 50 - NOTE_A5 |
Pokitto | 6:72f87b7c7400 | 222 | const char note_59[] PROGMEM = "A#5"; // 55 - NOTE_AS5 |
Pokitto | 6:72f87b7c7400 | 223 | const char note_60[] PROGMEM = "B-5"; // 55 - NOTE_B5 |
Pokitto | 6:72f87b7c7400 | 224 | const char note_61[] PROGMEM = "C-6"; // 6 - NOTE_C6 |
Pokitto | 6:72f87b7c7400 | 225 | const char note_62[] PROGMEM = "C#6"; // 6 - NOTE_CS6 |
Pokitto | 6:72f87b7c7400 | 226 | const char note_63[] PROGMEM = "D-6"; // 3 - NOTE_D6 |
Pokitto | 6:72f87b7c7400 | 227 | const char note_64[] PROGMEM = "D#6"; // 4 - NOTE_DS6 |
Pokitto | 6:72f87b7c7400 | 228 | const char note_65[] PROGMEM = "E-6"; // 5 - NOTE_E6 |
Pokitto | 6:72f87b7c7400 | 229 | const char note_66[] PROGMEM = "F-6"; // 6 - NOTE_F6 |
Pokitto | 6:72f87b7c7400 | 230 | const char note_67[] PROGMEM = "F#6"; // 7 - NOTE_FS6 |
Pokitto | 6:72f87b7c7400 | 231 | const char note_68[] PROGMEM = "G-6"; // 8 - NOTE_G6 |
Pokitto | 6:72f87b7c7400 | 232 | const char note_69[] PROGMEM = "G#6"; // 9 - NOTE_GS6 |
Pokitto | 6:72f87b7c7400 | 233 | const char note_70[] PROGMEM = "A-6"; // 60 - NOTE_A6 |
Pokitto | 6:72f87b7c7400 | 234 | const char note_71[] PROGMEM = "A#6"; // 66 - NOTE_AS6 |
Pokitto | 6:72f87b7c7400 | 235 | const char note_72[] PROGMEM = "B-6"; // 66 - NOTE_B6 |
Pokitto | 6:72f87b7c7400 | 236 | const char note_73[] PROGMEM = "C-7"; // 7 - NOTE_C7 |
Pokitto | 6:72f87b7c7400 | 237 | const char note_74[] PROGMEM = "C#7"; // 7 - NOTE_CS7 |
Pokitto | 6:72f87b7c7400 | 238 | const char note_75[] PROGMEM = "D-7"; // 3 - NOTE_D7 |
Pokitto | 6:72f87b7c7400 | 239 | const char note_76[] PROGMEM = "D#7"; // 4 - NOTE_DS7 |
Pokitto | 6:72f87b7c7400 | 240 | const char note_77[] PROGMEM = "E-7"; // 5 - NOTE_E7 |
Pokitto | 6:72f87b7c7400 | 241 | const char note_78[] PROGMEM = "F-7"; // 6 - NOTE_F7 |
Pokitto | 6:72f87b7c7400 | 242 | const char note_79[] PROGMEM = "F#7"; // 7 - NOTE_FS7 |
Pokitto | 6:72f87b7c7400 | 243 | const char note_80[] PROGMEM = "G-7"; // 8 - NOTE_G7 |
Pokitto | 6:72f87b7c7400 | 244 | const char note_81[] PROGMEM = "G#7"; // 9 - NOTE_GS7 |
Pokitto | 6:72f87b7c7400 | 245 | const char note_82[] PROGMEM = "A-7"; // 70 - NOTE_A7 |
Pokitto | 6:72f87b7c7400 | 246 | const char note_83[] PROGMEM = "A#7"; // 77 - NOTE_AS7 |
Pokitto | 6:72f87b7c7400 | 247 | const char note_84[] PROGMEM = "B-7"; // 77 - NOTE_B7 |
Pokitto | 6:72f87b7c7400 | 248 | const char note_85[] PROGMEM = "C-8"; // 8 - NOTE_C8 |
Pokitto | 6:72f87b7c7400 | 249 | const char note_86[] PROGMEM = "C#8"; // 8 - NOTE_CS8 |
Pokitto | 6:72f87b7c7400 | 250 | const char note_87[] PROGMEM = "D-8"; // 3 - NOTE_D8 |
Pokitto | 6:72f87b7c7400 | 251 | const char note_88[] PROGMEM = "D#8"; // 4 - NOTE_DS8 |
Pokitto | 6:72f87b7c7400 | 252 | |
Pokitto | 6:72f87b7c7400 | 253 | const char* note_table[] PROGMEM = { |
Pokitto | 6:72f87b7c7400 | 254 | note_0, |
Pokitto | 6:72f87b7c7400 | 255 | note_1, |
Pokitto | 6:72f87b7c7400 | 256 | note_2, |
Pokitto | 6:72f87b7c7400 | 257 | note_3, |
Pokitto | 6:72f87b7c7400 | 258 | note_4, |
Pokitto | 6:72f87b7c7400 | 259 | note_5, |
Pokitto | 6:72f87b7c7400 | 260 | note_6, |
Pokitto | 6:72f87b7c7400 | 261 | note_7, |
Pokitto | 6:72f87b7c7400 | 262 | note_8, |
Pokitto | 6:72f87b7c7400 | 263 | note_9, |
Pokitto | 6:72f87b7c7400 | 264 | note_10, |
Pokitto | 6:72f87b7c7400 | 265 | note_11, |
Pokitto | 6:72f87b7c7400 | 266 | note_12, |
Pokitto | 6:72f87b7c7400 | 267 | note_13, |
Pokitto | 6:72f87b7c7400 | 268 | note_14, |
Pokitto | 6:72f87b7c7400 | 269 | note_15, |
Pokitto | 6:72f87b7c7400 | 270 | note_16, |
Pokitto | 6:72f87b7c7400 | 271 | note_17, |
Pokitto | 6:72f87b7c7400 | 272 | note_18, |
Pokitto | 6:72f87b7c7400 | 273 | note_19, |
Pokitto | 6:72f87b7c7400 | 274 | note_20, |
Pokitto | 6:72f87b7c7400 | 275 | note_21, |
Pokitto | 6:72f87b7c7400 | 276 | note_22, |
Pokitto | 6:72f87b7c7400 | 277 | note_23, |
Pokitto | 6:72f87b7c7400 | 278 | note_24, |
Pokitto | 6:72f87b7c7400 | 279 | note_25, |
Pokitto | 6:72f87b7c7400 | 280 | note_26, |
Pokitto | 6:72f87b7c7400 | 281 | note_27, |
Pokitto | 6:72f87b7c7400 | 282 | note_28, |
Pokitto | 6:72f87b7c7400 | 283 | note_29, |
Pokitto | 6:72f87b7c7400 | 284 | note_30, |
Pokitto | 6:72f87b7c7400 | 285 | note_31, |
Pokitto | 6:72f87b7c7400 | 286 | note_32, |
Pokitto | 6:72f87b7c7400 | 287 | note_33, |
Pokitto | 6:72f87b7c7400 | 288 | note_34, |
Pokitto | 6:72f87b7c7400 | 289 | note_35, |
Pokitto | 6:72f87b7c7400 | 290 | note_36, |
Pokitto | 6:72f87b7c7400 | 291 | note_37, |
Pokitto | 6:72f87b7c7400 | 292 | note_38, |
Pokitto | 6:72f87b7c7400 | 293 | note_39, |
Pokitto | 6:72f87b7c7400 | 294 | note_40, |
Pokitto | 6:72f87b7c7400 | 295 | note_41, |
Pokitto | 6:72f87b7c7400 | 296 | note_42, |
Pokitto | 6:72f87b7c7400 | 297 | note_43, |
Pokitto | 6:72f87b7c7400 | 298 | note_44, |
Pokitto | 6:72f87b7c7400 | 299 | note_45, |
Pokitto | 6:72f87b7c7400 | 300 | note_46, |
Pokitto | 6:72f87b7c7400 | 301 | note_47, |
Pokitto | 6:72f87b7c7400 | 302 | note_48, |
Pokitto | 6:72f87b7c7400 | 303 | note_49, |
Pokitto | 6:72f87b7c7400 | 304 | note_50, |
Pokitto | 6:72f87b7c7400 | 305 | note_51, |
Pokitto | 6:72f87b7c7400 | 306 | note_52, |
Pokitto | 6:72f87b7c7400 | 307 | note_53, |
Pokitto | 6:72f87b7c7400 | 308 | note_54, |
Pokitto | 6:72f87b7c7400 | 309 | note_55, |
Pokitto | 6:72f87b7c7400 | 310 | note_56, |
Pokitto | 6:72f87b7c7400 | 311 | note_57, |
Pokitto | 6:72f87b7c7400 | 312 | note_58, |
Pokitto | 6:72f87b7c7400 | 313 | note_59, |
Pokitto | 6:72f87b7c7400 | 314 | note_60, |
Pokitto | 6:72f87b7c7400 | 315 | note_61, |
Pokitto | 6:72f87b7c7400 | 316 | note_62, |
Pokitto | 6:72f87b7c7400 | 317 | note_63, |
Pokitto | 6:72f87b7c7400 | 318 | note_64, |
Pokitto | 6:72f87b7c7400 | 319 | note_65, |
Pokitto | 6:72f87b7c7400 | 320 | note_66, |
Pokitto | 6:72f87b7c7400 | 321 | note_67, |
Pokitto | 6:72f87b7c7400 | 322 | note_68, |
Pokitto | 6:72f87b7c7400 | 323 | note_69, |
Pokitto | 6:72f87b7c7400 | 324 | note_70, |
Pokitto | 6:72f87b7c7400 | 325 | note_71, |
Pokitto | 6:72f87b7c7400 | 326 | note_72, |
Pokitto | 6:72f87b7c7400 | 327 | note_73, |
Pokitto | 6:72f87b7c7400 | 328 | note_74, |
Pokitto | 6:72f87b7c7400 | 329 | note_75, |
Pokitto | 6:72f87b7c7400 | 330 | note_76, |
Pokitto | 6:72f87b7c7400 | 331 | note_77, |
Pokitto | 6:72f87b7c7400 | 332 | note_78, |
Pokitto | 6:72f87b7c7400 | 333 | note_79, |
Pokitto | 6:72f87b7c7400 | 334 | note_80, |
Pokitto | 6:72f87b7c7400 | 335 | note_81, |
Pokitto | 6:72f87b7c7400 | 336 | note_82, |
Pokitto | 6:72f87b7c7400 | 337 | note_83, |
Pokitto | 6:72f87b7c7400 | 338 | note_84, |
Pokitto | 6:72f87b7c7400 | 339 | note_85, |
Pokitto | 6:72f87b7c7400 | 340 | note_86, |
Pokitto | 6:72f87b7c7400 | 341 | note_87, |
Pokitto | 6:72f87b7c7400 | 342 | note_88, |
Pokitto | 6:72f87b7c7400 | 343 | }; |
Pokitto | 6:72f87b7c7400 | 344 | |
Pokitto | 6:72f87b7c7400 | 345 | void getNoteString(char * buffer, uint8_t i) { |
Pokitto | 6:72f87b7c7400 | 346 | if (i>88) strcpy(buffer,"@@@"); |
Pokitto | 6:72f87b7c7400 | 347 | else strcpy(buffer, note_table[i]); |
Pokitto | 6:72f87b7c7400 | 348 | } |
Pokitto | 6:72f87b7c7400 | 349 |