1 #ifndef __gtk2_ardour_rhythm_ferret_h__
2 #define __gtk2_ardour_rhythm_ferret_h__
5 #include <gtkmm/scale.h>
6 #include <gtkmm/spinbutton.h>
7 #include <gtkmm/radiobutton.h>
8 #include <gtkmm/radiobuttongroup.h>
9 #include <gtkmm/frame.h>
10 #include <gtkmm/image.h>
11 #include <gtkmm/comboboxtext.h>
12 #include <gtkmm/button.h>
14 #include "ardour_dialog.h"
15 #include "region_selection.h"
24 class RhythmFerret : public ArdourDialog {
26 /* order of these enums must match the _analyse_mode_strings
40 RhythmFerret (Editor&);
42 void set_session (ARDOUR::Session*);
50 Gtk::ComboBoxText operation_selector;
52 Gtk::ComboBoxText analysis_mode_selector;
54 /* transient detection widgets */
56 Gtk::Adjustment detection_threshold_adjustment;
57 Gtk::HScale detection_threshold_scale;
58 Gtk::Adjustment sensitivity_adjustment;
59 Gtk::HScale sensitivity_scale;
60 Gtk::Button analyze_button;
62 /* onset detection widgets */
64 Gtk::ComboBoxText onset_detection_function_selector;
65 Gtk::Adjustment peak_picker_threshold_adjustment;
66 Gtk::HScale peak_picker_threshold_scale;
67 Gtk::Adjustment silence_threshold_adjustment;
68 Gtk::HScale silence_threshold_scale;
72 Gtk::Adjustment trigger_gap_adjustment;
73 Gtk::SpinButton trigger_gap_spinner;
75 Gtk::Button action_button;
77 std::vector<std::string> analysis_mode_strings;
78 std::vector<std::string> onset_function_strings;
79 std::vector<std::string> operation_strings;
81 ARDOUR::AnalysisFeatureList current_results;
83 void clear_transients ();
84 /** Regions that we have added transient marks to */
85 RegionSelection regions_with_transients;
87 AnalysisMode get_analysis_mode () const;
88 Action get_action() const;
89 void analysis_mode_changed ();
90 int get_note_onset_function ();
93 int run_percussion_onset_analysis (boost::shared_ptr<ARDOUR::Readable> region, ARDOUR::frameoffset_t offset, ARDOUR::AnalysisFeatureList& results);
94 int run_note_onset_analysis (boost::shared_ptr<ARDOUR::Readable> region, ARDOUR::frameoffset_t offset, ARDOUR::AnalysisFeatureList& results);
97 void do_split_action ();
98 void do_region_split (RegionView* rv, const ARDOUR::AnalysisFeatureList&);
101 #endif /* __gtk2_ardour_rhythm_ferret_h__ */