-
Notifications
You must be signed in to change notification settings - Fork 0
/
definitions.h
204 lines (178 loc) · 2.61 KB
/
definitions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
#define u8 uint8_t
#define u16 uint16_t
#define u32 uint32_t
#define MAXU32 4294967296
#define ADC_SLIGHTLY_ABOVE_5V 25400
struct xorshift32_state {
u32 a;
};
#define EMPTY_LINE " "
#define EMPTY_CHAR ' '
/// On the Arduino
#define GATE_PIN 6
//#define CVOUT_PIN // Now on the DAC
#define CLOCKIN_PIN 3
#define SWITCH_PIN 9
// On the ADC
#define SCALE_PIN 1
#define FIRSTNEIGHBOR_PIN 1
#define SHADOW_PIN 2
#define REPEATNOTE_PIN 2
#define ROTATION_PIN 0
#define SCALEWIDTH_PIN 0
#define EUCL_PIN 3
#define DISPERSION_PIN 3
// Pots on analog pins
#define ROOT_PIN A0
#define JUMPTOROOT_PIN A0
#define GATEPROB_PIN A1
#define SECONDNEIGHBOR_PIN A1
const uint16_t semitone_cvs_dac[57] = {
6, // C2
79,
151,
224,
297,
368,
441,
509,
584,
653,
727,
799,
870, // C3
944,
1014,
1087,
1157,
1232,
1302,
1374,
1446,
1516,
1588,
1658,
1733, // C4
1802,
1876,
1946,
2018,
2091,
2162,
2237,
2306,
2381,
2452,
2525,
2595, // C5
2667,
2741,
2810,
2884,
2954,
3027,
3096,
3168,
3240,
3311,
3385,
3453, // C6
3528,
3596,
3669,
3739,
3812,
3884,
3954,
4030 // G#6
};
byte Filled_lowo[8] =
{
0b00000,
0b00000,
0b01110,
0b11111,
0b11111,
0b11111,
0b01110,
0b00000
};
byte Filled_higho_underbar[8] =
{
0b00000,
0b01110,
0b11111,
0b11111,
0b11111,
0b01110,
0b00000,
0b11111
};
byte Underbar[8] =
{
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b11111
};
const byte Two_bars[8] =
{
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b11111,
0b11111
};
const byte Four_bars[8] =
{
0b00000,
0b00000,
0b00000,
0b00000,
0b11111,
0b11111,
0b11111,
0b11111
};
const byte Six_bars[8] =
{
0b00000,
0b00000,
0b11111,
0b11111,
0b11111,
0b11111,
0b11111,
0b11111
};
#define FILLED_LOWO char(0)
#define FILLED_HIGHO_UNDERBAR char(1)
#define UNDERBAR char(2)
#define ZEROBARS char(32)
#define TWOBARS char(3)
#define FOURBARS char(4)
#define SIXBARS char(5)
#define EIGHTBARS char(255)
const char key_C[3] = "C ";
const char key_Csharp[3] = "C#";
const char key_D[3] = "D ";
const char key_Dsharp[3] = "D#";
const char key_E[3] = "E ";
const char key_F[3] = "F ";
const char key_Fsharp[3] = "F#";
const char key_G[3] = "G ";
const char key_Gsharp[3] = "G#";
const char key_A[3] = "A ";
const char key_Asharp[3] = "A#";
const char key_B[3] = "B ";
const char *const notes[12] = {
key_C, key_Csharp, key_D, key_Dsharp, key_E, key_F,
key_Fsharp, key_G, key_Gsharp, key_A, key_Asharp, key_B
};