summaryrefslogtreecommitdiff
path: root/libs/surfaces/generic_midi
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-06-19 00:57:53 +0200
committerRobin Gareus <robin@gareus.org>2017-06-21 18:12:04 +0200
commit567c0a8f5321f70f13e8e0c4c78725ce4521608b (patch)
tree343c5178af230a8ca1ec7644500ffc17344cd3c5 /libs/surfaces/generic_midi
parente91b80eb85452586f226f4b7eb84d8be36ea1a3c (diff)
Switch to PBD control-math and prefer Controllable API
Note: Control-surfaces should always use interface_to_internal() and internal_to_interface().
Diffstat (limited to 'libs/surfaces/generic_midi')
-rw-r--r--libs/surfaces/generic_midi/midicontrollable.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/libs/surfaces/generic_midi/midicontrollable.cc b/libs/surfaces/generic_midi/midicontrollable.cc
index 0a7caac3bc..92c86d665c 100644
--- a/libs/surfaces/generic_midi/midicontrollable.cc
+++ b/libs/surfaces/generic_midi/midicontrollable.cc
@@ -23,10 +23,10 @@
#include <iostream>
#include "pbd/error.h"
-#include "pbd/xml++.h"
+#include "pbd/compose.h"
#include "pbd/stacktrace.h"
#include "pbd/types_convert.h"
-#include "pbd/compose.h"
+#include "pbd/xml++.h"
#include "midi++/types.h" // Added by JE - 06-01-2009. All instances of 'byte' changed to 'MIDI::byte' (for clarification)
#include "midi++/port.h"
@@ -36,7 +36,6 @@
#include "ardour/automation_control.h"
#include "ardour/controllable_descriptor.h"
#include "ardour/midi_ui.h"
-#include "ardour/utils.h"
#include "ardour/debug.h"
#include "midicontrollable.h"
@@ -175,7 +174,7 @@ int
MIDIControllable::control_to_midi (float val)
{
if (controllable->is_gain_like()) {
- return gain_to_slider_position (val) * max_value_for_type ();
+ return controllable->internal_to_interface (val) * max_value_for_type ();
}
float control_min = controllable->lower ();