]> git.sesse.net Git - nageru/commitdiff
Turn off guessing if the source bus contains the pitch bend controller.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 12 Jan 2019 19:26:22 +0000 (20:26 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 12 Jan 2019 19:26:22 +0000 (20:26 +0100)
nageru/midi_mapping_dialog.cpp

index 7eec6d285d123c43f82b3233a471ee845f872590..0c7683c017ac953e7e60fd0b73c9eaaf32a97f52 100644 (file)
@@ -543,6 +543,10 @@ pair<int, int> MIDIMappingDialog::guess_offset(unsigned bus_idx, MIDIMappingDial
                        // The bus has a controller set that the source bus doesn't set.
                        return not_found;
                }
+               if (source_spinner->value() == MIDIReceiver::PITCH_BEND_CONTROLLER) {
+                       // It's impossible to interpolate across the pitch bend.
+                       return not_found;
+               }
 
                int candidate_offset = spinner->value() - source_spinner->value();
                if (!found_offset) {