Added static glide/portamento control as pinky key setting. Use LEVEL control to set glide time.
This commit is contained in:
parent
053b954936
commit
58d7584f87
4 changed files with 35 additions and 7 deletions
|
@ -598,6 +598,20 @@ void loop() {
|
||||||
writeSetting(LEVEL_VAL_ADDR,levelVal);
|
writeSetting(LEVEL_VAL_ADDR,levelVal);
|
||||||
}
|
}
|
||||||
lastPinkyKey = pinkyKey;
|
lastPinkyKey = pinkyKey;
|
||||||
|
} else if (pinkySetting == GLD){
|
||||||
|
if (pinkyKey){
|
||||||
|
ledMeter(levelVal);
|
||||||
|
if (K5 && (levelVal < 127)){
|
||||||
|
levelVal++;
|
||||||
|
midiSendControlChange(CCN_Port, levelVal);
|
||||||
|
} else if (K1 && (levelVal > 0)){
|
||||||
|
levelVal--;
|
||||||
|
midiSendControlChange(CCN_Port, levelVal);
|
||||||
|
}
|
||||||
|
} else if (lastPinkyKey){
|
||||||
|
writeSetting(LEVEL_VAL_ADDR,levelVal);
|
||||||
|
}
|
||||||
|
lastPinkyKey = pinkyKey;
|
||||||
}
|
}
|
||||||
} else if (mainState == RISE_WAIT) {
|
} else if (mainState == RISE_WAIT) {
|
||||||
if ((pressureSensor > breathThrVal) || gateOpen) {
|
if ((pressureSensor > breathThrVal) || gateOpen) {
|
||||||
|
@ -783,7 +797,7 @@ void loop() {
|
||||||
}
|
}
|
||||||
if (currentTime - ccSendTime3 > CC_INTERVAL3) {
|
if (currentTime - ccSendTime3 > CC_INTERVAL3) {
|
||||||
if (gateOpenEnable || gateOpen) doorKnobCheck();
|
if (gateOpenEnable || gateOpen) doorKnobCheck();
|
||||||
if (((pinkySetting == LVL) || (pinkySetting == LVLP)) && pinkyKey){
|
if (((pinkySetting == LVL) || (pinkySetting == LVLP) || (pinkySetting == GLD)) && pinkyKey){
|
||||||
// show LVL indication
|
// show LVL indication
|
||||||
} else updateSensorLEDs();
|
} else updateSensorLEDs();
|
||||||
ccSendTime3 = currentTime;
|
ccSendTime3 = currentTime;
|
||||||
|
@ -1177,7 +1191,16 @@ void portamento_() {
|
||||||
} else {
|
} else {
|
||||||
biteSensor = touchRead(bitePin); // get sensor data, do some smoothing - SENSOR PIN 17 - PCB PINS LABELED "BITE" (GND left, sensor pin right)
|
biteSensor = touchRead(bitePin); // get sensor data, do some smoothing - SENSOR PIN 17 - PCB PINS LABELED "BITE" (GND left, sensor pin right)
|
||||||
}
|
}
|
||||||
if (0 == vibControl) {
|
if (pinkySetting == GLD){
|
||||||
|
if (pinkyKey){
|
||||||
|
if (!portIsOn) {
|
||||||
|
portOn();
|
||||||
|
}
|
||||||
|
port();
|
||||||
|
} else if (portIsOn) { // pinky key released
|
||||||
|
portOff();
|
||||||
|
}
|
||||||
|
} else if (0 == vibControl) {
|
||||||
// Portamento is controlled with the bite sensor (variable capacitor) in the mouthpiece
|
// Portamento is controlled with the bite sensor (variable capacitor) in the mouthpiece
|
||||||
if (portamento && (biteSensor >= portamThrVal)) { // if we are enabled and over the threshold, send portamento
|
if (portamento && (biteSensor >= portamThrVal)) { // if we are enabled and over the threshold, send portamento
|
||||||
if (!portIsOn) {
|
if (!portIsOn) {
|
||||||
|
@ -1218,7 +1241,9 @@ void portOn() {
|
||||||
|
|
||||||
void port() {
|
void port() {
|
||||||
int portCC;
|
int portCC;
|
||||||
if (1 != vibControl)
|
if (pinkySetting == GLD){
|
||||||
|
portCC = levelVal;
|
||||||
|
} else if (1 != vibControl)
|
||||||
portCC = map(constrain(biteSensor, portamThrVal, portamMaxVal), portamThrVal, portamMaxVal, 0, 127);
|
portCC = map(constrain(biteSensor, portamThrVal, portamMaxVal), portamThrVal, portamMaxVal, 0, 127);
|
||||||
else
|
else
|
||||||
portCC = constrain((leverPortZero-leverPortThr-leverPortRead),0,127);
|
portCC = constrain((leverPortZero-leverPortThr-leverPortRead),0,127);
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#define ECSW 26
|
#define ECSW 26
|
||||||
#define LVL 27
|
#define LVL 27
|
||||||
#define LVLP 28
|
#define LVLP 28
|
||||||
|
#define GLD 29
|
||||||
|
|
||||||
//Vibrato direction
|
//Vibrato direction
|
||||||
#define UPWD 1
|
#define UPWD 1
|
||||||
|
|
|
@ -866,7 +866,7 @@ const MenuEntrySub deglitchMenu = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const MenuEntrySub pinkyMenu = {
|
const MenuEntrySub pinkyMenu = {
|
||||||
MenuType::ESub, "PINKY KEY", "PINKY KEY", &pinkySetting, 0, 28, MenuEntryFlags::ENone,
|
MenuType::ESub, "PINKY KEY", "PINKY KEY", &pinkySetting, 0, 29, MenuEntryFlags::ENone,
|
||||||
[](SubMenuRef __unused,char* textBuffer, const char** __unused unit) {
|
[](SubMenuRef __unused,char* textBuffer, const char** __unused unit) {
|
||||||
if (pinkySetting == PBD)
|
if (pinkySetting == PBD)
|
||||||
strncpy(textBuffer, "PBD", 4);
|
strncpy(textBuffer, "PBD", 4);
|
||||||
|
@ -878,6 +878,8 @@ const MenuEntrySub pinkyMenu = {
|
||||||
strncpy(textBuffer, "LVL", 4);
|
strncpy(textBuffer, "LVL", 4);
|
||||||
else if (pinkySetting == LVLP)
|
else if (pinkySetting == LVLP)
|
||||||
strncpy(textBuffer, "LVP", 4);
|
strncpy(textBuffer, "LVP", 4);
|
||||||
|
else if (pinkySetting == GLD)
|
||||||
|
strncpy(textBuffer, "GLD", 4);
|
||||||
else
|
else
|
||||||
numToString(pinkySetting-12, textBuffer, true);
|
numToString(pinkySetting-12, textBuffer, true);
|
||||||
},
|
},
|
||||||
|
|
|
@ -133,7 +133,7 @@ void readEEPROM(const bool factoryReset) {
|
||||||
curve = readSettingBounded(BREATHCURVE_ADDR, 0, 12, BREATHCURVE_FACTORY);
|
curve = readSettingBounded(BREATHCURVE_ADDR, 0, 12, BREATHCURVE_FACTORY);
|
||||||
velSmpDl = readSettingBounded(VEL_SMP_DL_ADDR, 0, 30, VEL_SMP_DL_FACTORY);
|
velSmpDl = readSettingBounded(VEL_SMP_DL_ADDR, 0, 30, VEL_SMP_DL_FACTORY);
|
||||||
velBias = readSettingBounded(VEL_BIAS_ADDR, 0, 9, VEL_BIAS_FACTORY);
|
velBias = readSettingBounded(VEL_BIAS_ADDR, 0, 9, VEL_BIAS_FACTORY);
|
||||||
pinkySetting = readSettingBounded(PINKY_KEY_ADDR, 0, 28, PINKY_KEY_FACTORY);
|
pinkySetting = readSettingBounded(PINKY_KEY_ADDR, 0, 29, PINKY_KEY_FACTORY);
|
||||||
fastPatch[0] = readSettingBounded(FP1_ADDR, 0, 127, 0);
|
fastPatch[0] = readSettingBounded(FP1_ADDR, 0, 127, 0);
|
||||||
fastPatch[1] = readSettingBounded(FP2_ADDR, 0, 127, 0);
|
fastPatch[1] = readSettingBounded(FP2_ADDR, 0, 127, 0);
|
||||||
fastPatch[2] = readSettingBounded(FP3_ADDR, 0, 127, 0);
|
fastPatch[2] = readSettingBounded(FP3_ADDR, 0, 127, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue