-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathde_FSR_USB_Module.ino
More file actions
96 lines (75 loc) · 1.76 KB
/
Copy pathde_FSR_USB_Module.ino
File metadata and controls
96 lines (75 loc) · 1.76 KB
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
#include "MIDIcontroller.h"
// digitalelements FSR USB Module 10
byte MIDIchannel = 10;
const int pressPin [10] = {A0,A1,A2,A3,A4,A5,A6,A7,A8,A9}; // ANALOG pin
// Pin & Note number
MIDIdrum Pad0(A0, 36);
MIDIdrum Pad1(A1, 38);
MIDIdrum Pad2(A2, 38);
MIDIdrum Pad3(A3, 39);
MIDIdrum Pad4(A4, 40);
MIDIdrum Pad5(A5, 41);
MIDIdrum Pad6(A6, 42);
MIDIdrum Pad7(A7, 43);
MIDIdrum Pad8(A8, 44);
MIDIdrum Pad9(A9, 45);
void setup(){
// Threshold
Pad0.setThreshold(400);
Pad1.setThreshold(60);
Pad2.setThreshold(200);
Pad3.setThreshold(200);
Pad4.setThreshold(200);
Pad5.setThreshold(200);
Pad6.setThreshold(200);
Pad7.setThreshold(200);
Pad8.setThreshold(200);
Pad9.setThreshold(200);
// Input Range
Pad0.inputRange(520, 960);
Pad1.inputRange(80, 900);
Pad2.inputRange(80, 900);
Pad3.inputRange(80, 900);
Pad4.inputRange(80, 900);
Pad5.inputRange(80, 900);
Pad6.inputRange(80, 900);
Pad7.inputRange(80, 900);
Pad8.inputRange(80, 900);
Pad9.inputRange(80, 900);
// Velocity Output
Pad0.outputRange(32,127);
Pad1.outputRange(1,127);
Pad2.outputRange(1,127);
Pad3.outputRange(1,127);
Pad4.outputRange(1,127);
Pad5.outputRange(1,127);
Pad6.outputRange(1,127);
Pad7.outputRange(1,127);
Pad8.outputRange(1,127);
Pad9.outputRange(1,127);
//WaitTime
Pad0.setWaitTime(60);
Pad1.setWaitTime(10);
Pad2.setWaitTime(10);
Pad3.setWaitTime(10);
Pad4.setWaitTime(10);
Pad5.setWaitTime(10);
Pad6.setWaitTime(10);
Pad7.setWaitTime(10);
Pad8.setWaitTime(10);
Pad9.setWaitTime(10);
}
void loop(){
Pad0.send();
Pad1.send();
Pad2.send();
Pad3.send();
Pad4.send();
Pad5.send();
Pad6.send();
Pad7.send();
Pad8.send();
Pad9.send();
// Crash Protection
while(usbMIDI.read()){}
}