The last mile.
This extension to the program is optional as I could edit the pad's sensitivity in the IDE before uploading the sketch.
But that makes it harder for get a feel for what exact setting is best.
This is how sensitivity is set now
int PadCutOff[48] = {
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8}; // Minimum Analog value to cause a drum hit, default=600
int MaxPlayTime[48] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; // Cycles before a 2nd hit is allowed, default=90
Ideally I'd like to use 4 switches to edit PadCutOff and MaxPlayTime.
Switch1Up
Switch1Down
Switch2Up
Switch2Down
Switches to modify PadCutOff, MaxPlaytime
for( currentMODSwitch = 0; currentMODSwitch < 4; currentMODSwitch++ ) {
if((digitalRead(MODswitches[currentMODSwitch]) != MODswitchState[currentMODSwitch] )&&(MODswitchState[currentMODSwitch] == HIGH)){
switch( currentMODSwitch ) {
case 0:
//Bypass
if( bypassIIState == LOW ) {
bypassIIState = HIGH;
digitalWrite( MODleds[currentMODSwitch], LOW );
ModACounter++;
}
else {
bypassIIState = LOW;
digitalWrite( MODleds[currentMODSwitch], HIGH );
--ModACounter;
}
break;
case 1:
//Prev Program
USERSETTING = USERSETTING--;
if( USERSETTING < 1 )
USERSETTING = 0; // Don't go lower than 0
flashIIPin( MODleds[currentMODSwitch], pedalActiveFlashII );
++ModBCounter;
break;
case 2:
// Next Program
USERSETTING = USERSETTING++;
if( USERSETTING > 96 )
USERSETTING = 97; // Don't go lower than 97
flashIIPin( MODleds[currentMODSwitch], pedalActiveFlashII );
--ModBCounter;
break;
case 3:
// Favourite 1
USERSETTING = 22;
flashIIPin( MODleds[currentMODSwitch], pedalActiveFlashII );
++ModCCounter;
break;
// case 4: //Panic
// // Favourite 2
// currentProgram = 27;
/
// flashPin( leds[currentSwitch], pedalActiveFlash );
// break;
}
//// delay( BOUNCEDELAY );
}
MODswitchState[currentMODSwitch] = digitalRead( MODswitches[currentMODSwitch] );
}
Pondering.......
How do I use the two values to populate the 48 values in both arrays?
When I tried I got an error say:
bad or invalid assignment int / int[48]
And I take that to mean ModACounter is a single value and PadCutOff had 48 values.