From d3d4a8664feb666141d5aecfda5fc4f566f97cd0 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 9 Apr 2021 06:17:54 +0200 Subject: [PATCH] Plot export-limiter redux on analysis-report --- gtk2_ardour/export_analysis_graphs.cc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gtk2_ardour/export_analysis_graphs.cc b/gtk2_ardour/export_analysis_graphs.cc index fef3fe9b19..6b3eda7da6 100644 --- a/gtk2_ardour/export_analysis_graphs.cc +++ b/gtk2_ardour/export_analysis_graphs.cc @@ -155,6 +155,31 @@ ArdourGraphs::draw_waveform (Glib::RefPtr pctx, ExportAnalysisPt cr->stroke (); } + /* redux */ + cr->set_source_rgba (0.1, 0.4, 1.0, 0.7); + for (size_t x = 0; x < width; ++x) { + if (p->limiter_pk[x] > 1.0) { + float y = p->limiter_pk[x]; + if (log) { + y = alt_log_meter (fast_coefficient_to_dB (1.f / p->limiter_pk[x])); + } else { + y = 1.f / p->limiter_pk[x]; + } + if (rect) { + y = ht * (1.f - y); + cr->move_to (m_l + x - .5, 0); + cr->line_to (m_l + x - .5, y); + } else { + y = height_2 * y; + cr->move_to (m_l + x - .5, 0); + cr->line_to (m_l + x - .5, height_2 - y); + cr->move_to (m_l + x - .5, ht); + cr->line_to (m_l + x - .5, height_2 + y); + } + cr->stroke (); + } + } + if (!rect) { // zero line cr->set_source_rgba (.3, .3, .3, 0.7);