2 * Copyright (C) 2016 Robin Gareus <robin@gareus.org>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #include <pangomm/layout.h>
22 #include <gtkmm/label.h>
23 #include <gtkmm/table.h>
24 #include <gtkmm/stock.h>
26 #include "pbd/openuri.h"
27 #include "gtkmm2ext/utils.h"
28 #include "gtkmm2ext/utils.h"
29 #include "canvas/utils.h"
30 #include "canvas/colors.h"
32 #include "ardour/audiofilesource.h"
33 #include "ardour/session.h"
34 #include "ardour/ardour/dB.h"
36 #include "audio_clock.h"
37 #include "ui_config.h"
38 #include "export_report.h"
43 using namespace ARDOUR;
45 ExportReport::ExportReport (Session* _session, StatusPtr s)
46 : ArdourDialog (_("Export Report/Analysis"))
49 set_resizable (false);
50 pages.set_scrollable ();
52 AnalysisResults & ar = status->result_map;
54 std::vector<double> dashes;
55 dashes.push_back (3.0);
56 dashes.push_back (5.0);
58 for (AnalysisResults::iterator i = ar.begin (); i != ar.end (); ++i) {
60 VBox *vb = manage (new VBox ());
61 Table *t = manage (new Table (4, 4));
62 t->set_border_width (0);
65 vb->set_border_width (4);
66 vb->pack_start (*t, false, false, 2);
68 std::string path = i->first;
69 ExportAnalysisPtr p = i->second;
71 l = manage (new Label (_("File:"), ALIGN_END));
72 t->attach (*l, 0, 1, 0, 1);
73 l = manage (new Label ());
74 l->set_ellipsize (Pango::ELLIPSIZE_START);
75 l->set_width_chars (64);
76 l->set_max_width_chars (64);
78 l->set_alignment (ALIGN_START, ALIGN_CENTER);
79 t->attach (*l, 1, 3, 0, 1, FILL, SHRINK);
81 Button *b = manage (new Button (_("Open Folder")));
82 t->attach (*b, 3, 4, 0, 2, FILL, SHRINK);
83 b->signal_clicked ().connect (sigc::bind (sigc::mem_fun (*this, &ExportReport::open_clicked), path));
88 framecnt_t file_length = 0;
89 framecnt_t sample_rate = 0;
90 framecnt_t start_off = 0;
92 if (AudioFileSource::get_soundfile_info (path, info, errmsg)) {
95 file_length = info.length;
96 sample_rate = info.samplerate;
97 start_off = info.timecode;
101 framecnt_t const nfr = _session ? _session->nominal_frame_rate () : 25;
102 double src_coef = (double) nfr / info.samplerate;
104 l = manage (new Label (_("Format:"), ALIGN_END));
105 t->attach (*l, 0, 1, 1, 2);
106 std::string fmt = info.format_name;
107 std::replace (fmt.begin (), fmt.end (), '\n', ' ');
108 l = manage (new Label ());
109 l->set_ellipsize (Pango::ELLIPSIZE_START);
110 l->set_width_chars (64);
111 l->set_max_width_chars (64);
113 l->set_alignment (ALIGN_START, ALIGN_CENTER);
114 t->attach (*l, 1, 3, 1, 2, FILL, SHRINK);
116 l = manage (new Label (_("Channels:"), ALIGN_END));
117 t->attach (*l, 0, 1, 2, 3);
118 l = manage (new Label (string_compose ("%1", info.channels), ALIGN_START));
119 t->attach (*l, 1, 2, 2, 3);
121 l = manage (new Label (_("Sample rate:"), ALIGN_END));
122 t->attach (*l, 0, 1, 3, 4);
123 l = manage (new Label (string_compose (_("%1 Hz"), info.samplerate), ALIGN_START));
124 t->attach (*l, 1, 2, 3, 4);
126 l = manage (new Label (_("Duration:"), ALIGN_END));
127 t->attach (*l, 2, 3, 2, 3);
128 clock = manage (new AudioClock ("sfboxLengthClock", true, "", false, false, true, false));
129 clock->set_session (_session);
130 clock->set_mode (AudioClock::MinSec);
131 clock->set (info.length * src_coef + 0.5, true);
132 t->attach (*clock, 3, 4, 2, 3);
134 l = manage (new Label (_("Timecode:"), ALIGN_END));
135 t->attach (*l, 2, 3, 3, 4);
136 clock = manage (new AudioClock ("sfboxTimecodeClock", true, "", false, false, false, false));
137 clock->set_session (_session);
138 clock->set_mode (AudioClock::Timecode);
139 clock->set (info.timecode * src_coef + 0.5, true);
140 t->attach (*clock, 3, 4, 3, 4);
142 l = manage (new Label (_("Error:"), ALIGN_END));
143 t->attach (*l, 0, 1, 1, 2);
144 l = manage (new Label (errmsg, ALIGN_START));
145 t->attach (*l, 1, 4, 1, 2);
149 Glib::RefPtr<Pango::Layout> layout = Pango::Layout::create (get_pango_context ());
151 // calc geometry of numerics
152 const float dbfs = accurate_coefficient_to_dB (p->peak);
153 const float dbtp = accurate_coefficient_to_dB (p->truepeak);
155 #define TXTSIZE(LINE, TXT, FONT) { \
156 layout->set_font_description (UIConfiguration::instance ().FONT ()); \
157 layout->set_text (TXT); \
158 layout->get_pixel_size (w, h); \
159 if (w > mnw) { mnw = w; } \
160 if (h > lin[LINE]) { lin[LINE] = h; } \
163 #define TXTWIDTH(TXT, FONT) { \
164 layout->set_font_description (UIConfiguration::instance ().FONT ()); \
165 layout->set_text (TXT); \
166 layout->get_pixel_size (w, h); \
167 if (w > mml) { mml = w; } \
170 int mnw = 0; // max numeric width
171 int lin[4] = { 0, 0, 0, 0 }; // max line height
173 TXTSIZE(0, _("(too short integration time)"), get_SmallFont);
175 TXTSIZE(0, _("Peak:"), get_SmallFont);
176 TXTSIZE(1, string_compose (_("%1 dBFS"), std::setprecision (1), std::fixed, dbfs), get_LargeFont);
177 TXTSIZE(2, _("True Peak:"), get_SmallFont);
178 TXTSIZE(3, string_compose (_("%1 dBTP"), std::setprecision (1), std::fixed, dbtp), get_LargeFont);
180 TXTSIZE(0, _("Integrated Loudness:"), get_SmallFont);
181 TXTSIZE(1, string_compose (_("%1 LUFS"), std::setprecision (1), std::fixed, p->loudness), get_LargeFont);
182 TXTSIZE(2, _("Loudness Range:"), get_SmallFont);
183 TXTSIZE(3, string_compose (_("%1 LU"), std::setprecision (1), std::fixed, p->loudness_range), get_LargeFont);
186 const int ht = lin[0] * 1.25 + lin[1] * 1.25 + lin[2] * 1.25 + lin[3] + 8;
187 const int hh = std::max (100, ht);
188 int m_l = 2 * mnw + /*hist-width*/ 540 + /*box spacing*/ 8 - /*peak-width*/ 800; // margin left
190 int mml = 0; // min margin left -- ensure left margin is wide enough
191 TXTWIDTH (_("Time"), get_SmallFont);
192 TXTWIDTH (_("100"), get_SmallMonospaceFont);
193 m_l = (std::max (m_l, mml + 8) + 3) & ~3;
195 mnw = (m_l - /*hist-width*/ 540 - /*box spacing*/ 8 + /*peak-width*/ 800) / 2;
196 const int nw2 = mnw / 2; // nums, horizontal center
199 y0[0] = (hh - ht) * .5 + lin[0] * .25;
200 y0[1] = y0[0] + lin[0] * 1.25;
201 y0[2] = y0[1] + lin[1] * 1.25;
202 y0[3] = y0[2] + lin[2] * 1.25;
205 { /* peak, loudness and R128 histogram */
206 Cairo::RefPtr<Cairo::ImageSurface> nums = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, mnw, hh);
207 Cairo::RefPtr<Cairo::ImageSurface> ebur = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, mnw, hh);
208 Cairo::RefPtr<Cairo::ImageSurface> hist = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, 540, hh);
210 /* peak and true-peak numerics */
211 Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create (nums);
212 cr->set_source_rgba (0, 0, 0, 1.0);
215 layout->set_font_description (UIConfiguration::instance ().get_SmallFont ());
216 layout->set_alignment (Pango::ALIGN_LEFT);
217 layout->set_text (_("Peak:"));
218 layout->get_pixel_size (w, h);
219 cr->move_to (rint (nw2 - w * .5), y0[0]);
220 cr->set_source_rgba (.7, .7, .7, 1.0);
221 layout->show_in_cairo_context (cr);
223 layout->set_font_description (UIConfiguration::instance ().get_LargeFont ());
224 layout->set_text (string_compose (_("%1 dBFS"), std::setprecision (1), std::fixed,
225 accurate_coefficient_to_dB (p->peak)));
226 layout->get_pixel_size (w, h);
227 cr->move_to (rint (nw2 - w * .5), y0[1]);
228 if (p->peak > .944) { cr->set_source_rgba (1.0, .5, .5, 1.0); }
229 layout->show_in_cairo_context (cr);
232 layout->set_font_description (UIConfiguration::instance ().get_SmallFont ());
233 layout->set_text (_("True Peak:"));
234 layout->get_pixel_size (w, h);
235 cr->move_to (rint (nw2 - w * .5), y0[2]);
236 cr->set_source_rgba (.7, .7, .7, 1.0);
237 layout->show_in_cairo_context (cr);
239 layout->set_font_description (UIConfiguration::instance ().get_LargeFont ());
240 layout->set_text (string_compose (_("%1 dBTP"), std::setprecision (1), std::fixed,
241 accurate_coefficient_to_dB (p->truepeak)));
242 layout->get_pixel_size (w, h);
243 cr->move_to (rint (nw2 - w * .5), y0[3]);
244 if (p->truepeak > .944) { cr->set_source_rgba (1.0, .5, .5, 1.0); }
245 layout->show_in_cairo_context (cr);
250 /* EBU R128 numerics */
251 cr = Cairo::Context::create (ebur);
252 cr->set_source_rgba (0, 0, 0, 1.0);
255 cr->set_source_rgba (.7, .7, .7, 1.0);
257 if (!i->second->have_loudness) {
258 layout->set_alignment (Pango::ALIGN_CENTER);
259 layout->set_font_description (UIConfiguration::instance ().get_LargeFont ());
260 layout->set_text (_("Not\nAvailable"));
261 layout->get_pixel_size (w, h);
262 cr->move_to (rint (nw2 - w * .5), rint ((hh - h) * .5));
263 layout->show_in_cairo_context (cr);
265 else if (p->loudness == -200 && p->loudness_range == 0) {
266 layout->set_alignment (Pango::ALIGN_CENTER);
267 layout->set_font_description (UIConfiguration::instance ().get_LargeFont ());
268 layout->set_text (_("Not\nAvailable"));
269 layout->get_pixel_size (w, h);
270 cr->move_to (rint (nw2 - w * .5), rint (hh * .5 - h * .6));
271 layout->show_in_cairo_context (cr);
274 layout->set_font_description (UIConfiguration::instance ().get_SmallFont ());
275 layout->set_text (_("(too short integration time)"));
276 layout->get_pixel_size (w, h);
277 cr->move_to (rint (nw2 - w * .5), rint (hh * .5 + yy));
278 layout->show_in_cairo_context (cr);
281 layout->set_font_description (UIConfiguration::instance ().get_SmallFont ());
282 layout->set_alignment (Pango::ALIGN_LEFT);
283 layout->set_text (_("Integrated Loudness:"));
284 layout->get_pixel_size (w, h);
285 cr->move_to (rint (nw2 - w * .5), y0[0]);
286 layout->show_in_cairo_context (cr);
288 layout->set_font_description (UIConfiguration::instance ().get_LargeFont ());
289 layout->set_text (string_compose (_("%1 LUFS"), std::setprecision (1), std::fixed, p->loudness));
290 layout->get_pixel_size (w, h);
291 cr->move_to (rint (nw2 - w * .5), y0[1]);
292 layout->show_in_cairo_context (cr);
294 layout->set_font_description (UIConfiguration::instance ().get_SmallFont ());
295 layout->set_text (_("Loudness Range:"));
296 layout->get_pixel_size (w, h);
297 cr->move_to (rint (nw2 - w * .5), y0[2]);
298 layout->show_in_cairo_context (cr);
300 layout->set_font_description (UIConfiguration::instance ().get_LargeFont ());
301 layout->set_text (string_compose (_("%1 LU"), std::setprecision (1), std::fixed, p->loudness_range));
302 layout->get_pixel_size (w, h);
303 cr->move_to (rint (nw2 - w * .5), y0[3]);
304 layout->show_in_cairo_context (cr);
308 /* draw loudness histogram */
309 cr = Cairo::Context::create (hist);
310 cr->set_source_rgba (0, 0, 0, 1.0);
313 cr->set_source_rgba (.7, .7, .7, 1.0);
314 cr->set_line_width (1.0);
316 if (p->loudness_hist_max > 0 && i->second->have_loudness) {
317 for (size_t x = 0 ; x < 510; ++x) {
318 cr->move_to (x - .5, hh);
319 cr->line_to (x - .5, (float) hh * (1.0 - p->loudness_hist[x] / (float) p->loudness_hist_max));
324 layout->set_font_description (UIConfiguration::instance ().get_SmallerFont ());
325 layout->set_alignment (Pango::ALIGN_CENTER);
328 layout->set_text (_("LUFS\n(short)"));
329 layout->get_pixel_size (w, h);
330 Gtkmm2ext::rounded_rectangle (cr, 5, rint (.5 * (hh - w) - 1), h + 2, w + 2, 4);
331 cr->set_source_rgba (.1, .1, .1, 0.7);
334 cr->move_to (6, rint (.5 * (hh + w)));
335 cr->set_source_rgba (.9, .9, .9, 1.0);
336 cr->rotate (M_PI / -2.0);
337 layout->show_in_cairo_context (cr);
341 layout->set_font_description (UIConfiguration::instance ().get_SmallMonospaceFont ());
342 layout->set_alignment (Pango::ALIGN_LEFT);
343 for (int g = -53; g <= -8; g += 5) {
344 // grid-lines. [110] -59LUFS .. [650]: -5 LUFS
345 layout->set_text (string_compose ("%1", std::setw(3), std::setfill(' '), g));
346 layout->get_pixel_size (w, h);
348 cr->set_operator (Cairo::OPERATOR_OVER);
349 Gtkmm2ext::rounded_rectangle (cr,
350 rint ((g + 59.0) * 10.0 - h * .5), 5,
352 const float pk = (g + 59.0) / 54.0;
353 ArdourCanvas::Color c = ArdourCanvas::hsva_to_color (252 - 260 * pk, .9, .3 + pk * .4, .6);
354 ArdourCanvas::set_source_rgba (cr, c);
358 cr->set_source_rgba (.9, .9, .9, 1.0);
359 cr->move_to (rint ((g + 59.0) * 10.0 - h * .5), w + 6.0);
360 cr->rotate (M_PI / -2.0);
361 layout->show_in_cairo_context (cr);
364 cr->set_operator (Cairo::OPERATOR_ADD);
366 cr->set_source_rgba (.3, .3, .3, 1.0);
367 cr->set_dash (dashes, 1.0);
368 cr->set_line_cap (Cairo::LINE_CAP_ROUND);
369 cr->move_to (rint ((g + 59.0) * 10.0) + .5, w + 8.0);
370 cr->line_to (rint ((g + 59.0) * 10.0) + .5, hh);
377 CimgArea *nu = manage (new CimgArea (nums));
378 CimgArea *eb = manage (new CimgArea (ebur));
379 CimgArea *hi = manage (new CimgArea (hist));
380 HBox *hb = manage (new HBox ());
382 hb->pack_start (*nu, false, false);
383 hb->pack_start (*hi, false, false);
384 hb->pack_start (*eb, false, false);
385 vb->pack_start (*hb, false, false);
388 #define XAXISLABEL(POS, TXT) { \
389 const float yy = rint (POS); \
390 layout->set_text (TXT); \
391 layout->get_pixel_size (w, h); \
392 cr->move_to (m_l - 8 - w, rint ((POS) - h * .5)); \
393 cr->set_source_rgba (.9, .9, .9, 1.0); \
394 cr->set_operator (Cairo::OPERATOR_OVER); \
395 layout->show_in_cairo_context (cr); \
396 cr->move_to (m_l - 4, yy - .5); \
397 cr->line_to (m_l + width, yy - .5); \
398 cr->set_source_rgba (.3, .3, .3, 1.0); \
399 cr->set_operator (Cairo::OPERATOR_ADD); \
403 for (uint32_t c = 0; c < p->n_channels; ++c) {
405 const size_t width = sizeof (p->peaks) / sizeof (ARDOUR::PeakData::PeakDatum) / 4;
406 const float height_2 = std::min (100, 8 * lin[0] / (int) p->n_channels); // TODO refine
408 Cairo::RefPtr<Cairo::ImageSurface> wave = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, m_l + width, 2 * height_2);
409 Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create (wave);
410 cr->set_operator (Cairo::OPERATOR_SOURCE);
411 cr->rectangle (0, 0, m_l, 2 * height_2);
412 cr->set_source_rgba (0, 0, 0, 0);
414 cr->rectangle (m_l, 0, width, 2 * height_2);
415 cr->set_source_rgba (0, 0, 0, 1.0);
417 cr->set_operator (Cairo::OPERATOR_OVER);
419 cr->set_source_rgba (.7, .7, .7, 1.0);
420 cr->set_line_width (1.0);
421 for (size_t x = 0 ; x < width; ++x) {
422 cr->move_to (m_l + x - .5, height_2 - height_2 * p->peaks[c][x].max);
423 cr->line_to (m_l + x - .5, height_2 - height_2 * p->peaks[c][x].min);
428 cr->set_source_rgba (.3, .3, .3, 0.7);
429 cr->move_to (m_l + 0, height_2 - .5);
430 cr->line_to (m_l + width, height_2 - .5);
434 layout->set_font_description (UIConfiguration::instance ().get_SmallerFont ());
435 layout->set_alignment (Pango::ALIGN_LEFT);
436 layout->set_text (_("dBFS"));
437 layout->get_pixel_size (w, h);
438 cr->move_to (rint (.5 * (m_l - h)), rint (height_2 + w * .5));
439 cr->set_source_rgba (.9, .9, .9, 1.0);
441 cr->rotate (M_PI / -2.0);
442 layout->show_in_cairo_context (cr);
446 cr->set_line_width (1.0);
447 cr->set_dash (dashes, 2.0);
448 cr->set_line_cap (Cairo::LINE_CAP_ROUND);
450 layout->set_font_description (UIConfiguration::instance ().get_SmallMonospaceFont ());
451 XAXISLABEL (height_2 * 0.6452, _("-9"));
452 XAXISLABEL (height_2 * 1.3548, _("-9"));
453 XAXISLABEL (height_2 * 0.2921, _("-3"));
454 XAXISLABEL (height_2 * 1.7079, _("-3"));
457 CimgArea *wv = manage (new CimgArea (wave));
458 vb->pack_start (*wv);
461 if (file_length > 0 && sample_rate > 0)
463 /* Time Axis -- re-use waveform width */
464 const size_t width = sizeof (p->peaks) / sizeof (ARDOUR::PeakData::PeakDatum) / 4;
465 layout->set_font_description (UIConfiguration::instance ().get_SmallMonospaceFont ());
466 layout->set_text (_("00:00:00.000"));
467 layout->get_pixel_size (w, h);
468 int height = h * 1.75;
469 Cairo::RefPtr<Cairo::ImageSurface> ytme = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, m_l + width, height);
470 Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create (ytme);
471 cr->set_operator (Cairo::OPERATOR_SOURCE);
472 cr->set_source_rgba (0, 0, 0, 1.0);
474 cr->rectangle (0, 0, m_l, height);
475 cr->set_source_rgba (0, 0, 0, 0);
477 cr->set_operator (Cairo::OPERATOR_OVER);
479 cr->set_line_width (1.0);
480 for (int i = 0; i <= 4; ++i) {
481 const float fract = (float) i / 4.0;
482 // " XX:XX:XX.XXX" [space/minus] 12 chars = 13.
483 const float xalign = (i == 4) ? 1.0 : (i == 0) ? 1.0 / 13.0 : 7.0 / 13.0;
486 AudioClock::print_minsec (start_off + file_length * fract,
487 buf, sizeof (buf), sample_rate);
489 layout->set_text (buf);
490 layout->get_pixel_size (w, h);
491 cr->move_to (rint (m_l + width * fract - w * xalign), rint (.5 * (height - h)));
492 cr->set_source_rgba (.9, .9, .9, 1.0);
493 layout->show_in_cairo_context (cr);
495 cr->set_source_rgba (.7, .7, .7, 1.0);
496 cr->move_to (rint (m_l + width * fract) - .5, 0);
497 cr->line_to (rint (m_l + width * fract) - .5, ceil (height * .15));
498 cr->move_to (rint (m_l + width * fract) - .5, floor (height * .85));
499 cr->line_to (rint (m_l + width * fract) - .5, height);
503 layout->set_font_description (UIConfiguration::instance ().get_SmallFont ());
504 layout->set_text (_("Time"));
505 cr->set_source_rgba (.9, .9, .9, 1.0);
506 layout->get_pixel_size (w, h);
507 cr->move_to (rint (.5 * (m_l - w)), rint (.5 * (height - h)));
508 layout->show_in_cairo_context (cr);
511 CimgArea *tm = manage (new CimgArea (ytme));
512 vb->pack_start (*tm);
517 const size_t swh = sizeof (p->spectrum) / sizeof (float);
518 const size_t height = sizeof (p->spectrum[0]) / sizeof (float);
519 const size_t width = swh / height;
521 Cairo::RefPtr<Cairo::ImageSurface> spec = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, m_l + width, height);
522 Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create (spec);
523 cr->set_operator (Cairo::OPERATOR_SOURCE);
524 cr->rectangle (0, 0, m_l, height);
525 cr->set_source_rgba (0, 0, 0, 0);
527 cr->rectangle (m_l, 0, width, height);
528 cr->set_source_rgba (0, 0, 0, 1.0);
530 cr->set_operator (Cairo::OPERATOR_OVER);
532 for (size_t x = 0 ; x < width; ++x) {
533 for (size_t y = 0 ; y < height; ++y) {
534 const float pk = p->spectrum[x][y];
535 ArdourCanvas::Color c = ArdourCanvas::hsva_to_color (252 - 260 * pk, .9, .3 + pk * .4);
536 ArdourCanvas::set_source_rgba (cr, c);
537 cr->rectangle (m_l + x - .5, y - .5, 1, 1);
543 layout->set_font_description (UIConfiguration::instance ().get_SmallerFont ());
544 layout->set_text (_("Hz"));
545 layout->get_pixel_size (w, h);
546 cr->move_to (rint (.5 * (m_l - h)), rint ((height + w) * .5));
547 cr->set_source_rgba (.9, .9, .9, 1.0);
549 cr->rotate (M_PI / -2.0);
550 layout->show_in_cairo_context (cr);
554 cr->set_line_width (1.0);
555 cr->set_dash (dashes, 2.0);
556 cr->set_line_cap (Cairo::LINE_CAP_ROUND);
558 layout->set_font_description (UIConfiguration::instance ().get_SmallMonospaceFont ());
559 //XAXISLABEL (p->freq[0], _("50Hz"));
560 XAXISLABEL (p->freq[1], _("100"));
561 XAXISLABEL (p->freq[2], _("500"));
562 XAXISLABEL (p->freq[3], _("1K"));
563 XAXISLABEL (p->freq[4], _("5K"));
564 XAXISLABEL (p->freq[5], _("10K"));
567 CimgArea *sp = manage (new CimgArea (spec));
568 vb->pack_start (*sp);
571 pages.pages ().push_back (Notebook_Helpers::TabElem (*vb, Glib::path_get_basename (i->first)));
574 pages.set_show_tabs (true);
576 pages.set_name ("ExportReportNotebook");
577 pages.set_current_page (0);
579 get_vbox ()->set_spacing (4);
580 get_vbox ()->pack_start (pages, false, false);
582 add_button (Stock::CLOSE, RESPONSE_ACCEPT);
583 set_default_response (RESPONSE_ACCEPT);
590 return ArdourDialog::run ();
594 ExportReport::open_clicked (std::string p)
596 PBD::open_uri (Glib::path_get_dirname(p));