Skip to content

Commit d668d16

Browse files
committed
waitTime now user-selectable
The waitTime before MIDIdrum detects subsequent hits can now be set using the setWaitTime(int) function.
1 parent ba9a85b commit d668d16

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/MIDIdrum.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,14 @@ void MIDIdrum::setThreshold(){
137137
}
138138
};
139139

140-
void MIDIdrum::setThreshold(int thresh){
140+
void MIDIdrum::setThreshold(unsigned int thresh){
141141
if (inputType == 1){
142142
// Do nothing if someone adds a specific threshold as an argument for a
143143
// Touch input. (This is not going to go the way that you think.)
144144
}
145145
else{threshold = thresh;}
146146
};
147147

148+
void MIDIdrum::setWaitTime(unsigned int time){
149+
waitTime = time;
150+
};

src/MIDIdrum.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ class MIDIdrum: public TouchVelocity{
3838
byte number;
3939
byte outLo = 1;
4040
byte outHi = 127;
41-
int threshold;
41+
unsigned int threshold;
4242
void setNoteNumber(byte num);
4343
void outputRange(byte min, byte max);
4444
void setThreshold();
45-
void setThreshold(int thresh);
45+
void setThreshold(unsigned int thresh);
46+
void setWaitTime(unsigned int time);
4647
};
4748

4849
#endif

0 commit comments

Comments
 (0)