From 0da29770276604a7f0a367cd8eb5ff2fff7a2233 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 3 Jul 2007 02:37:24 +0000 Subject: Pan automation/serialization fixes. "Live" Midi CC sending from Midi CC automation track controllers. git-svn-id: svn://localhost/ardour2/trunk@2097 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/automation_controller.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour/automation_controller.cc') diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc index a95d469d7f..3cb4cc5a1e 100644 --- a/gtk2_ardour/automation_controller.cc +++ b/gtk2_ardour/automation_controller.cc @@ -75,7 +75,11 @@ void AutomationController::update_label(char* label, int label_len) { if (label && label_len) - snprintf(label, label_len, "%.3f", _controllable->get_value()); + // Hack to display CC rounded to int + if (_controllable->list()->param_id().type() == MidiCCAutomation) + snprintf(label, label_len, "%d", (int)_controllable->get_value()); + else + snprintf(label, label_len, "%.3f", _controllable->get_value()); } void -- cgit v1.2.3