From 3d96a318acb6254226b9d6fb7997bf924e3d5eb1 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 6 Feb 2023 20:19:38 -0700 Subject: [PATCH] automation line: add dump() method to inspect GUI control points --- gtk2_ardour/automation_line.cc | 12 ++++++++++++ gtk2_ardour/automation_line.h | 1 + 2 files changed, 13 insertions(+) diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index 5326629934..9de10724c0 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -1398,6 +1398,18 @@ AutomationLine::add_visible_control_point (uint32_t view_index, uint32_t pi, dou } } +void +AutomationLine::dump (std::ostream& ostr) const +{ + for (auto const & cp : control_points) { + if (cp->model() != alist->end()) { + ostr << '#' << cp->view_index() << " @ " << cp->get_x() << ", " << cp->get_y() << " for " << (*cp->model())->value << " @ " << (*(cp->model()))->when << std::endl; + } else { + ostr << "dead point\n"; + } + } +} + void AutomationLine::connect_to_list () { diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h index 4f2d60f5a1..fac5ce5562 100644 --- a/gtk2_ardour/automation_line.h +++ b/gtk2_ardour/automation_line.h @@ -165,6 +165,7 @@ public: void set_width (Temporal::timecnt_t const &); Temporal::timepos_t session_position (Temporal::timepos_t const &) const; + void dump (std::ostream&) const; protected: