add beat-resync button to step editor (move insertion point to next whole beat from...
[ardour.git] / gtk2_ardour / rhythm_ferret.h
index 891b447a116aca7d83aa0eb82ad7cd27e2b46e28..043b9fe8a71ac716dd581822c8ad81ed6f37c962 100644 (file)
@@ -10,7 +10,6 @@
 #include <gtkmm/image.h>
 #include <gtkmm/comboboxtext.h>
 #include <gtkmm/button.h>
-#include <gtkmm/label.h>
 
 #include "ardour_dialog.h"
 
@@ -18,7 +17,7 @@ namespace ARDOUR {
        class Readable;
 }
 
-class PublicEditor;
+class Editor;
 class RegionView;
 
 class RhythmFerret : public ArdourDialog {
@@ -36,61 +35,58 @@ class RhythmFerret : public ArdourDialog {
                DefineTempoMap,
                ConformRegion
        };
-       
-       RhythmFerret (PublicEditor&);
-       ~RhythmFerret ();
 
-       void set_session (ARDOUR::Session*);
-       
-  private:
-       PublicEditor& editor;
+       RhythmFerret (Editor&);
 
-       Gtk::HBox  upper_hpacker;
-       Gtk::HBox  lower_hpacker;
+       void set_session (ARDOUR::Session*);
 
-       Gtk::Frame operation_frame;
-       Gtk::Frame selection_frame;
-       Gtk::Frame ferret_frame;
+  protected:
+       void on_hide ();
 
-       Gtk::VBox  op_logo_packer;
-       Gtk::Image* logo;
+  private:
+       Editor& editor;
 
-       /* operation frame */
+       Gtk::ComboBoxText operation_selector;
 
-       Gtk::VBox op_packer;
-       Gtk::RadioButtonGroup operation_button_group;
-       Gtk::RadioButton region_split_button;
-       Gtk::RadioButton tempo_button;
-       Gtk::RadioButton region_conform_button;
+       Gtk::ComboBoxText analysis_mode_selector;
 
-       /* analysis frame */
+       /* transient detection widgets */
 
-       Gtk::VBox ferret_packer;
-       Gtk::ComboBoxText analysis_mode_selector;
-       Gtk::Label analysis_mode_label;
        Gtk::Adjustment detection_threshold_adjustment;
        Gtk::HScale detection_threshold_scale;
-       Gtk::Label detection_threshold_label;
        Gtk::Adjustment sensitivity_adjustment;
        Gtk::HScale sensitivity_scale;
-       Gtk::Label sensitivity_label;
        Gtk::Button analyze_button;
+
+       /* onset detection widgets */
+
+       Gtk::ComboBoxText onset_detection_function_selector;
+       Gtk::Adjustment peak_picker_threshold_adjustment;
+       Gtk::HScale peak_picker_threshold_scale;
+       Gtk::Adjustment silence_threshold_adjustment;
+       Gtk::HScale silence_threshold_scale;
+
+       /* generic stuff */
+
        Gtk::Adjustment trigger_gap_adjustment;
        Gtk::SpinButton trigger_gap_spinner;
-       Gtk::Label trigger_gap_label;
 
-       Gtk::Label operation_clarification_label;
        Gtk::Button action_button;
 
        std::vector<std::string> analysis_mode_strings;
+       std::vector<std::string> onset_function_strings;
+       std::vector<std::string> operation_strings;
 
        ARDOUR::AnalysisFeatureList current_results;
 
        AnalysisMode get_analysis_mode () const;
        Action get_action() const;
+       void analysis_mode_changed ();
+       int get_note_onset_function ();
 
        void run_analysis ();
        int run_percussion_onset_analysis (boost::shared_ptr<ARDOUR::Readable> region, nframes64_t offset, ARDOUR::AnalysisFeatureList& results);
+       int run_note_onset_analysis (boost::shared_ptr<ARDOUR::Readable> region, nframes64_t offset, ARDOUR::AnalysisFeatureList& results);
 
        void do_action ();
        void do_split_action ();