summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_controller.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-12-04 00:29:28 -0500
committerDavid Robillard <d@drobilla.net>2014-12-04 00:30:47 -0500
commit24727e65befc310f24196d11a56ec7b269977c16 (patch)
treee399a174cff1c328b4e7ebd71778cfcb81fc3383 /gtk2_ardour/automation_controller.cc
parent9b770c7aff5ad38d5363b232b85018a622596877 (diff)
Make gain controls step by roughly 1.0/0.1 dB.
Shoot for roughly 30 steps for all controls. Always keep sensible step information in ParameterDescriptor and just convert for the UI. This is a little weird, but it's less weird than it was before, and works.
Diffstat (limited to 'gtk2_ardour/automation_controller.cc')
-rw-r--r--gtk2_ardour/automation_controller.cc15
1 files changed, 2 insertions, 13 deletions
diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc
index f4a0d7d2f1..6acf37f953 100644
--- a/gtk2_ardour/automation_controller.cc
+++ b/gtk2_ardour/automation_controller.cc
@@ -126,19 +126,8 @@ AutomationController::create(boost::shared_ptr<Automatable> printer,
const double lo = ac->internal_to_interface(desc.lower);
const double up = ac->internal_to_interface(desc.upper);
const double normal = ac->internal_to_interface(desc.normal);
- double smallstep = desc.smallstep;
- double largestep = desc.largestep;
- if (smallstep == 0.0) {
- smallstep = up / 1000.;
- } else {
- smallstep = ac->internal_to_interface(desc.lower + smallstep);
- }
-
- if (largestep == 0.0) {
- largestep = up / 40.;
- } else {
- largestep = ac->internal_to_interface(desc.lower + largestep);
- }
+ const double smallstep = ac->internal_to_interface(desc.lower + desc.smallstep);
+ const double largestep = ac->internal_to_interface(desc.lower + desc.largestep);
Gtk::Adjustment* adjustment = manage (
new Gtk::Adjustment (normal, lo, up, smallstep, largestep));