22 #include <gtkmm/stock.h>
23 #include <gtkmm/label.h>
24 #include <gtkmm/treemodel.h>
25 #include <gtkmm/treeiter.h>
46 source_selection_label (
_(
"Signal source")),
47 source_selection_ranges_rb (
_(
"Selected ranges")),
48 source_selection_regions_rb (
_(
"Selected regions")),
50 display_model_label (
_(
"Display model")),
51 display_model_composite_separate_rb (
_(
"Composite graphs for each track")),
52 display_model_composite_all_tracks_rb (
_(
"Composite graph of all tracks")),
54 show_minmax_button (
_(
"Show frequency power range")),
55 show_normalized_button (
_(
"Normalize values")),
59 set_name(
_(
"FFT analysis window"));
60 set_title (
_(
"Spectral Analysis"));
71 track_list.get_selection()->set_mode (Gtk::SELECTION_NONE);
74 Gtk::TreeViewColumn* track_col =
track_list.get_column(0);
75 Gtk::CellRendererText* renderer =
dynamic_cast<Gtk::CellRendererText*
>(
track_list.get_column_cell_renderer (0));
77 track_col->add_attribute(renderer->property_foreground_gdk(),
tlcols.
color);
78 track_col->set_expand(
true);
81 tlmodel->signal_row_changed().connect (
156 hbox.pack_start(
vbox, Gtk::PACK_SHRINK);
213 Gtk::TreeNodeChildren children =
track_list.get_model()->children();
215 for (Gtk::TreeIter i = children.begin(); i != children.end(); i++) {
216 Gtk::TreeModel::Row row = *i;
260 for (TrackSelection::iterator i = s.
tracks.begin(); i != s.
tracks.end(); ++i) {
277 for (std::list<AudioRange>::iterator j = ts.begin(); j != ts.end(); ++j) {
280 for (
int channel = 0; channel < n_inputs; channel++) {
288 if (x + n >= (*j).length() ) {
289 n = (*j).length() - x;
292 n = pl->
read(buf, mixbuf, gain, (*j).start + x, n, channel);
308 Gtk::TreeModel::Row newrow = *(
tlmodel)->append();
318 for (RegionSelection::iterator j = ars.begin(); j != ars.end(); ++j) {
332 for (
unsigned int channel = 0; channel < arv->
region()->
n_channels(); channel++) {
341 if (x + n >= length ) {
345 memset (buf, 0, n *
sizeof (
Sample));
364 Gtk::TreeModel::Row newrow = *(
tlmodel)->append();
389 if (!button->get_active())
411 if (!button->get_active())
framecnt_t read(Sample *dst, Sample *mixdown, float *gain_buffer, framepos_t start, framecnt_t cnt, uint32_t chan_n=0)
TimeAxisView & get_time_axis_view() const
shared_ptr< T > dynamic_pointer_cast(shared_ptr< U > const &r)
Gtk::RadioButton source_selection_regions_rb
Lists of selected things.
void show_normalized_changed()
Gtk::TreeModelColumn< Gdk::Color > color
LIBARDOUR_API PBD::PropertyDescriptor< bool > gain
virtual std::string get_item_name() const
boost::shared_ptr< ARDOUR::AudioRegion > audio_region() const
Gtk::Label source_selection_label
Gtk::Button refresh_button
Gtk::TreeModelColumn< bool > visible
void set_show_normalized(bool v)
boost::shared_ptr< ARDOUR::Region > region() const
Gtk::RadioButton source_selection_ranges_rb
Gtk::TreeModelColumn< std::string > trackname
void set_analysis_window(AnalysisWindow *a_window)
Glib::RefPtr< Gtk::ListStore > tlmodel
void display_model_changed(Gtk::RadioButton *)
ChanCount n_inputs() const
FFTResult * prepareResult(Gdk::Color color, std::string trackname)
framepos_t position() const
Gtk::TreeModelColumn< FFTResult * > graph
void show_minmax_changed()
void analyzeWindow(float *window)
Gtk::HSeparator hseparator1
static PublicEditor & instance()
Gtk::RadioButton display_model_composite_all_tracks_rb
Gtk::RadioButton display_model_composite_separate_rb
Glib::Threads::Mutex track_list_lock
void analyze_data(Gtk::Button *)
uint32_t n_channels() const
Gtk::CheckButton show_normalized_button
Gtk::Label display_model_label
virtual framecnt_t read_at(Sample *buf, Sample *mixdown_buf, float *gain_buf, framepos_t position, framecnt_t cnt, uint32_t chan_n=0) const
framecnt_t length() const
void source_selection_changed(Gtk::RadioButton *)
void set_show_minmax(bool v)
boost::shared_ptr< ARDOUR::Route > route() const
Gtk::CheckButton show_minmax_button
LIBARDOUR_API PBD::PropertyDescriptor< framecnt_t > length
void track_list_row_changed(const Gtk::TreeModel::Path &path, const Gtk::TreeModel::iterator &iter)