|
4 | 4 |
|
5 | 5 | #pragma once
|
6 | 6 |
|
7 |
| -#define C0 16 |
8 |
| -#define CS0 17 |
9 |
| -#define D0 18 |
10 |
| -#define DS0 19 |
11 |
| -#define E0 21 |
12 |
| -#define F0 22 |
13 |
| -#define FS0 23 |
14 |
| -#define G0 25 |
15 |
| -#define GS0 26 |
16 |
| -#define A0 28 |
17 |
| -#define AS0 29 |
18 |
| -#define B0 31 |
19 |
| -#define C1 33 |
20 |
| -#define CS1 35 |
21 |
| -#define D1 37 |
22 |
| -#define DS1 39 |
23 |
| -#define E1 41 |
24 |
| -#define F1 44 |
25 |
| -#define FS1 46 |
26 |
| -#define G1 49 |
27 |
| -#define GS1 52 |
28 |
| -#define A1 55 |
29 |
| -#define AS1 58 |
30 |
| -#define B1 62 |
31 |
| -#define C2 65 |
32 |
| -#define CS2 69 |
33 |
| -#define D2 73 |
34 |
| -#define DS2 78 |
35 |
| -#define E2 82 |
36 |
| -#define F2 87 |
37 |
| -#define FS2 93 |
38 |
| -#define G2 98 |
39 |
| -#define GS2 104 |
40 |
| -#define A2 110 |
41 |
| -#define AS2 117 |
42 |
| -#define B2 123 |
43 |
| -#define C3 131 |
44 |
| -#define CS3 139 |
45 |
| -#define D3 147 |
46 |
| -#define DS3 156 |
47 |
| -#define E3 165 |
48 |
| -#define F3 175 |
49 |
| -#define FS3 185 |
50 |
| -#define G3 196 |
51 |
| -#define GS3 208 |
52 |
| -#define A3 220 |
53 |
| -#define AS3 233 |
54 |
| -#define B3 247 |
55 |
| -#define C4 262 |
56 |
| -#define CS4 277 |
57 |
| -#define D4 294 |
58 |
| -#define DS4 311 |
59 |
| -#define E4 330 |
60 |
| -#define F4 349 |
61 |
| -#define FS4 370 |
62 |
| -#define G4 392 |
63 |
| -#define GS4 415 |
64 |
| -#define A4 440 |
65 |
| -#define AS4 466 |
66 |
| -#define B4 494 |
67 |
| -#define C5 523 |
68 |
| -#define CS5 554 |
69 |
| -#define D5 587 |
70 |
| -#define DS5 622 |
71 |
| -#define E5 659 |
72 |
| -#define F5 698 |
73 |
| -#define FS5 740 |
74 |
| -#define G5 784 |
75 |
| -#define GS5 831 |
76 |
| -#define A5 880 |
77 |
| -#define AS5 932 |
78 |
| -#define B5 988 |
79 |
| -#define C6 1047 |
80 |
| -#define CS6 1109 |
81 |
| -#define D6 1175 |
82 |
| -#define DS6 1245 |
83 |
| -#define E6 1319 |
84 |
| -#define F6 1397 |
85 |
| -#define FS6 1480 |
86 |
| -#define G6 1568 |
87 |
| -#define GS6 1661 |
88 |
| -#define A6 1760 |
89 |
| -#define AS6 1865 |
90 |
| -#define B6 1976 |
91 |
| -#define C7 2093 |
92 |
| -#define CS7 2217 |
93 |
| -#define D7 2349 |
94 |
| -#define DS7 2489 |
95 |
| -#define E7 2637 |
96 |
| -#define F7 2794 |
97 |
| -#define FS7 2960 |
98 |
| -#define G7 3136 |
99 |
| -#define GS7 3322 |
100 |
| -#define A7 3520 |
101 |
| -#define AS7 3729 |
102 |
| -#define B7 3951 |
103 |
| -#define C8 4186 |
104 |
| -#define CS8 4435 |
105 |
| -#define D8 4699 |
106 |
| -#define DS8 4978 |
107 |
| -#define E8 5274 |
108 |
| -#define F8 5588 |
109 |
| -#define FS8 5920 |
110 |
| -#define G8 6272 |
111 |
| -#define GS8 6645 |
112 |
| -#define A8 7040 |
113 |
| -#define AS8 7459 |
114 |
| -#define B8 7902 |
| 7 | +#define N_C0 16 |
| 8 | +#define N_CS0 17 |
| 9 | +#define N_D0 18 |
| 10 | +#define N_DS0 19 |
| 11 | +#define N_E0 21 |
| 12 | +#define N_F0 22 |
| 13 | +#define N_FS0 23 |
| 14 | +#define N_G0 25 |
| 15 | +#define N_GS0 26 |
| 16 | +#define N_A0 28 |
| 17 | +#define N_AS0 29 |
| 18 | +#define N_B0 31 |
| 19 | +#define N_C1 33 |
| 20 | +#define N_CS1 35 |
| 21 | +#define N_D1 37 |
| 22 | +#define N_DS1 39 |
| 23 | +#define N_E1 41 |
| 24 | +#define N_F1 44 |
| 25 | +#define N_FS1 46 |
| 26 | +#define N_G1 49 |
| 27 | +#define N_GS1 52 |
| 28 | +#define N_A1 55 |
| 29 | +#define N_AS1 58 |
| 30 | +#define N_B1 62 |
| 31 | +#define N_C2 65 |
| 32 | +#define N_CS2 69 |
| 33 | +#define N_D2 73 |
| 34 | +#define N_DS2 78 |
| 35 | +#define N_E2 82 |
| 36 | +#define N_F2 87 |
| 37 | +#define N_FS2 93 |
| 38 | +#define N_G2 98 |
| 39 | +#define N_GS2 104 |
| 40 | +#define N_A2 110 |
| 41 | +#define N_AS2 117 |
| 42 | +#define N_B2 123 |
| 43 | +#define N_C3 131 |
| 44 | +#define N_CS3 139 |
| 45 | +#define N_D3 147 |
| 46 | +#define N_DS3 156 |
| 47 | +#define N_E3 165 |
| 48 | +#define N_F3 175 |
| 49 | +#define N_FS3 185 |
| 50 | +#define N_G3 196 |
| 51 | +#define N_GS3 208 |
| 52 | +#define N_A3 220 |
| 53 | +#define N_AS3 233 |
| 54 | +#define N_B3 247 |
| 55 | +#define N_C4 262 |
| 56 | +#define N_CS4 277 |
| 57 | +#define N_D4 294 |
| 58 | +#define N_DS4 311 |
| 59 | +#define N_E4 330 |
| 60 | +#define N_F4 349 |
| 61 | +#define N_FS4 370 |
| 62 | +#define N_G4 392 |
| 63 | +#define N_GS4 415 |
| 64 | +#define N_A4 440 |
| 65 | +#define N_AS4 466 |
| 66 | +#define N_B4 494 |
| 67 | +#define N_C5 523 |
| 68 | +#define N_CS5 554 |
| 69 | +#define N_D5 587 |
| 70 | +#define N_DS5 622 |
| 71 | +#define N_E5 659 |
| 72 | +#define N_F5 698 |
| 73 | +#define N_FS5 740 |
| 74 | +#define N_G5 784 |
| 75 | +#define N_GS5 831 |
| 76 | +#define N_A5 880 |
| 77 | +#define N_AS5 932 |
| 78 | +#define N_B5 988 |
| 79 | +#define N_C6 1047 |
| 80 | +#define N_CS6 1109 |
| 81 | +#define N_D6 1175 |
| 82 | +#define N_DS6 1245 |
| 83 | +#define N_E6 1319 |
| 84 | +#define N_F6 1397 |
| 85 | +#define N_FS6 1480 |
| 86 | +#define N_G6 1568 |
| 87 | +#define N_GS6 1661 |
| 88 | +#define N_A6 1760 |
| 89 | +#define N_AS6 1865 |
| 90 | +#define N_B6 1976 |
| 91 | +#define N_C7 2093 |
| 92 | +#define N_CS7 2217 |
| 93 | +#define N_D7 2349 |
| 94 | +#define N_DS7 2489 |
| 95 | +#define N_E7 2637 |
| 96 | +#define N_F7 2794 |
| 97 | +#define N_FS7 2960 |
| 98 | +#define N_G7 3136 |
| 99 | +#define N_GS7 3322 |
| 100 | +#define N_A7 3520 |
| 101 | +#define N_AS7 3729 |
| 102 | +#define N_B7 3951 |
| 103 | +#define N_C8 4186 |
| 104 | +#define N_CS8 4435 |
| 105 | +#define N_D8 4699 |
| 106 | +#define N_DS8 4978 |
| 107 | +#define N_E8 5274 |
| 108 | +#define N_F8 5588 |
| 109 | +#define N_FS8 5920 |
| 110 | +#define N_G8 6272 |
| 111 | +#define N_GS8 6645 |
| 112 | +#define N_A8 7040 |
| 113 | +#define N_AS8 7459 |
| 114 | +#define N_B8 7902 |
115 | 115 |
|
116 | 116 | namespace audio_tools {
|
117 | 117 |
|
@@ -157,15 +157,15 @@ class MusicalNotes {
|
157 | 157 | protected:
|
158 | 158 |
|
159 | 159 | uint16_t notes[9][12] = {
|
160 |
| - {C0, CS0, D0, DS0, E0, F0, FS0, G0, GS0, A0, AS0, B0}, |
161 |
| - {C1, CS1, D1, DS1, E1, F1, FS1, G1, GS1, A1, AS1, B1}, |
162 |
| - {C2, CS2, D2, DS2, E2, F2, FS2, G2, GS2, A2, AS2, B2}, |
163 |
| - {C3, CS3, D3, DS3, E3, F3, FS3, G3, GS3, A3, AS3, B3}, |
164 |
| - {C4, CS4, D4, DS4, E4, F4, FS4, G4, GS4, A4, AS4, B4}, |
165 |
| - {C5, CS5, D5, DS5, E5, F5, FS5, G5, GS5, A5, AS5, B5}, |
166 |
| - {C6, CS6, D6, DS6, E6, F6, FS6, G6, GS6, A6, AS6, B6}, |
167 |
| - {C7, CS7, D7, DS7, E7, F7, FS7, G7, GS7, A7, AS7, B7}, |
168 |
| - {C8, CS8, D8, DS8, E8, F8, FS8, G8, GS8, A8, AS8, B8} |
| 160 | + {N_C0, N_CS0, N_D0, N_DS0, N_E0, N_F0, N_FS0, N_G0, N_GS0, N_A0, N_AS0, N_B0}, |
| 161 | + {N_C1, N_CS1, N_D1, N_DS1, N_E1, N_F1, N_FS1, N_G1, N_GS1, N_A1, N_AS1, N_B1}, |
| 162 | + {N_C2, N_CS2, N_D2, N_DS2, N_E2, N_F2, N_FS2, N_G2, N_GS2, N_A2, N_AS2, N_B2}, |
| 163 | + {N_C3, N_CS3, N_D3, N_DS3, N_E3, N_F3, N_FS3, N_G3, N_GS3, N_A3, N_AS3, N_B3}, |
| 164 | + {N_C4, N_CS4, N_D4, N_DS4, N_E4, N_F4, N_FS4, N_G4, N_GS4, N_A4, N_AS4, N_B4}, |
| 165 | + {N_C5, N_CS5, N_D5, N_DS5, N_E5, N_F5, N_FS5, N_G5, N_GS5, N_A5, N_AS5, N_B5}, |
| 166 | + {N_C6, N_CS6, N_D6, N_DS6, N_E6, N_F6, N_FS6, N_G6, N_GS6, N_A6, N_AS6, N_B6}, |
| 167 | + {N_C7, N_CS7, N_D7, N_DS7, N_E7, N_F7, N_FS7, N_G7, N_GS7, N_A7, N_AS7, N_B7}, |
| 168 | + {N_C8, N_CS8, N_D8, N_DS8, N_E8, N_F8, N_FS8, N_G8, N_GS8, N_A8, N_AS8, N_B8} |
169 | 169 | };
|
170 | 170 |
|
171 | 171 |
|
|
0 commit comments