Skip to content

Commit

Permalink
Fixed split select on preset and volume screen intervening with the a…
Browse files Browse the repository at this point in the history
…ctual settings.

Made CC faders and Volume fader more reliable on very soft touches.
  • Loading branch information
gbevin committed Feb 12, 2015
1 parent 1e9f20d commit 8bd5be4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
8 changes: 6 additions & 2 deletions ls_handleTouches.ino
Original file line number Diff line number Diff line change
Expand Up @@ -542,10 +542,14 @@ void handleXYZupdate() {

// the volume fader has its own operation mode
if (displayMode == displayVolume) {
handleVolumeNewTouch();
if (sensorCell().isMeaningfulTouch()) {
handleVolumeNewTouch(newVelocity);
}
}
else if (Split[sensorSplit].ccFaders) {
handleFaderTouch(newVelocity);
if (sensorCell().isMeaningfulTouch()) {
handleFaderTouch(newVelocity);
}
}
else if (handleNotes && sensorCell().hasNote()) {
// after the initial velocity, new velocity values are continuously being calculated simply based
Expand Down
24 changes: 18 additions & 6 deletions ls_settings.ino
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,11 @@ boolean handleShowSplit() {
}

void handlePresetNewTouch() {
// don't change presets on the row that has the split selection
if (sensorRow == 7) {
return;
}

if (sensorCol >= NUMCOLS-2) {
if (sensorRow >= 2 && sensorRow < 2 + NUMPRESETS) {
activateSettingsPreset(sensorRow-2);
Expand Down Expand Up @@ -812,13 +817,20 @@ void handleSensorRangeZRelease() {
handleNumericDataReleaseCol(false);
}

void handleVolumeNewTouch() {
byte v = calculateFaderValue(sensorCell().calibratedX(), 1, 24);
ccFaderValues[Global.currentPerSplit][6] = v;
void handleVolumeNewTouch(boolean newVelocity) {
// don't change volume on the row that has the split selection
if (sensorRow == 7) {
return;
}

short value = calculateFaderValue(sensorCell().calibratedX(), 1, 24);
if (value >= 0) {
ccFaderValues[Global.currentPerSplit][6] = value;

byte chan = Split[Global.currentPerSplit].midiChanMain;
midiSendVolume(v, chan); // Send the MIDI volume controller message
updateDisplay();
byte chan = Split[Global.currentPerSplit].midiChanMain;
midiSendVolume(value, chan); // Send the MIDI volume controller message
updateDisplay();
}
}

void handleVolumeRelease() {
Expand Down

0 comments on commit 8bd5be4

Please sign in to comment.