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.
|
|
|
|
|
2006-04-27 05:04:24 -04:00
|
|
|
$Id$
|
2006-03-12 16:58:52 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <gtkmm2ext/gtk_ui.h>
|
|
|
|
#include <gtkmm/stock.h>
|
|
|
|
#include <gtkmm/label.h>
|
|
|
|
#include <gtkmm/treemodel.h>
|
|
|
|
#include <gtkmm/treeiter.h>
|
|
|
|
|
|
|
|
#include <ardour/audioregion.h>
|
Large nasty commit in the form of a 5000 line patch chock-full of completely
unecessary changes. (Sorry, doing a "sprint" based thing, this is the end of the first one)
Achieved MIDI track and bus creation, associated Jack port and diskstream creation, and minimal GUI stuff for creating them. Should be set to start work on actually recording and playing midi to/from disk now.
Relevant (significant) changes:
- Creation of a Buffer class. Base class is type agnostic so things can point to a buffer but not care what kind it is (otherwise it'd be a template). Derived into AudioBuffer and MidiBuffer, with a type tag because checking type is necessary in parts of the code where dynamic_cast wouldn't be wise. Originally I considered this a hack, but passing around a type proved to be a very good solution to all the other problems (below). There is a 1:1 mapping between jack port data types and ardour Buffer types (with a conversion function), but that's easily removed if it ever becomes necessary. Having the type scoped in the Buffer class is maybe not the best spot for it, but whatever (this is proof of concept kinda stuff right now...)
- IO now has a "default" port type (passed to the constructor and stored as a member), used by ensure_io (and similar) to create n ports. IO::register_***_port has a type argument that defaults to the default type if not passed. Rationale: previous IO API is identical, no changes needed to existing code, but path is paved for multiple port types in one IO, which we will need for eg synth plugin inserts, among other things. This is not quite ideal (best would be to only have the two port register functions and have them take a type), but the alternative is a lot of work (namely destroying the 'ensure' functions and everything that uses them) for very little gain. (I am convinced after quite a few tries at the whiteboard that subclassing IO in any way is not a feasible option, look at it's inheritance diagram in Doxygen and you can see why)
- AudioEngine::register_audio_input_port is now register_input_port and takes a type argument. Ditto for output.
- (Most significant change) AudioDiskstream abstracted into Distream, and sibling MidiDiskstream created. Very much still a work in progress, but Diskstream is there to switch references over to (most already are), which is the important part. It is still unclear what the MIDI diskstream's relation to channels is, but I'm pretty sure they will be single channel only (so SMF Type 0) since noone can come up with a reason otherwise.
- MidiTrack creation. Same thing as AudioTrack but with a different default type basically. No big deal here.
- Random cleanups and variable renamings etc. because I have OCD and can't help myself. :)
Known broken: Loading of sessions containing MIDI tracks.
git-svn-id: svn://localhost/ardour2/branches/midi@641 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-06-26 12:01:34 -04:00
|
|
|
#include <ardour/audioplaylist.h>
|
2006-03-12 16:58:52 -05:00
|
|
|
#include <ardour/types.h>
|
|
|
|
|
|
|
|
#include "analysis_window.h"
|
|
|
|
|
|
|
|
#include "route_ui.h"
|
|
|
|
#include "time_axis_view.h"
|
|
|
|
#include "public_editor.h"
|
|
|
|
#include "selection.h"
|
2006-08-01 13:19:38 -04:00
|
|
|
#include "audio_region_view.h"
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
#include "i18n.h"
|
|
|
|
|
|
|
|
using namespace ARDOUR;
|
Large nasty commit in the form of a 5000 line patch chock-full of completely
unecessary changes. (Sorry, doing a "sprint" based thing, this is the end of the first one)
Achieved MIDI track and bus creation, associated Jack port and diskstream creation, and minimal GUI stuff for creating them. Should be set to start work on actually recording and playing midi to/from disk now.
Relevant (significant) changes:
- Creation of a Buffer class. Base class is type agnostic so things can point to a buffer but not care what kind it is (otherwise it'd be a template). Derived into AudioBuffer and MidiBuffer, with a type tag because checking type is necessary in parts of the code where dynamic_cast wouldn't be wise. Originally I considered this a hack, but passing around a type proved to be a very good solution to all the other problems (below). There is a 1:1 mapping between jack port data types and ardour Buffer types (with a conversion function), but that's easily removed if it ever becomes necessary. Having the type scoped in the Buffer class is maybe not the best spot for it, but whatever (this is proof of concept kinda stuff right now...)
- IO now has a "default" port type (passed to the constructor and stored as a member), used by ensure_io (and similar) to create n ports. IO::register_***_port has a type argument that defaults to the default type if not passed. Rationale: previous IO API is identical, no changes needed to existing code, but path is paved for multiple port types in one IO, which we will need for eg synth plugin inserts, among other things. This is not quite ideal (best would be to only have the two port register functions and have them take a type), but the alternative is a lot of work (namely destroying the 'ensure' functions and everything that uses them) for very little gain. (I am convinced after quite a few tries at the whiteboard that subclassing IO in any way is not a feasible option, look at it's inheritance diagram in Doxygen and you can see why)
- AudioEngine::register_audio_input_port is now register_input_port and takes a type argument. Ditto for output.
- (Most significant change) AudioDiskstream abstracted into Distream, and sibling MidiDiskstream created. Very much still a work in progress, but Diskstream is there to switch references over to (most already are), which is the important part. It is still unclear what the MIDI diskstream's relation to channels is, but I'm pretty sure they will be single channel only (so SMF Type 0) since noone can come up with a reason otherwise.
- MidiTrack creation. Same thing as AudioTrack but with a different default type basically. No big deal here.
- Random cleanups and variable renamings etc. because I have OCD and can't help myself. :)
Known broken: Loading of sessions containing MIDI tracks.
git-svn-id: svn://localhost/ardour2/branches/midi@641 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-06-26 12:01:34 -04:00
|
|
|
using namespace PBD;
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
AnalysisWindow::AnalysisWindow()
|
|
|
|
: ArdourDialog(_("analysis window")),
|
|
|
|
|
|
|
|
source_selection_label (_("Signal source")),
|
|
|
|
source_selection_ranges_rb (_("Selected ranges")),
|
|
|
|
source_selection_regions_rb (_("Selected regions")),
|
2006-07-13 23:43:32 -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-13 23:43:32 -04:00
|
|
|
display_model_composite_all_tracks_rb (_("Composite graph of all tracks")),
|
2006-03-12 16:58:52 -05:00
|
|
|
|
2006-07-13 23:43:32 -04:00
|
|
|
fft_graph (2048)
|
2006-03-12 16:58:52 -05:00
|
|
|
{
|
|
|
|
track_list_ready = false;
|
|
|
|
|
|
|
|
// Left side: track list + controls
|
|
|
|
tlmodel = Gtk::ListStore::create(tlcols);
|
|
|
|
track_list.set_model (tlmodel);
|
|
|
|
track_list.append_column(_("Track"), tlcols.trackname);
|
2007-01-09 18:24:54 -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));
|
|
|
|
|
|
|
|
track_col->add_attribute(renderer->property_foreground_gdk(), tlcols.color);
|
|
|
|
track_col->set_expand(true);
|
|
|
|
|
|
|
|
|
|
|
|
tlmodel->signal_row_changed().connect (
|
|
|
|
mem_fun(*this, &AnalysisWindow::track_list_row_changed) );
|
|
|
|
|
|
|
|
fft_graph.set_analysis_window(this);
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
vbox.pack_start (source_selection_ranges_rb, false, false);
|
|
|
|
vbox.pack_start (source_selection_regions_rb, false, false);
|
|
|
|
|
|
|
|
// "Selected ranges" radio
|
|
|
|
source_selection_ranges_rb.signal_toggled().connect (
|
|
|
|
bind ( mem_fun(*this, &AnalysisWindow::source_selection_changed), &source_selection_ranges_rb));
|
|
|
|
|
|
|
|
// "Selected regions" radio
|
|
|
|
source_selection_regions_rb.signal_toggled().connect (
|
|
|
|
bind ( mem_fun(*this, &AnalysisWindow::source_selection_changed), &source_selection_regions_rb));
|
|
|
|
}
|
|
|
|
|
|
|
|
vbox.pack_start(hseparator1, false, false);
|
|
|
|
|
|
|
|
// "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);
|
|
|
|
|
|
|
|
display_model_composite_separate_rb.set_active();
|
|
|
|
|
|
|
|
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 (
|
|
|
|
bind ( mem_fun(*this, &AnalysisWindow::display_model_changed), &display_model_composite_separate_rb));
|
|
|
|
|
|
|
|
// "Composite graph of all tracks"
|
|
|
|
display_model_composite_all_tracks_rb.signal_toggled().connect (
|
|
|
|
bind ( mem_fun(*this, &AnalysisWindow::display_model_changed), &display_model_composite_all_tracks_rb));
|
|
|
|
}
|
|
|
|
|
|
|
|
vbox.pack_start(hseparator2, false, false);
|
|
|
|
|
|
|
|
refresh_button.set_name("EditorGTKButton");
|
|
|
|
refresh_button.set_label(_("Analyze data"));
|
|
|
|
|
|
|
|
refresh_button.signal_clicked().connect ( bind ( mem_fun(*this, &AnalysisWindow::analyze_data), &refresh_button));
|
|
|
|
|
|
|
|
vbox.pack_start(refresh_button, false, false, 10);
|
|
|
|
|
|
|
|
|
|
|
|
hbox.pack_start(vbox);
|
|
|
|
|
|
|
|
// Analysis window on the right
|
|
|
|
fft_graph.ensure_style();
|
|
|
|
|
|
|
|
hbox.add(fft_graph);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// And last we pack the hbox
|
|
|
|
get_vbox()->pack_start(hbox);
|
|
|
|
|
|
|
|
track_list.show_all();
|
|
|
|
|
|
|
|
get_vbox()->show_all();
|
|
|
|
}
|
|
|
|
|
|
|
|
AnalysisWindow::~AnalysisWindow()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
AnalysisWindow::set_rangemode()
|
|
|
|
{
|
|
|
|
source_selection_ranges_rb.set_active(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
AnalysisWindow::set_regionmode()
|
|
|
|
{
|
|
|
|
source_selection_regions_rb.set_active(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
AnalysisWindow::track_list_row_changed(const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter)
|
|
|
|
{
|
|
|
|
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();
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
delete delete_me;
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
AnalysisWindow::analyze_data (Gtk::Button *button)
|
|
|
|
{
|
|
|
|
track_list_ready = false;
|
|
|
|
{
|
2006-06-13 03:27:52 -04:00
|
|
|
Glib::Mutex::Lock lm (track_list_lock);
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
// Empty track list & free old graphs
|
|
|
|
clear_tracklist();
|
|
|
|
|
|
|
|
// first we gather the FFTResults of all tracks
|
|
|
|
|
|
|
|
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());
|
|
|
|
|
|
|
|
Selection s = PublicEditor::instance().get_selection();
|
|
|
|
TimeSelection ts = s.time;
|
2006-07-23 08:03:19 -04:00
|
|
|
RegionSelection ars = s.regions;
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
for (TrackSelection::iterator i = s.tracks.begin(); i != s.tracks.end(); ++i) {
|
2007-01-09 18:24:54 -05:00
|
|
|
boost::shared_ptr<AudioPlaylist> pl
|
|
|
|
= boost::dynamic_pointer_cast<AudioPlaylist>((*i)->playlist());
|
Large nasty commit in the form of a 5000 line patch chock-full of completely
unecessary changes. (Sorry, doing a "sprint" based thing, this is the end of the first one)
Achieved MIDI track and bus creation, associated Jack port and diskstream creation, and minimal GUI stuff for creating them. Should be set to start work on actually recording and playing midi to/from disk now.
Relevant (significant) changes:
- Creation of a Buffer class. Base class is type agnostic so things can point to a buffer but not care what kind it is (otherwise it'd be a template). Derived into AudioBuffer and MidiBuffer, with a type tag because checking type is necessary in parts of the code where dynamic_cast wouldn't be wise. Originally I considered this a hack, but passing around a type proved to be a very good solution to all the other problems (below). There is a 1:1 mapping between jack port data types and ardour Buffer types (with a conversion function), but that's easily removed if it ever becomes necessary. Having the type scoped in the Buffer class is maybe not the best spot for it, but whatever (this is proof of concept kinda stuff right now...)
- IO now has a "default" port type (passed to the constructor and stored as a member), used by ensure_io (and similar) to create n ports. IO::register_***_port has a type argument that defaults to the default type if not passed. Rationale: previous IO API is identical, no changes needed to existing code, but path is paved for multiple port types in one IO, which we will need for eg synth plugin inserts, among other things. This is not quite ideal (best would be to only have the two port register functions and have them take a type), but the alternative is a lot of work (namely destroying the 'ensure' functions and everything that uses them) for very little gain. (I am convinced after quite a few tries at the whiteboard that subclassing IO in any way is not a feasible option, look at it's inheritance diagram in Doxygen and you can see why)
- AudioEngine::register_audio_input_port is now register_input_port and takes a type argument. Ditto for output.
- (Most significant change) AudioDiskstream abstracted into Distream, and sibling MidiDiskstream created. Very much still a work in progress, but Diskstream is there to switch references over to (most already are), which is the important part. It is still unclear what the MIDI diskstream's relation to channels is, but I'm pretty sure they will be single channel only (so SMF Type 0) since noone can come up with a reason otherwise.
- MidiTrack creation. Same thing as AudioTrack but with a different default type basically. No big deal here.
- Random cleanups and variable renamings etc. because I have OCD and can't help myself. :)
Known broken: Loading of sessions containing MIDI tracks.
git-svn-id: svn://localhost/ardour2/branches/midi@641 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-06-26 12:01:34 -04:00
|
|
|
|
|
|
|
if (!pl)
|
|
|
|
continue;
|
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
RouteUI *rui = dynamic_cast<RouteUI *>(*i);
|
|
|
|
|
|
|
|
// Busses don't have playlists, so we need to check that we actually are working with a playlist
|
|
|
|
if (!pl || !rui)
|
|
|
|
continue;
|
|
|
|
|
2006-08-01 15:18:12 -04:00
|
|
|
FFTResult *res = fft_graph.prepareResult(rui->color(), rui->route()->name());
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
// if timeSelection
|
|
|
|
if (source_selection_ranges_rb.get_active()) {
|
|
|
|
// cerr << "Analyzing ranges on track " << *&rui->route().name() << endl;
|
|
|
|
|
2007-01-09 18:24:54 -05:00
|
|
|
for (std::list<AudioRange>::iterator j = ts.begin(); j != ts.end(); ++j) {
|
2006-03-12 16:58:52 -05:00
|
|
|
|
2006-10-21 15:01:50 -04:00
|
|
|
nframes_t i = 0;
|
2006-03-12 16:58:52 -05:00
|
|
|
int n;
|
|
|
|
|
|
|
|
while ( i < (*j).length() ) {
|
|
|
|
// TODO: What about stereo+ channels? composite all to one, I guess
|
|
|
|
|
|
|
|
n = fft_graph.windowSize();
|
|
|
|
|
|
|
|
if (i + n >= (*j).length() ) {
|
|
|
|
n = (*j).length() - i;
|
|
|
|
}
|
|
|
|
|
2006-08-10 23:24:57 -04:00
|
|
|
n = pl->read(buf, mixbuf, gain, (*j).start + i, n);
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
if ( n < fft_graph.windowSize()) {
|
|
|
|
for (int j = n; j < fft_graph.windowSize(); j++) {
|
|
|
|
buf[j] = 0.0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
res->analyzeWindow(buf);
|
|
|
|
|
|
|
|
i += n;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (source_selection_regions_rb.get_active()) {
|
|
|
|
// cerr << "Analyzing selected regions on track " << *&rui->route().name() << endl;
|
|
|
|
|
|
|
|
TimeAxisView *current_axis = (*i);
|
|
|
|
|
2007-01-28 12:44:13 -05:00
|
|
|
for (RegionSelection::iterator j = ars.begin(); j != ars.end(); ++j) {
|
2006-07-23 08:03:19 -04:00
|
|
|
// Check that the region is actually audio (so we can analyze it)
|
|
|
|
AudioRegionView* arv = dynamic_cast<AudioRegionView*>(*j);
|
|
|
|
if (!arv)
|
|
|
|
continue;
|
|
|
|
|
2006-03-12 16:58:52 -05:00
|
|
|
// Check that the region really is selected on _this_ track/solo
|
2006-07-23 08:03:19 -04:00
|
|
|
if ( &arv->get_time_axis_view() != current_axis)
|
2006-03-12 16:58:52 -05:00
|
|
|
continue;
|
|
|
|
|
2006-07-23 08:03:19 -04:00
|
|
|
// cerr << " - " << (*j)->region().name() << ": " << (*j)->region().length() << " samples starting at " << (*j)->region().position() << endl;
|
2006-10-21 15:01:50 -04:00
|
|
|
nframes_t i = 0;
|
2006-03-12 16:58:52 -05:00
|
|
|
int n;
|
|
|
|
|
2006-08-29 17:21:48 -04:00
|
|
|
while ( i < arv->region()->length() ) {
|
2006-03-12 16:58:52 -05:00
|
|
|
// TODO: What about stereo+ channels? composite all to one, I guess
|
|
|
|
|
|
|
|
n = fft_graph.windowSize();
|
2006-08-29 17:21:48 -04:00
|
|
|
if (i + n >= arv->region()->length() ) {
|
|
|
|
n = arv->region()->length() - i;
|
2006-03-12 16:58:52 -05:00
|
|
|
}
|
2006-07-23 08:03:19 -04:00
|
|
|
|
2006-08-29 17:21:48 -04:00
|
|
|
n = arv->audio_region()->read_at(buf, mixbuf, gain, arv->region()->position() + i, n);
|
2006-03-12 16:58:52 -05:00
|
|
|
|
|
|
|
if ( n < fft_graph.windowSize()) {
|
|
|
|
for (int j = n; j < fft_graph.windowSize(); j++) {
|
|
|
|
buf[j] = 0.0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
res->analyzeWindow(buf);
|
|
|
|
|
|
|
|
i += n;
|
|
|
|
}
|
|
|
|
// cerr << "Found: " << (*j)->get_item_name() << endl;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
res->finalize();
|
|
|
|
|
|
|
|
|
|
|
|
Gtk::TreeModel::Row newrow = *(tlmodel)->append();
|
2006-08-01 15:18:12 -04:00
|
|
|
newrow[tlcols.trackname] = rui->route()->name();
|
2006-03-12 16:58:52 -05:00
|
|
|
newrow[tlcols.visible] = true;
|
2006-07-13 23:43:32 -04:00
|
|
|
newrow[tlcols.color] = rui->color();
|
2006-03-12 16:58:52 -05:00
|
|
|
newrow[tlcols.graph] = res;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
free(buf);
|
|
|
|
free(mixbuf);
|
|
|
|
|
|
|
|
track_list_ready = true;
|
|
|
|
} /* end lock */
|
|
|
|
|
|
|
|
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 = ";
|
|
|
|
|
|
|
|
if (button == &source_selection_ranges_rb) {
|
|
|
|
cerr << "selected ranges" << endl;
|
|
|
|
|
|
|
|
} else if (button == &source_selection_regions_rb) {
|
|
|
|
cerr << "selected regions" << endl;
|
|
|
|
|
|
|
|
} 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 = ";
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
|