2006-03-12 16:58:52 -05:00
|
|
|
/*
|
|
|
|
Copyright (C) 2006 Paul Davis
|
2006-04-27 05:04:24 -04:00
|
|
|
Written by Sampo Savolainen
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <gtkmm2ext/gtk_ui.h>
|
|
|
|
#include <gtkmm/stock.h>
|
|
|
|
#include <gtkmm/label.h>
|
|
|
|
#include <gtkmm/treemodel.h>
|
|
|
|
#include <gtkmm/treeiter.h>
|
|
|
|
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/audioregion.h"
|
|
|
|
#include "ardour/audioplaylist.h"
|
|
|
|
#include "ardour/types.h"
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
#include "analysis_window.h"
|
|
|
|
|
|
|
|
#include "route_ui.h"
|
|
|
|
#include "time_axis_view.h"
|
|
|
|
#include "public_editor.h"
|
|
|
|
#include "selection.h"
|
2006-07-31 23:23:35 -04:00
|
|
|
#include "audio_region_view.h"
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
#include "i18n.h"
|
|
|
|
|
|
|
|
using namespace ARDOUR;
|
2006-06-21 19:01:03 -04:00
|
|
|
using namespace PBD;
|
2006-03-12 16:58:52 -05:00
|
|
|
|
2008-03-17 16:54:03 -04:00
|
|
|
AnalysisWindow::AnalysisWindow() :
|
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
source_selection_label (_("Signal source")),
|
|
|
|
source_selection_ranges_rb (_("Selected ranges")),
|
|
|
|
source_selection_regions_rb (_("Selected regions")),
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
display_model_label (_("Display model")),
|
|
|
|
display_model_composite_separate_rb (_("Composite graphs for each track")),
|
2006-07-06 17:25:45 -04:00
|
|
|
display_model_composite_all_tracks_rb (_("Composite graph of all tracks")),
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-03-17 16:54:03 -04:00
|
|
|
show_minmax_button (_("Show frequency power range")),
|
|
|
|
show_normalized_button (_("Normalize values")),
|
2006-03-12 16:58:52 -05:00
|
|
|
|
2008-03-17 16:54:03 -04:00
|
|
|
fft_graph (16384)
|
2006-03-12 16:58:52 -05:00
|
|
|
{
|
2008-03-17 16:54:03 -04:00
|
|
|
set_name(_("FFT analysis window"));
|
2009-10-19 13:25:37 -04:00
|
|
|
set_title (_("Spectral Analysis"));
|
2008-03-17 16:54:03 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
track_list_ready = false;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
// Left side: track list + controls
|
|
|
|
tlmodel = Gtk::ListStore::create(tlcols);
|
|
|
|
track_list.set_model (tlmodel);
|
|
|
|
track_list.append_column(_("Track"), tlcols.trackname);
|
2006-11-27 14:31:33 -05:00
|
|
|
track_list.append_column_editable(_("Show"), tlcols.visible);
|
2006-03-12 16:58:52 -05:00
|
|
|
track_list.set_headers_visible(true);
|
|
|
|
track_list.set_reorderable(false);
|
|
|
|
track_list.get_selection()->set_mode (Gtk::SELECTION_NONE);
|
|
|
|
|
|
|
|
|
|
|
|
Gtk::TreeViewColumn* track_col = track_list.get_column(0);
|
|
|
|
Gtk::CellRendererText* renderer = dynamic_cast<Gtk::CellRendererText*>(track_list.get_column_cell_renderer (0));
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
track_col->add_attribute(renderer->property_foreground_gdk(), tlcols.color);
|
|
|
|
track_col->set_expand(true);
|
|
|
|
|
|
|
|
|
|
|
|
tlmodel->signal_row_changed().connect (
|
2009-12-11 18:29:48 -05:00
|
|
|
sigc::mem_fun(*this, &AnalysisWindow::track_list_row_changed) );
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
fft_graph.set_analysis_window(this);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
vbox.pack_start(track_list);
|
|
|
|
|
|
|
|
|
|
|
|
// "Signal source"
|
|
|
|
vbox.pack_start(source_selection_label, false, false);
|
|
|
|
|
|
|
|
{
|
|
|
|
Gtk::RadioButtonGroup group = source_selection_ranges_rb.get_group();
|
|
|
|
source_selection_regions_rb.set_group(group);
|
|
|
|
|
|
|
|
source_selection_ranges_rb.set_active();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
vbox.pack_start (source_selection_ranges_rb, false, false);
|
|
|
|
vbox.pack_start (source_selection_regions_rb, false, false);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
// "Selected ranges" radio
|
|
|
|
source_selection_ranges_rb.signal_toggled().connect (
|
2009-12-11 18:29:48 -05:00
|
|
|
sigc::bind ( sigc::mem_fun(*this, &AnalysisWindow::source_selection_changed), &source_selection_ranges_rb));
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
// "Selected regions" radio
|
|
|
|
source_selection_regions_rb.signal_toggled().connect (
|
2009-12-11 18:29:48 -05:00
|
|
|
sigc::bind ( sigc::mem_fun(*this, &AnalysisWindow::source_selection_changed), &source_selection_regions_rb));
|
2006-03-12 16:58:52 -05:00
|
|
|
}
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
vbox.pack_start(hseparator1, false, false);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
// "Display model"
|
|
|
|
vbox.pack_start(display_model_label, false, false);
|
|
|
|
{
|
|
|
|
Gtk::RadioButtonGroup group = display_model_composite_separate_rb.get_group();
|
|
|
|
display_model_composite_all_tracks_rb.set_group (group);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
display_model_composite_separate_rb.set_active();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
vbox.pack_start (display_model_composite_separate_rb, false, false);
|
|
|
|
vbox.pack_start (display_model_composite_all_tracks_rb, false, false);
|
|
|
|
|
|
|
|
// "Composite graphs for all tracks"
|
|
|
|
display_model_composite_separate_rb.signal_toggled().connect (
|
2009-12-11 18:29:48 -05:00
|
|
|
sigc::bind ( sigc::mem_fun(*this, &AnalysisWindow::display_model_changed), &display_model_composite_separate_rb));
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
// "Composite graph of all tracks"
|
|
|
|
display_model_composite_all_tracks_rb.signal_toggled().connect (
|
2009-12-11 18:29:48 -05:00
|
|
|
sigc::bind ( sigc::mem_fun(*this, &AnalysisWindow::display_model_changed), &display_model_composite_all_tracks_rb));
|
2006-03-12 16:58:52 -05:00
|
|
|
}
|
|
|
|
|
2008-03-17 16:54:03 -04:00
|
|
|
// Analyze button
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
refresh_button.set_name("EditorGTKButton");
|
2008-03-17 16:54:03 -04:00
|
|
|
refresh_button.set_label(_("Re-analyze data"));
|
2006-03-12 16:58:52 -05:00
|
|
|
|
2009-12-11 18:29:48 -05:00
|
|
|
refresh_button.signal_clicked().connect ( sigc::bind ( sigc::mem_fun(*this, &AnalysisWindow::analyze_data), &refresh_button));
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
vbox.pack_start(refresh_button, false, false, 10);
|
2008-03-17 16:54:03 -04:00
|
|
|
|
|
|
|
|
|
|
|
// Feature checkboxes
|
|
|
|
|
|
|
|
// minmax
|
2009-12-11 18:29:48 -05:00
|
|
|
show_minmax_button.signal_toggled().connect( sigc::mem_fun(*this, &AnalysisWindow::show_minmax_changed));
|
2008-03-17 16:54:03 -04:00
|
|
|
vbox.pack_start(show_minmax_button, false, false);
|
|
|
|
|
|
|
|
// normalize
|
2009-12-11 18:29:48 -05:00
|
|
|
show_normalized_button.signal_toggled().connect( sigc::mem_fun(*this, &AnalysisWindow::show_normalized_changed));
|
2008-03-17 16:54:03 -04:00
|
|
|
vbox.pack_start(show_normalized_button, false, false);
|
|
|
|
|
|
|
|
|
2009-10-14 12:10:01 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-17 16:54:03 -04:00
|
|
|
hbox.pack_start(vbox, Gtk::PACK_SHRINK);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
// Analysis window on the right
|
|
|
|
fft_graph.ensure_style();
|
|
|
|
|
|
|
|
hbox.add(fft_graph);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
// And last we pack the hbox
|
2008-03-17 16:54:03 -04:00
|
|
|
add(hbox);
|
|
|
|
show_all();
|
|
|
|
track_list.show_all();
|
2006-03-12 16:58:52 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
AnalysisWindow::~AnalysisWindow()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2008-03-17 16:54:03 -04:00
|
|
|
void
|
|
|
|
AnalysisWindow::show_minmax_changed()
|
|
|
|
{
|
|
|
|
fft_graph.set_show_minmax(show_minmax_button.get_active());
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
AnalysisWindow::show_normalized_changed()
|
|
|
|
{
|
|
|
|
fft_graph.set_show_normalized(show_normalized_button.get_active());
|
|
|
|
}
|
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
void
|
|
|
|
AnalysisWindow::set_rangemode()
|
|
|
|
{
|
|
|
|
source_selection_ranges_rb.set_active(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
AnalysisWindow::set_regionmode()
|
|
|
|
{
|
|
|
|
source_selection_regions_rb.set_active(true);
|
|
|
|
}
|
|
|
|
|
2009-10-14 12:10:01 -04:00
|
|
|
void
|
2009-07-21 11:55:17 -04:00
|
|
|
AnalysisWindow::track_list_row_changed(const Gtk::TreeModel::Path& /*path*/, const Gtk::TreeModel::iterator& /*iter*/)
|
2006-03-12 16:58:52 -05:00
|
|
|
{
|
|
|
|
if (track_list_ready) {
|
|
|
|
fft_graph.redraw();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
AnalysisWindow::clear_tracklist()
|
|
|
|
{
|
|
|
|
// Empty track list & free old graphs
|
|
|
|
Gtk::TreeNodeChildren children = track_list.get_model()->children();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
for (Gtk::TreeIter i = children.begin(); i != children.end(); i++) {
|
|
|
|
Gtk::TreeModel::Row row = *i;
|
|
|
|
|
|
|
|
FFTResult *delete_me = row[tlcols.graph];
|
|
|
|
if (delete_me == 0)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
// Make sure it's not drawn
|
|
|
|
row[tlcols.graph] = 0;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
delete delete_me;
|
|
|
|
}
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
tlmodel->clear();
|
|
|
|
}
|
|
|
|
|
2006-03-12 17:35:39 -05:00
|
|
|
void
|
|
|
|
AnalysisWindow::analyze()
|
|
|
|
{
|
|
|
|
analyze_data(&refresh_button);
|
|
|
|
}
|
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
void
|
2013-04-05 12:48:36 -04:00
|
|
|
AnalysisWindow::analyze_data (Gtk::Button * /*button*/)
|
2006-03-12 16:58:52 -05:00
|
|
|
{
|
|
|
|
track_list_ready = false;
|
|
|
|
{
|
2012-07-25 13:48:55 -04:00
|
|
|
Glib::Threads::Mutex::Lock lm (track_list_lock);
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
// Empty track list & free old graphs
|
|
|
|
clear_tracklist();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
// first we gather the FFTResults of all tracks
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
Sample *buf = (Sample *) malloc(sizeof(Sample) * fft_graph.windowSize());
|
|
|
|
Sample *mixbuf = (Sample *) malloc(sizeof(Sample) * fft_graph.windowSize());
|
|
|
|
float *gain = (float *) malloc(sizeof(float) * fft_graph.windowSize());
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-12-17 13:24:23 -05:00
|
|
|
Selection& s (PublicEditor::instance().get_selection());
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-07-31 23:23:35 -04:00
|
|
|
|
2013-04-05 12:48:36 -04:00
|
|
|
// if timeSelection
|
|
|
|
if (source_selection_ranges_rb.get_active()) {
|
|
|
|
TimeSelection ts = s.time;
|
2006-07-31 23:23:35 -04:00
|
|
|
|
2013-04-05 12:48:36 -04:00
|
|
|
for (TrackSelection::iterator i = s.tracks.begin(); i != s.tracks.end(); ++i) {
|
|
|
|
boost::shared_ptr<AudioPlaylist> pl
|
|
|
|
= boost::dynamic_pointer_cast<AudioPlaylist>((*i)->playlist());
|
2008-09-10 11:03:30 -04:00
|
|
|
|
2013-04-05 12:48:36 -04:00
|
|
|
if (!pl)
|
|
|
|
continue;
|
2006-03-12 16:58:52 -05:00
|
|
|
|
2013-04-05 12:48:36 -04:00
|
|
|
RouteUI *rui = dynamic_cast<RouteUI *>(*i);
|
|
|
|
int n_inputs = rui->route()->n_inputs().n_audio(); // FFT is audio only
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2013-04-05 12:48:36 -04:00
|
|
|
// Busses don't have playlists, so we need to check that we actually are working with a playlist
|
|
|
|
if (!pl || !rui)
|
|
|
|
continue;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2013-04-05 12:48:36 -04:00
|
|
|
// std::cerr << "Analyzing ranges on track " << rui->route()->name() << std::endl;
|
|
|
|
|
|
|
|
FFTResult *res = fft_graph.prepareResult(rui->color(), rui->route()->name());
|
2006-12-14 09:15:43 -05:00
|
|
|
for (std::list<AudioRange>::iterator j = ts.begin(); j != ts.end(); ++j) {
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
int n;
|
2008-09-10 11:03:30 -04:00
|
|
|
for (int channel = 0; channel < n_inputs; channel++) {
|
2010-12-03 17:26:29 -05:00
|
|
|
framecnt_t x = 0;
|
2006-03-12 16:58:52 -05:00
|
|
|
|
2010-12-03 17:26:29 -05:00
|
|
|
while (x < j->length()) {
|
2008-09-10 11:03:30 -04:00
|
|
|
// TODO: What about stereo+ channels? composite all to one, I guess
|
2006-03-12 16:58:52 -05:00
|
|
|
|
2008-09-10 11:03:30 -04:00
|
|
|
n = fft_graph.windowSize();
|
|
|
|
|
|
|
|
if (x + n >= (*j).length() ) {
|
|
|
|
n = (*j).length() - x;
|
|
|
|
}
|
|
|
|
|
|
|
|
n = pl->read(buf, mixbuf, gain, (*j).start + x, n, channel);
|
|
|
|
|
|
|
|
if ( n < fft_graph.windowSize()) {
|
|
|
|
for (int j = n; j < fft_graph.windowSize(); j++) {
|
|
|
|
buf[j] = 0.0;
|
|
|
|
}
|
2006-03-12 16:58:52 -05:00
|
|
|
}
|
2008-09-10 11:03:30 -04:00
|
|
|
|
|
|
|
res->analyzeWindow(buf);
|
|
|
|
|
|
|
|
x += n;
|
2006-03-12 16:58:52 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-04-05 12:48:36 -04:00
|
|
|
res->finalize();
|
|
|
|
|
|
|
|
Gtk::TreeModel::Row newrow = *(tlmodel)->append();
|
|
|
|
newrow[tlcols.trackname] = rui->route()->name();
|
|
|
|
newrow[tlcols.visible] = true;
|
|
|
|
newrow[tlcols.color] = rui->color();
|
|
|
|
newrow[tlcols.graph] = res;
|
|
|
|
}
|
|
|
|
} else if (source_selection_regions_rb.get_active()) {
|
|
|
|
RegionSelection ars = s.regions;
|
|
|
|
// std::cerr << "Analyzing selected regions" << std::endl;
|
|
|
|
|
|
|
|
for (RegionSelection::iterator j = ars.begin(); j != ars.end(); ++j) {
|
|
|
|
// Check that the region is actually audio (so we can analyze it)
|
|
|
|
AudioRegionView* arv = dynamic_cast<AudioRegionView*>(*j);
|
|
|
|
if (!arv)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
// std::cerr << " - " << (*j)->region().name() << ": " << (*j)->region().length() << " samples starting at " << (*j)->region().position() << std::endl;
|
|
|
|
RouteTimeAxisView *rtav = dynamic_cast<RouteTimeAxisView *>(&arv->get_time_axis_view());
|
|
|
|
if (!rtav) {
|
|
|
|
/* shouldn't happen... */
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
FFTResult *res = fft_graph.prepareResult(rtav->color(), arv->get_item_name());
|
|
|
|
int n;
|
|
|
|
for (unsigned int channel = 0; channel < arv->region()->n_channels(); channel++) {
|
2006-03-12 16:58:52 -05:00
|
|
|
|
2013-04-05 12:48:36 -04:00
|
|
|
framecnt_t x = 0;
|
|
|
|
framecnt_t length = arv->region()->length();
|
2006-07-31 23:23:35 -04:00
|
|
|
|
2013-04-05 12:48:36 -04:00
|
|
|
while (x < length) {
|
|
|
|
// TODO: What about stereo+ channels? composite all to one, I guess
|
2008-09-10 11:03:30 -04:00
|
|
|
|
2013-04-05 12:48:36 -04:00
|
|
|
n = fft_graph.windowSize();
|
|
|
|
if (x + n >= length ) {
|
|
|
|
n = length - x;
|
|
|
|
}
|
2008-09-10 11:03:30 -04:00
|
|
|
|
2013-04-05 12:48:36 -04:00
|
|
|
memset (buf, 0, n * sizeof (Sample));
|
|
|
|
n = arv->audio_region()->read_at(buf, mixbuf, gain, arv->region()->position() + x, n, channel);
|
2008-09-10 11:03:30 -04:00
|
|
|
|
2013-04-05 12:48:36 -04:00
|
|
|
if (n == 0)
|
|
|
|
break;
|
2008-09-10 11:03:30 -04:00
|
|
|
|
2013-04-05 12:48:36 -04:00
|
|
|
if ( n < fft_graph.windowSize()) {
|
|
|
|
for (int j = n; j < fft_graph.windowSize(); j++) {
|
|
|
|
buf[j] = 0.0;
|
2008-09-10 11:03:30 -04:00
|
|
|
}
|
2006-03-12 16:58:52 -05:00
|
|
|
}
|
|
|
|
|
2013-04-05 12:48:36 -04:00
|
|
|
res->analyzeWindow(buf);
|
|
|
|
x += n;
|
|
|
|
}
|
2006-03-12 16:58:52 -05:00
|
|
|
}
|
2013-04-05 12:48:36 -04:00
|
|
|
// std::cerr << "Found: " << (*j)->get_item_name() << std::endl;
|
|
|
|
res->finalize();
|
2006-03-12 16:58:52 -05:00
|
|
|
|
2013-04-05 12:48:36 -04:00
|
|
|
Gtk::TreeModel::Row newrow = *(tlmodel)->append();
|
|
|
|
newrow[tlcols.trackname] = arv->get_item_name();
|
|
|
|
newrow[tlcols.visible] = true;
|
|
|
|
newrow[tlcols.color] = rtav->color();
|
|
|
|
newrow[tlcols.graph] = res;
|
2006-03-12 16:58:52 -05:00
|
|
|
|
2013-04-05 12:48:36 -04:00
|
|
|
}
|
2009-10-14 12:10:01 -04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
free(buf);
|
|
|
|
free(mixbuf);
|
|
|
|
|
|
|
|
track_list_ready = true;
|
|
|
|
} /* end lock */
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
fft_graph.redraw();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
AnalysisWindow::source_selection_changed (Gtk::RadioButton *button)
|
|
|
|
{
|
|
|
|
// We are only interested in activation signals, not deactivation signals
|
|
|
|
if (!button->get_active())
|
|
|
|
return;
|
|
|
|
|
|
|
|
/*
|
|
|
|
cerr << "AnalysisWindow: signal source = ";
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
if (button == &source_selection_ranges_rb) {
|
|
|
|
cerr << "selected ranges" << endl;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
} else if (button == &source_selection_regions_rb) {
|
|
|
|
cerr << "selected regions" << endl;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
} else {
|
|
|
|
cerr << "unknown?" << endl;
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
AnalysisWindow::display_model_changed (Gtk::RadioButton *button)
|
|
|
|
{
|
|
|
|
// We are only interested in activation signals, not deactivation signals
|
|
|
|
if (!button->get_active())
|
|
|
|
return;
|
|
|
|
|
|
|
|
/*
|
|
|
|
cerr << "AnalysisWindow: display model = ";
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
if (button == &display_model_composite_separate_rb) {
|
|
|
|
cerr << "separate composites of tracks" << endl;
|
|
|
|
} else if (button == &display_model_composite_all_tracks_rb) {
|
|
|
|
cerr << "composite of all tracks" << endl;
|
|
|
|
} else {
|
|
|
|
cerr << "unknown?" << endl;
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
}
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
|